Proposes one change to the decision’s spec from its feedback (a feature rewrite or a new feature), with its preview as evidence. suggestion is null when there is nothing worth proposing, and reason says why. The same candidate proposed earlier in the key’s environment is returned instead of a duplicate. Everything is read in the key’s environment: its feedback, cases and suggestions (a test key learns from test cases only). Without spec, the base is the version serving primary traffic in that environment (else the latest version seeded there). A spec sent here must already be registered (evaluated, seeded or POST /v1/decisions//structures), or it is 404 VERSION_UNKNOWN. Send outcomes unless the base’s latest primary evaluation in the key’s environment, else its latest seed there, recorded cut points (400 OUTCOMES_INVALID). Only cases with an outcome from the owner, reviewers or seeds count. 503 ENGINE_UNAVAILABLE (retry later) when no generator is configured, the generator’s provider fails, or the engines could not score the cases.
An API key, sent as Authorization: Bearer <key>. Each operation lists the scope its key needs: decisions:evaluate (evaluate and read evaluations), decisions:feedback (your app's feedback) or decisions:develop (everything else, including owner feedback and the review queue). An operation listing no scope takes any scoped key. A key with no scope, or without the operation's, gets 403 INSUFFICIENT_SCOPE.
Makes a retry safe. For 24 hours, the same key with the same request returns the first stored result (with Idempotent-Replayed: true); the same key with a different request is a 422 IDEMPOTENCY_KEY_REUSED. Keys are scoped to the organization and environment across every operation, so use a fresh key per request. A request that failed before its result was stored runs again when retried with its key.
The environment of the key that made the call: production or test. Evaluations, feedback, reviews and suggestions are separate per environment; registered structures are shared.
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"Moonbounce Decisions API","colors":{"primary":"#4f46e5"},"banner":{"content":"Looking for the Clavata policy and labeling API? Those docs are at [docs.clavata.ai](https://docs.clavata.ai). You are on the docs for the Moonbounce decisions platform.","dismissible":true,"type":"info"},"styling":{"latex":false},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"moonbounce","hasAudioNarration":false,"actualSubdomain":"moonbounce","customDomains":[],"gitSource":{"type":"github","owner":"clavataai","repo":"decisions-platform","deployBranch":"main","contentDirectory":"docs/site","isPrivate":true,"mountPath":"","label":"","_id":"6ae8f7a905e268646b31d443"},"chroma":{"latestBuiltDeploymentHistoryId":"6ae8f896f8277f19c7cc79c9","collectionId":"f756780d-07b6-4802-bb88-e6a9d392f388","liveDeploymentHistoryId":"6ae8f896f8277f19c7cc79c9","schemaVersion":"v3"},"entitlements":{},"buildId":"6ae8f896f8277f19c7cc79c9","clientVersion":"0.0.4045","searchFilterCounts":[{"language":"default","tag":"API reference","count":34},{"language":"default","tag":"Endpoints","count":33},{"language":"default","tag":"Guides","count":14},{"language":"default","tag":"review","count":9},{"language":"default","tag":"suggestions","count":6},{"language":"default","tag":"specs","count":5},{"language":"default","tag":"Improve a decision","count":4},{"language":"default","tag":"feedback","count":4},{"language":"default","tag":"Get started","count":3},{"language":"default","tag":"engines","count":3}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableContextualStarterQuestions":false,"enableAskAiSearchBar":true},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"byok-sep-25","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"vite-origin","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-updated-9-15","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":false},"customCss":[],"page":{"pagePath":"api-reference/suggestions/generate-a-suggestion-on-demand","slug":"/api-reference/suggestions/generate-a-suggestion-on-demand","pageMetadata":{"title":"Generate a suggestion on demand","description":"Proposes one change to the decision's spec from its feedback (a feature rewrite or a new feature), with its preview as evidence. `suggestion` is null when there is nothing worth proposing, and `reason` says why. The same candidate proposed earlier in the key's environment is returned instead of a duplicate. Everything is read in the key's environment: its feedback, cases and suggestions (a test key learns from test cases only). Without `spec`, the base is the version serving primary traffic in that environment (else the latest version seeded there). A `spec` sent here must already be registered (evaluated, seeded or POST /v1/decisions/{id}/structures), or it is 404 VERSION_UNKNOWN. Send `outcomes` unless the base's latest primary evaluation in the key's environment, else its latest seed there, recorded cut points (400 OUTCOMES_INVALID). Only cases with an outcome from the owner, reviewers or seeds count. 503 ENGINE_UNAVAILABLE (retry later) when no generator is configured, the generator's provider fails, or the engines could not score the cases.","deprecated":null,"version":null,"openapi":"/openapi.json post /v1/decisions/{decision_id}/suggestions","href":"/api-reference/suggestions/generate-a-suggestion-on-demand","autogeneratedByOpenApi":true},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx, jsxs: _jsxs} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n code: \"code\",\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsxs(_components.p, {\n children: [\"Proposes one change to the decision’s spec from its feedback (a feature rewrite or a new feature), with its preview as evidence. \", _jsx(_components.code, {\n children: \"suggestion\"\n }), \" is null when there is nothing worth proposing, and \", _jsx(_components.code, {\n children: \"reason\"\n }), \" says why. The same candidate proposed earlier in the key’s environment is returned instead of a duplicate. Everything is read in the key’s environment: its feedback, cases and suggestions (a test key learns from test cases only). Without \", _jsx(_components.code, {\n children: \"spec\"\n }), \", the base is the version serving primary traffic in that environment (else the latest version seeded there). A \", _jsx(_components.code, {\n children: \"spec\"\n }), \" sent here must already be registered (evaluated, seeded or POST /v1/decisions/\", \"/structures), or it is 404 VERSION_UNKNOWN. Send \", _jsx(_components.code, {\n children: \"outcomes\"\n }), \" unless the base’s latest primary evaluation in the key’s environment, else its latest seed there, recorded cut points (400 OUTCOMES_INVALID). Only cases with an outcome from the owner, reviewers or seeds count. 503 ENGINE_UNAVAILABLE (retry later) when no generator is configured, the generator’s provider fails, or the engines could not score the cases.\"]\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){return _jsx(_Fragment,{})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Generate a suggestion on demand","description":"Proposes one change to the decision's spec from its feedback (a feature rewrite or a new feature), with its preview as evidence. `suggestion` is null when there is nothing worth proposing, and `reason` says why. The same candidate proposed earlier in the key's environment is returned instead of a duplicate. Everything is read in the key's environment: its feedback, cases and suggestions (a test key learns from test cases only). Without `spec`, the base is the version serving primary traffic in that environment (else the latest version seeded there). A `spec` sent here must already be registered (evaluated, seeded or POST /v1/decisions/{id}/structures), or it is 404 VERSION_UNKNOWN. Send `outcomes` unless the base's latest primary evaluation in the key's environment, else its latest seed there, recorded cut points (400 OUTCOMES_INVALID). Only cases with an outcome from the owner, reviewers or seeds count. 503 ENGINE_UNAVAILABLE (retry later) when no generator is configured, the generator's provider fails, or the engines could not score the cases.","deprecated":null,"version":null,"openapi":"/openapi.json post /v1/decisions/{decision_id}/suggestions","href":"/api-reference/suggestions/generate-a-suggestion-on-demand","autogeneratedByOpenApi":true}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[],"codeExamples":{}},"jsLinks":[],"openApiReferenceData":{"operation":{"operationId":"generateSuggestion","tags":["suggestions"],"security":["1f8dd892-edb9-437a-a111-92ca1ddfe8aa"],"summary":"Generate a suggestion on demand","description":"Proposes one change to the decision's spec from its feedback (a feature rewrite or a new feature), with its preview as evidence. `suggestion` is null when there is nothing worth proposing, and `reason` says why. The same candidate proposed earlier in the key's environment is returned instead of a duplicate. Everything is read in the key's environment: its feedback, cases and suggestions (a test key learns from test cases only). Without `spec`, the base is the version serving primary traffic in that environment (else the latest version seeded there). A `spec` sent here must already be registered (evaluated, seeded or POST /v1/decisions/{id}/structures), or it is 404 VERSION_UNKNOWN. Send `outcomes` unless the base's latest primary evaluation in the key's environment, else its latest seed there, recorded cut points (400 OUTCOMES_INVALID). Only cases with an outcome from the owner, reviewers or seeds count. 503 ENGINE_UNAVAILABLE (retry later) when no generator is configured, the generator's provider fails, or the engines could not score the cases.","parameters":["d0a9e98a-13de-421a-af6d-443a1895fc3d","9c66a23a-c5c5-49ad-9088-d772d476fc14"],"requestBody":"346552a7-ac2e-428c-be60-efb54f11590e","responses":{"200":"2fade3c8-02bb-4edc-9093-7410bbced9cc","400":"34ca0e72-e607-4aa6-9067-455e082d10b1","401":"f3f1ab11-b3e4-44f2-8617-bafe45146167","403":"7fe340ff-b738-496b-9ecc-bd8e002c24aa","404":"6ff7d7f3-f2b7-4d88-bd36-a52acf5f7374","409":"3360c9c3-cf07-4a5b-b68c-69fc0dcaca7c","410":"63563dc7-09d7-4a63-85c5-8dbc305a0724","422":"e25499c4-08d0-4eb1-af17-5549672075a2","429":"0c6d4098-5087-4944-9241-22743f90ccde","502":"f98ba71a-789c-4feb-a04f-b89429acd9e9","503":"aa8d5074-9236-4265-8373-4bdc4c09a6fb"},"method":"post","type":"path","servers":["9e61324b-4cc4-430d-a8d9-fa0221e50db5"],"path":"/v1/decisions/{decision_id}/suggestions","baseUrlOptions":["https://api.moonbounce.ai"],"title":"Generate a suggestion on demand","codeSamples":[],"requiredOnlyExamples":false,"requestExampleType":"generated","responseExampleType":"generated"},"dependencies":{"parameters":{"d0a9e98a-13de-421a-af6d-443a1895fc3d":{"schema":{"type":"string","pattern":"^[a-z][a-z0-9_.-]{0,127}$","isRequired":true,"uniqueKey":"","typeLabel":"string"},"required":true,"name":"decision_id","in":"path"},"9c66a23a-c5c5-49ad-9088-d772d476fc14":{"schema":{"type":"string","minLength":1,"maxLength":255,"pattern":"^[\\x20-\\x7e]+$","description":"Makes a retry safe. For 24 hours, the same key with the same request returns the first stored result (with Idempotent-Replayed: true); the same key with a different request is a 422 IDEMPOTENCY_KEY_REUSED. Keys are scoped to the organization and environment across every operation, so use a fresh key per request. A request that failed before its result was stored runs again when retried with its key.","isRequired":false,"uniqueKey":"","typeLabel":"string"},"required":false,"description":"Makes a retry safe. For 24 hours, the same key with the same request returns the first stored result (with Idempotent-Replayed: true); the same key with a different request is a 422 IDEMPOTENCY_KEY_REUSED. Keys are scoped to the organization and environment across every operation, so use a fresh key per request. A request that failed before its result was stored runs again when retried with its key.","name":"idempotency-key","in":"header"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"kind":{"type":"string","enum":["feature_rewrite","new_feature"],"description":"When given, generate this kind even if blame points to the other; the replay gate still decides whether it is proposed.","uniqueKey":"kind","typeLabel":"enum\u003cstring>"},"spec":{"type":"object","properties":{"format":{"type":"string","enum":["moonbounce.spec/0"],"isRequired":true,"uniqueKey":"spec.format","typeLabel":"enum\u003cstring>"},"nodes":{"type":"object","additionalProperties":{"oneOf":[{"type":"object","required":["type","prompt"],"properties":{"type":{"type":"string","enum":["boolean"],"isRequired":true,"uniqueKey":"spec.nodes.additionalProperties.oneOf.0.type","typeLabel":"enum\u003cstring>"},"prompt":{"type":"string","minLength":1,"maxLength":4000,"isRequired":true,"uniqueKey":"spec.nodes.additionalProperties.oneOf.0.prompt","typeLabel":"string"},"guidance":{"type":"string","minLength":1,"maxLength":4000,"uniqueKey":"spec.nodes.additionalProperties.oneOf.0.guidance","typeLabel":"string"},"inputs":{"type":"array","items":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,63}$","uniqueKey":"spec.nodes.additionalProperties.oneOf.0.inputs.items.[INDEX]","typeLabel":"string"},"minItems":1,"description":"Names of the `subject` parts this feature reads (default: all of them); `context` parts are always read. Every name must match a subject part's `name`, or the request is a 400 CONTENT_INVALID.","uniqueKey":"spec.nodes.additionalProperties.oneOf.0.inputs","typeLabel":"string[]"},"criteria":{"type":"object","properties":{"true":{"type":"string","minLength":1,"maxLength":4000,"uniqueKey":"spec.nodes.additionalProperties.oneOf.0.criteria.true","typeLabel":"string"},"false":{"type":"string","minLength":1,"maxLength":4000,"uniqueKey":"spec.nodes.additionalProperties.oneOf.0.criteria.false","typeLabel":"string"}},"additionalProperties":false,"uniqueKey":"spec.nodes.additionalProperties.oneOf.0.criteria","typeLabel":"object"}},"additionalProperties":false,"uniqueKey":"spec.nodes.additionalProperties.oneOf.0","typeLabel":"object"},{"type":"object","description":"Scores a node from its terms. Before fitting (and without fixed numbers), mean averages the oriented inputs, so each of n terms weighs 1/n and adding a term dilutes the others; any computes sigmoid(-4 + 8·Σraises - 8·Σlowers): one strong raise is enough, weak raises add up, and lowers cancel raises. Fitted or fixed numbers replace the prior.","required":["type","terms"],"properties":{"type":{"type":"string","enum":["combine"],"isRequired":true,"uniqueKey":"spec.nodes.additionalProperties.oneOf.1.type","typeLabel":"enum\u003cstring>"},"terms":{"type":"array","items":{"type":"object","properties":{"node":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,63}$","isRequired":true,"uniqueKey":"spec.nodes.additionalProperties.oneOf.1.terms.items.[INDEX].node","typeLabel":"string"},"option":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,63}$","description":"Reserved for choice and scale features, which are not available yet: any value is a 400.","uniqueKey":"spec.nodes.additionalProperties.oneOf.1.terms.items.[INDEX].option","typeLabel":"string"},"effect":{"type":"string","enum":["raises","lowers"],"default":"raises","description":"raises: a yes pushes the score up; lowers: a yes pushes it down. The sign lives here; fixed weights must agree with it.","uniqueKey":"spec.nodes.additionalProperties.oneOf.1.terms.items.[INDEX].effect","typeLabel":"enum\u003cstring>"}},"required":["node"],"additionalProperties":false,"uniqueKey":"spec.nodes.additionalProperties.oneOf.1.terms.items.[INDEX]","typeLabel":"object"},"minItems":1,"maxItems":64,"isRequired":true,"uniqueKey":"spec.nodes.additionalProperties.oneOf.1.terms","typeLabel":"object[]"},"prior":{"type":"string","enum":["mean","any"],"description":"Default combine weights before fitting. mean averages oriented inputs; any computes sigmoid(-4 + 8·Σraises - 8·Σlowers), a logistic of a signed sum: one strong raise is enough and weak raises add up.","uniqueKey":"spec.nodes.additionalProperties.oneOf.1.prior","typeLabel":"enum\u003cstring>"},"fixed":{"type":"object","properties":{"link":{"type":"string","enum":["identity","logistic"],"description":"identity: the weighted sum plus bias, clipped to 0..1; logistic: the sigmoid of the weighted sum plus bias.","isRequired":true,"uniqueKey":"spec.nodes.additionalProperties.oneOf.1.fixed.link","typeLabel":"enum\u003cstring>"},"weights":{"type":"object","additionalProperties":{"type":"number","uniqueKey":"spec.nodes.additionalProperties.oneOf.1.fixed.weights.additionalProperties","typeLabel":"number"},"description":"Signed weights per term key (node; options are reserved).","isRequired":true,"uniqueKey":"spec.nodes.additionalProperties.oneOf.1.fixed.weights","typeLabel":"object"},"bias":{"type":"number","description":"Offset added to the weighted sum before applying the link.","isRequired":true,"uniqueKey":"spec.nodes.additionalProperties.oneOf.1.fixed.bias","typeLabel":"number"}},"required":["link","weights","bias"],"additionalProperties":false,"description":"Numbers fixed in code, never overridden by fitted weights. Signed weights multiply raw P(yes): raises weights must be >= 0 and lowers weights \u003c= 0.","uniqueKey":"spec.nodes.additionalProperties.oneOf.1.fixed","typeLabel":"object"}},"additionalProperties":false,"uniqueKey":"spec.nodes.additionalProperties.oneOf.1","typeLabel":"object"},{"type":"object","required":["type","node"],"properties":{"type":{"type":"string","enum":["calibrate"],"isRequired":true,"uniqueKey":"spec.nodes.additionalProperties.oneOf.2.type","typeLabel":"enum\u003cstring>"},"node":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,63}$","isRequired":true,"uniqueKey":"spec.nodes.additionalProperties.oneOf.2.node","typeLabel":"string"}},"additionalProperties":false,"uniqueKey":"spec.nodes.additionalProperties.oneOf.2","typeLabel":"object"}],"uniqueKey":"spec.nodes.additionalProperties","typeLabel":"object"},"description":"The spec's named nodes, 1 to 64: boolean features and the aggregators that read them. Every reference (`output`, a combine term's `node`, a calibrate's `node`) names a node in this map, with no cycles.","isRequired":true,"uniqueKey":"spec.nodes","typeLabel":"object"},"output":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,63}$","isRequired":true,"uniqueKey":"spec.output","typeLabel":"string"},"guidance":{"type":"string","minLength":1,"maxLength":20000,"uniqueKey":"spec.guidance","typeLabel":"string"},"target":{"type":"string","minLength":1,"maxLength":4000,"description":"The yes/no statement the output's score is the probability of. Required when `output` is a combine or calibrate node, optional on a boolean output. Feedback `target` claims need it.","uniqueKey":"spec.target","typeLabel":"string"},"meta":{"type":"object","properties":{"title":{"type":"string","maxLength":200,"uniqueKey":"spec.meta.title","typeLabel":"string"},"description":{"type":"string","maxLength":4000,"uniqueKey":"spec.meta.description","typeLabel":"string"},"owner":{"type":"string","maxLength":200,"uniqueKey":"spec.meta.owner","typeLabel":"string"},"tags":{"type":"array","items":{"type":"string","maxLength":64,"uniqueKey":"spec.meta.tags.items.[INDEX]","typeLabel":"string"},"maxItems":32,"uniqueKey":"spec.meta.tags","typeLabel":"string[]"},"display":{"type":"object","additionalProperties":{"type":"object","properties":{"text":{"type":"string","minLength":1,"maxLength":40,"isRequired":true,"uniqueKey":"spec.meta.display.additionalProperties.text","typeLabel":"string"},"help":{"type":"string","maxLength":200,"uniqueKey":"spec.meta.display.additionalProperties.help","typeLabel":"string"}},"required":["text"],"additionalProperties":false,"uniqueKey":"spec.meta.display.additionalProperties","typeLabel":"object"},"uniqueKey":"spec.meta.display","typeLabel":"object"}},"additionalProperties":false,"uniqueKey":"spec.meta","typeLabel":"object"}},"required":["format","nodes","output"],"additionalProperties":false,"uniqueKey":"spec","typeLabel":"object"},"weights":{"oneOf":[{"type":"string","default":"default","enum":["default"],"uniqueKey":"weights.oneOf.0","typeLabel":"enum\u003cstring>"},{"type":"string","default":"default","pattern":"^sha256:[0-9a-f]{64}$","uniqueKey":"weights.oneOf.1","typeLabel":"string"}],"uniqueKey":"weights","typeLabel":"enum\u003cstring> | string"},"outcomes":{"type":"object","properties":{"below":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,63}$","description":"The outcome for a score under the first cut.","isRequired":true,"uniqueKey":"outcomes.below","typeLabel":"string"},"cuts":{"type":"array","items":{"type":"object","properties":{"at":{"type":"number","isRequired":true,"uniqueKey":"outcomes.cuts.items.[INDEX].at","typeLabel":"number"},"outcome":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,63}$","isRequired":true,"uniqueKey":"outcomes.cuts.items.[INDEX].outcome","typeLabel":"string"}},"required":["at","outcome"],"additionalProperties":false,"uniqueKey":"outcomes.cuts.items.[INDEX]","typeLabel":"object"},"minItems":1,"maxItems":9,"isRequired":true,"uniqueKey":"outcomes.cuts","typeLabel":"object[]"},"abstain":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,63}$","uniqueKey":"outcomes.abstain","typeLabel":"string"}},"required":["below","cuts"],"additionalProperties":false,"uniqueKey":"outcomes","typeLabel":"object"}},"additionalProperties":false,"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"weights":"default"}}},"exampleType":"generated"}},"exampleType":"generated"},"responses":{"2fade3c8-02bb-4edc-9093-7410bbced9cc":{"description":"The suggestion, or why there is none","headers":{"Idempotent-Replayed":{"schema":{"type":"string","enum":["true"],"description":"Present and `true` when this is the stored result of an earlier request with the same Idempotency-Key."},"required":false,"description":"Present and `true` when this is the stored result of an earlier request with the same Idempotency-Key."}},"content":{"application/json":{"schema":{"type":"object","properties":{"environment":{"type":"string","enum":["production","test"],"description":"The environment of the key that made the call: `production` or `test`. Evaluations, feedback, reviews and suggestions are separate per environment; registered structures are shared.","isRequired":true,"uniqueKey":"environment","typeLabel":"enum\u003cstring>"},"suggestion":{"oneOf":[{"type":"object","required":["id","decision_id","kind","target","summary","environment","base","candidate","requires","candidate_spec","diff","evidence","preview_id","generator","status","created_at"],"properties":{"id":{"type":"string","pattern":"^sug_[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$","isRequired":true,"uniqueKey":"suggestion.oneOf.0.id","typeLabel":"string"},"decision_id":{"type":"string","pattern":"^[a-z][a-z0-9_.-]{0,127}$","isRequired":true,"uniqueKey":"suggestion.oneOf.0.decision_id","typeLabel":"string"},"kind":{"type":"string","enum":["feature_rewrite","new_feature"],"isRequired":true,"uniqueKey":"suggestion.oneOf.0.kind","typeLabel":"enum\u003cstring>"},"target":{"type":"string","enum":["structure"],"isRequired":true,"uniqueKey":"suggestion.oneOf.0.target","typeLabel":"enum\u003cstring>"},"summary":{"type":"string","isRequired":true,"uniqueKey":"suggestion.oneOf.0.summary","typeLabel":"string"},"environment":{"type":"string","enum":["production","test"],"description":"The environment of the key that made the call: `production` or `test`. Evaluations, feedback, reviews and suggestions are separate per environment; registered structures are shared.","isRequired":true,"uniqueKey":"suggestion.oneOf.0.environment","typeLabel":"enum\u003cstring>"},"base":{"type":"object","properties":{"structure":{"type":"string","pattern":"^sha256:[0-9a-f]{64}$","isRequired":true,"uniqueKey":"suggestion.oneOf.0.base.structure","typeLabel":"string"},"weights":{"type":"string","pattern":"^sha256:[0-9a-f]{64}$","isRequired":true,"uniqueKey":"suggestion.oneOf.0.base.weights","typeLabel":"string"},"engine_profile":{"type":"string","isRequired":true,"uniqueKey":"suggestion.oneOf.0.base.engine_profile","typeLabel":"string"}},"required":["structure","weights","engine_profile"],"additionalProperties":false,"isRequired":true,"uniqueKey":"suggestion.oneOf.0.base","typeLabel":"object"},"candidate":{"type":"object","properties":{"structure":{"type":"string","pattern":"^sha256:[0-9a-f]{64}$","isRequired":true,"uniqueKey":"suggestion.oneOf.0.candidate.structure","typeLabel":"string"},"weights":{"type":"string","pattern":"^sha256:[0-9a-f]{64}$","isRequired":true,"uniqueKey":"suggestion.oneOf.0.candidate.weights","typeLabel":"string"},"engine_profile":{"type":"string","isRequired":true,"uniqueKey":"suggestion.oneOf.0.candidate.engine_profile","typeLabel":"string"},"weights_pin":{"oneOf":[{"type":"string","default":"default","enum":["default"],"isRequired":true,"uniqueKey":"suggestion.oneOf.0.candidate.weights_pin.oneOf.0","typeLabel":"enum\u003cstring>"},{"type":"string","default":"default","pattern":"^sha256:[0-9a-f]{64}$","isRequired":true,"uniqueKey":"suggestion.oneOf.0.candidate.weights_pin.oneOf.1","typeLabel":"string"}],"isRequired":true,"uniqueKey":"suggestion.oneOf.0.candidate.weights_pin","typeLabel":"enum\u003cstring> | string"}},"required":["structure","weights","engine_profile","weights_pin"],"additionalProperties":false,"isRequired":true,"uniqueKey":"suggestion.oneOf.0.candidate","typeLabel":"object"},"requires":{"type":"array","items":{"type":"string","pattern":"^sug_[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$","uniqueKey":"suggestion.oneOf.0.requires.items.[INDEX]","typeLabel":"string"},"isRequired":true,"uniqueKey":"suggestion.oneOf.0.requires","typeLabel":"string[]"},"candidate_spec":{"type":"object","properties":{"format":{"type":"string","enum":["moonbounce.spec/0"],"isRequired":true,"uniqueKey":"suggestion.oneOf.0.candidate_spec.format","typeLabel":"enum\u003cstring>"},"nodes":{"type":"object","additionalProperties":{"oneOf":[{"type":"object","required":["type","prompt"],"properties":{"type":{"type":"string","enum":["boolean"],"isRequired":true,"uniqueKey":"suggestion.oneOf.0.candidate_spec.nodes.additionalProperties.oneOf.0.type","typeLabel":"enum\u003cstring>"},"prompt":{"type":"string","minLength":1,"maxLength":4000,"isRequired":true,"uniqueKey":"suggestion.oneOf.0.candidate_spec.nodes.additionalProperties.oneOf.0.prompt","typeLabel":"string"},"guidance":{"type":"string","minLength":1,"maxLength":4000,"uniqueKey":"suggestion.oneOf.0.candidate_spec.nodes.additionalProperties.oneOf.0.guidance","typeLabel":"string"},"inputs":{"type":"array","items":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,63}$","uniqueKey":"suggestion.oneOf.0.candidate_spec.nodes.additionalProperties.oneOf.0.inputs.items.[INDEX]","typeLabel":"string"},"minItems":1,"description":"Names of the `subject` parts this feature reads (default: all of them); `context` parts are always read. Every name must match a subject part's `name`, or the request is a 400 CONTENT_INVALID.","uniqueKey":"suggestion.oneOf.0.candidate_spec.nodes.additionalProperties.oneOf.0.inputs","typeLabel":"string[]"},"criteria":{"type":"object","properties":{"true":{"type":"string","minLength":1,"maxLength":4000,"uniqueKey":"suggestion.oneOf.0.candidate_spec.nodes.additionalProperties.oneOf.0.criteria.true","typeLabel":"string"},"false":{"type":"string","minLength":1,"maxLength":4000,"uniqueKey":"suggestion.oneOf.0.candidate_spec.nodes.additionalProperties.oneOf.0.criteria.false","typeLabel":"string"}},"additionalProperties":false,"uniqueKey":"suggestion.oneOf.0.candidate_spec.nodes.additionalProperties.oneOf.0.criteria","typeLabel":"object"}},"additionalProperties":false,"uniqueKey":"suggestion.oneOf.0.candidate_spec.nodes.additionalProperties.oneOf.0","typeLabel":"object"},{"type":"object","description":"Scores a node from its terms. Before fitting (and without fixed numbers), mean averages the oriented inputs, so each of n terms weighs 1/n and adding a term dilutes the others; any computes sigmoid(-4 + 8·Σraises - 8·Σlowers): one strong raise is enough, weak raises add up, and lowers cancel raises. Fitted or fixed numbers replace the prior.","required":["type","terms"],"properties":{"type":{"type":"string","enum":["combine"],"isRequired":true,"uniqueKey":"suggestion.oneOf.0.candidate_spec.nodes.additionalProperties.oneOf.1.type","typeLabel":"enum\u003cstring>"},"terms":{"type":"array","items":{"type":"object","properties":{"node":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,63}$","isRequired":true,"uniqueKey":"suggestion.oneOf.0.candidate_spec.nodes.additionalProperties.oneOf.1.terms.items.[INDEX].node","typeLabel":"string"},"option":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,63}$","description":"Reserved for choice and scale features, which are not available yet: any value is a 400.","uniqueKey":"suggestion.oneOf.0.candidate_spec.nodes.additionalProperties.oneOf.1.terms.items.[INDEX].option","typeLabel":"string"},"effect":{"type":"string","enum":["raises","lowers"],"default":"raises","description":"raises: a yes pushes the score up; lowers: a yes pushes it down. The sign lives here; fixed weights must agree with it.","uniqueKey":"suggestion.oneOf.0.candidate_spec.nodes.additionalProperties.oneOf.1.terms.items.[INDEX].effect","typeLabel":"enum\u003cstring>"}},"required":["node"],"additionalProperties":false,"uniqueKey":"suggestion.oneOf.0.candidate_spec.nodes.additionalProperties.oneOf.1.terms.items.[INDEX]","typeLabel":"object"},"minItems":1,"maxItems":64,"isRequired":true,"uniqueKey":"suggestion.oneOf.0.candidate_spec.nodes.additionalProperties.oneOf.1.terms","typeLabel":"object[]"},"prior":{"type":"string","enum":["mean","any"],"description":"Default combine weights before fitting. mean averages oriented inputs; any computes sigmoid(-4 + 8·Σraises - 8·Σlowers), a logistic of a signed sum: one strong raise is enough and weak raises add up.","uniqueKey":"suggestion.oneOf.0.candidate_spec.nodes.additionalProperties.oneOf.1.prior","typeLabel":"enum\u003cstring>"},"fixed":{"type":"object","properties":{"link":{"type":"string","enum":["identity","logistic"],"description":"identity: the weighted sum plus bias, clipped to 0..1; logistic: the sigmoid of the weighted sum plus bias.","isRequired":true,"uniqueKey":"suggestion.oneOf.0.candidate_spec.nodes.additionalProperties.oneOf.1.fixed.link","typeLabel":"enum\u003cstring>"},"weights":{"type":"object","additionalProperties":{"type":"number","uniqueKey":"suggestion.oneOf.0.candidate_spec.nodes.additionalProperties.oneOf.1.fixed.weights.additionalProperties","typeLabel":"number"},"description":"Signed weights per term key (node; options are reserved).","isRequired":true,"uniqueKey":"suggestion.oneOf.0.candidate_spec.nodes.additionalProperties.oneOf.1.fixed.weights","typeLabel":"object"},"bias":{"type":"number","description":"Offset added to the weighted sum before applying the link.","isRequired":true,"uniqueKey":"suggestion.oneOf.0.candidate_spec.nodes.additionalProperties.oneOf.1.fixed.bias","typeLabel":"number"}},"required":["link","weights","bias"],"additionalProperties":false,"description":"Numbers fixed in code, never overridden by fitted weights. Signed weights multiply raw P(yes): raises weights must be >= 0 and lowers weights \u003c= 0.","uniqueKey":"suggestion.oneOf.0.candidate_spec.nodes.additionalProperties.oneOf.1.fixed","typeLabel":"object"}},"additionalProperties":false,"uniqueKey":"suggestion.oneOf.0.candidate_spec.nodes.additionalProperties.oneOf.1","typeLabel":"object"},{"type":"object","required":["type","node"],"properties":{"type":{"type":"string","enum":["calibrate"],"isRequired":true,"uniqueKey":"suggestion.oneOf.0.candidate_spec.nodes.additionalProperties.oneOf.2.type","typeLabel":"enum\u003cstring>"},"node":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,63}$","isRequired":true,"uniqueKey":"suggestion.oneOf.0.candidate_spec.nodes.additionalProperties.oneOf.2.node","typeLabel":"string"}},"additionalProperties":false,"uniqueKey":"suggestion.oneOf.0.candidate_spec.nodes.additionalProperties.oneOf.2","typeLabel":"object"}],"uniqueKey":"suggestion.oneOf.0.candidate_spec.nodes.additionalProperties","typeLabel":"object"},"description":"The spec's named nodes, 1 to 64: boolean features and the aggregators that read them. Every reference (`output`, a combine term's `node`, a calibrate's `node`) names a node in this map, with no cycles.","isRequired":true,"uniqueKey":"suggestion.oneOf.0.candidate_spec.nodes","typeLabel":"object"},"output":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,63}$","isRequired":true,"uniqueKey":"suggestion.oneOf.0.candidate_spec.output","typeLabel":"string"},"guidance":{"type":"string","minLength":1,"maxLength":20000,"uniqueKey":"suggestion.oneOf.0.candidate_spec.guidance","typeLabel":"string"},"target":{"type":"string","minLength":1,"maxLength":4000,"description":"The yes/no statement the output's score is the probability of. Required when `output` is a combine or calibrate node, optional on a boolean output. Feedback `target` claims need it.","uniqueKey":"suggestion.oneOf.0.candidate_spec.target","typeLabel":"string"},"meta":{"type":"object","properties":{"title":{"type":"string","maxLength":200,"uniqueKey":"suggestion.oneOf.0.candidate_spec.meta.title","typeLabel":"string"},"description":{"type":"string","maxLength":4000,"uniqueKey":"suggestion.oneOf.0.candidate_spec.meta.description","typeLabel":"string"},"owner":{"type":"string","maxLength":200,"uniqueKey":"suggestion.oneOf.0.candidate_spec.meta.owner","typeLabel":"string"},"tags":{"type":"array","items":{"type":"string","maxLength":64,"uniqueKey":"suggestion.oneOf.0.candidate_spec.meta.tags.items.[INDEX]","typeLabel":"string"},"maxItems":32,"uniqueKey":"suggestion.oneOf.0.candidate_spec.meta.tags","typeLabel":"string[]"},"display":{"type":"object","additionalProperties":{"type":"object","properties":{"text":{"type":"string","minLength":1,"maxLength":40,"isRequired":true,"uniqueKey":"suggestion.oneOf.0.candidate_spec.meta.display.additionalProperties.text","typeLabel":"string"},"help":{"type":"string","maxLength":200,"uniqueKey":"suggestion.oneOf.0.candidate_spec.meta.display.additionalProperties.help","typeLabel":"string"}},"required":["text"],"additionalProperties":false,"uniqueKey":"suggestion.oneOf.0.candidate_spec.meta.display.additionalProperties","typeLabel":"object"},"uniqueKey":"suggestion.oneOf.0.candidate_spec.meta.display","typeLabel":"object"}},"additionalProperties":false,"uniqueKey":"suggestion.oneOf.0.candidate_spec.meta","typeLabel":"object"}},"required":["format","nodes","output"],"additionalProperties":false,"isRequired":true,"uniqueKey":"suggestion.oneOf.0.candidate_spec","typeLabel":"object"},"diff":{"type":"array","items":{"type":"object","properties":{"op":{"type":"string","enum":["replace","add","remove"],"isRequired":true,"uniqueKey":"suggestion.oneOf.0.diff.items.[INDEX].op","typeLabel":"enum\u003cstring>"},"path":{"type":"string","pattern":"^\\/nodes\\/[a-z][a-z0-9_]*(\\/[^/]*)*$","isRequired":true,"uniqueKey":"suggestion.oneOf.0.diff.items.[INDEX].path","typeLabel":"string"},"before":{"oneOf":[{}],"uniqueKey":"suggestion.oneOf.0.diff.items.[INDEX].before","typeLabel":"any"},"after":{"oneOf":[{}],"uniqueKey":"suggestion.oneOf.0.diff.items.[INDEX].after","typeLabel":"any"}},"required":["op","path"],"additionalProperties":false,"uniqueKey":"suggestion.oneOf.0.diff.items.[INDEX]","typeLabel":"object"},"isRequired":true,"uniqueKey":"suggestion.oneOf.0.diff","typeLabel":"object[]"},"evidence":{"type":"object","properties":{"label":{"type":"string","enum":["starting_examples","training_cases","holdout"],"isRequired":true,"uniqueKey":"suggestion.oneOf.0.evidence.label","typeLabel":"enum\u003cstring>"},"frozen_at":{"type":"string","format":"date-time","isRequired":true,"uniqueKey":"suggestion.oneOf.0.evidence.frozen_at","typeLabel":"string\u003cdate-time>"},"by_split":{"type":"object","properties":{"seed":{"type":"object","properties":{"n":{"type":"integer","minimum":0,"isRequired":true,"uniqueKey":"suggestion.oneOf.0.evidence.by_split.seed.n","typeLabel":"integer"},"fixes":{"type":"integer","minimum":0,"isRequired":true,"uniqueKey":"suggestion.oneOf.0.evidence.by_split.seed.fixes","typeLabel":"integer"},"breaks":{"type":"integer","minimum":0,"isRequired":true,"uniqueKey":"suggestion.oneOf.0.evidence.by_split.seed.breaks","typeLabel":"integer"},"base_correct":{"type":"integer","minimum":0,"isRequired":true,"uniqueKey":"suggestion.oneOf.0.evidence.by_split.seed.base_correct","typeLabel":"integer"},"candidate_correct":{"type":"integer","minimum":0,"isRequired":true,"uniqueKey":"suggestion.oneOf.0.evidence.by_split.seed.candidate_correct","typeLabel":"integer"},"holdout_uses":{"type":"integer","minimum":0,"uniqueKey":"suggestion.oneOf.0.evidence.by_split.seed.holdout_uses","typeLabel":"integer"},"owner_decided":{"type":"integer","minimum":0,"uniqueKey":"suggestion.oneOf.0.evidence.by_split.seed.owner_decided","typeLabel":"integer"}},"required":["n","fixes","breaks","base_correct","candidate_correct"],"additionalProperties":false,"uniqueKey":"suggestion.oneOf.0.evidence.by_split.seed","typeLabel":"object"},"train":{"type":"object","properties":{"n":{"type":"integer","minimum":0,"isRequired":true,"uniqueKey":"suggestion.oneOf.0.evidence.by_split.train.n","typeLabel":"integer"},"fixes":{"type":"integer","minimum":0,"isRequired":true,"uniqueKey":"suggestion.oneOf.0.evidence.by_split.train.fixes","typeLabel":"integer"},"breaks":{"type":"integer","minimum":0,"isRequired":true,"uniqueKey":"suggestion.oneOf.0.evidence.by_split.train.breaks","typeLabel":"integer"},"base_correct":{"type":"integer","minimum":0,"isRequired":true,"uniqueKey":"suggestion.oneOf.0.evidence.by_split.train.base_correct","typeLabel":"integer"},"candidate_correct":{"type":"integer","minimum":0,"isRequired":true,"uniqueKey":"suggestion.oneOf.0.evidence.by_split.train.candidate_correct","typeLabel":"integer"},"holdout_uses":{"type":"integer","minimum":0,"uniqueKey":"suggestion.oneOf.0.evidence.by_split.train.holdout_uses","typeLabel":"integer"},"owner_decided":{"type":"integer","minimum":0,"uniqueKey":"suggestion.oneOf.0.evidence.by_split.train.owner_decided","typeLabel":"integer"}},"required":["n","fixes","breaks","base_correct","candidate_correct"],"additionalProperties":false,"uniqueKey":"suggestion.oneOf.0.evidence.by_split.train","typeLabel":"object"},"holdout":{"type":"object","properties":{"n":{"type":"integer","minimum":0,"isRequired":true,"uniqueKey":"suggestion.oneOf.0.evidence.by_split.holdout.n","typeLabel":"integer"},"fixes":{"type":"integer","minimum":0,"isRequired":true,"uniqueKey":"suggestion.oneOf.0.evidence.by_split.holdout.fixes","typeLabel":"integer"},"breaks":{"type":"integer","minimum":0,"isRequired":true,"uniqueKey":"suggestion.oneOf.0.evidence.by_split.holdout.breaks","typeLabel":"integer"},"base_correct":{"type":"integer","minimum":0,"isRequired":true,"uniqueKey":"suggestion.oneOf.0.evidence.by_split.holdout.base_correct","typeLabel":"integer"},"candidate_correct":{"type":"integer","minimum":0,"isRequired":true,"uniqueKey":"suggestion.oneOf.0.evidence.by_split.holdout.candidate_correct","typeLabel":"integer"},"holdout_uses":{"type":"integer","minimum":0,"uniqueKey":"suggestion.oneOf.0.evidence.by_split.holdout.holdout_uses","typeLabel":"integer"},"owner_decided":{"type":"integer","minimum":0,"uniqueKey":"suggestion.oneOf.0.evidence.by_split.holdout.owner_decided","typeLabel":"integer"}},"required":["n","fixes","breaks","base_correct","candidate_correct"],"additionalProperties":false,"uniqueKey":"suggestion.oneOf.0.evidence.by_split.holdout","typeLabel":"object"}},"additionalProperties":false,"isRequired":true,"uniqueKey":"suggestion.oneOf.0.evidence.by_split","typeLabel":"object"},"noise_rate":{"oneOf":[{"type":"number","minimum":0,"maximum":1,"isRequired":true,"uniqueKey":"suggestion.oneOf.0.evidence.noise_rate.oneOf.0","typeLabel":"number"},{"type":"null","minimum":0,"maximum":1,"isRequired":true,"uniqueKey":"suggestion.oneOf.0.evidence.noise_rate.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"suggestion.oneOf.0.evidence.noise_rate","typeLabel":"number | null"},"action_mix":{"oneOf":[{"type":"object","required":["before","after","on","n"],"properties":{"before":{"type":"object","additionalProperties":{"type":"number","minimum":0,"maximum":1,"uniqueKey":"suggestion.oneOf.0.evidence.action_mix.oneOf.0.before.additionalProperties","typeLabel":"number"},"isRequired":true,"uniqueKey":"suggestion.oneOf.0.evidence.action_mix.oneOf.0.before","typeLabel":"object"},"after":{"type":"object","additionalProperties":{"type":"number","minimum":0,"maximum":1,"uniqueKey":"suggestion.oneOf.0.evidence.action_mix.oneOf.0.after.additionalProperties","typeLabel":"number"},"isRequired":true,"uniqueKey":"suggestion.oneOf.0.evidence.action_mix.oneOf.0.after","typeLabel":"object"},"on":{"type":"string","isRequired":true,"uniqueKey":"suggestion.oneOf.0.evidence.action_mix.oneOf.0.on","typeLabel":"string"},"n":{"type":"integer","minimum":0,"isRequired":true,"uniqueKey":"suggestion.oneOf.0.evidence.action_mix.oneOf.0.n","typeLabel":"integer"}},"additionalProperties":false,"isRequired":true,"uniqueKey":"suggestion.oneOf.0.evidence.action_mix.oneOf.0","typeLabel":"object"},{"type":"null","isRequired":true,"uniqueKey":"suggestion.oneOf.0.evidence.action_mix.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"suggestion.oneOf.0.evidence.action_mix","typeLabel":"object | null"},"changed_items":{"type":"array","items":{"type":"object","properties":{"evaluation_id":{"type":"string","pattern":"^evl_[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$","isRequired":true,"uniqueKey":"suggestion.oneOf.0.evidence.changed_items.items.[INDEX].evaluation_id","typeLabel":"string"},"feedback_id":{"type":"string","pattern":"^fbk_[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$","isRequired":true,"uniqueKey":"suggestion.oneOf.0.evidence.changed_items.items.[INDEX].feedback_id","typeLabel":"string"},"split":{"type":"string","enum":["seed","train","holdout","burned"],"isRequired":true,"uniqueKey":"suggestion.oneOf.0.evidence.changed_items.items.[INDEX].split","typeLabel":"enum\u003cstring>"},"change":{"type":"string","enum":["fix","break"],"isRequired":true,"uniqueKey":"suggestion.oneOf.0.evidence.changed_items.items.[INDEX].change","typeLabel":"enum\u003cstring>"},"before":{"type":"object","properties":{"features":{"type":"object","additionalProperties":{"oneOf":[{"type":"number","minimum":0,"maximum":1,"uniqueKey":"suggestion.oneOf.0.evidence.changed_items.items.[INDEX].before.features.additionalProperties.oneOf.0","typeLabel":"number"},{"type":"null","minimum":0,"maximum":1,"uniqueKey":"suggestion.oneOf.0.evidence.changed_items.items.[INDEX].before.features.additionalProperties.oneOf.1","typeLabel":"null"}],"uniqueKey":"suggestion.oneOf.0.evidence.changed_items.items.[INDEX].before.features.additionalProperties","typeLabel":"number | null"},"isRequired":true,"uniqueKey":"suggestion.oneOf.0.evidence.changed_items.items.[INDEX].before.features","typeLabel":"object"},"outcome":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,63}$","uniqueKey":"suggestion.oneOf.0.evidence.changed_items.items.[INDEX].before.outcome","typeLabel":"string"},"score":{"type":"number","uniqueKey":"suggestion.oneOf.0.evidence.changed_items.items.[INDEX].before.score","typeLabel":"number"}},"required":["features"],"additionalProperties":false,"isRequired":true,"uniqueKey":"suggestion.oneOf.0.evidence.changed_items.items.[INDEX].before","typeLabel":"object"},"after":{"type":"object","properties":{"features":{"type":"object","additionalProperties":{"oneOf":[{"type":"number","minimum":0,"maximum":1,"uniqueKey":"suggestion.oneOf.0.evidence.changed_items.items.[INDEX].after.features.additionalProperties.oneOf.0","typeLabel":"number"},{"type":"null","minimum":0,"maximum":1,"uniqueKey":"suggestion.oneOf.0.evidence.changed_items.items.[INDEX].after.features.additionalProperties.oneOf.1","typeLabel":"null"}],"uniqueKey":"suggestion.oneOf.0.evidence.changed_items.items.[INDEX].after.features.additionalProperties","typeLabel":"number | null"},"isRequired":true,"uniqueKey":"suggestion.oneOf.0.evidence.changed_items.items.[INDEX].after.features","typeLabel":"object"},"outcome":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,63}$","uniqueKey":"suggestion.oneOf.0.evidence.changed_items.items.[INDEX].after.outcome","typeLabel":"string"},"score":{"type":"number","uniqueKey":"suggestion.oneOf.0.evidence.changed_items.items.[INDEX].after.score","typeLabel":"number"}},"required":["features"],"additionalProperties":false,"isRequired":true,"uniqueKey":"suggestion.oneOf.0.evidence.changed_items.items.[INDEX].after","typeLabel":"object"}},"required":["evaluation_id","feedback_id","split","change","before","after"],"additionalProperties":false,"uniqueKey":"suggestion.oneOf.0.evidence.changed_items.items.[INDEX]","typeLabel":"object"},"isRequired":true,"uniqueKey":"suggestion.oneOf.0.evidence.changed_items","typeLabel":"object[]"},"credited_feedback":{"type":"array","items":{"type":"string","pattern":"^fbk_[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$","uniqueKey":"suggestion.oneOf.0.evidence.credited_feedback.items.[INDEX]","typeLabel":"string"},"isRequired":true,"uniqueKey":"suggestion.oneOf.0.evidence.credited_feedback","typeLabel":"string[]"},"by_source":{"type":"object","properties":{"app_native":{"type":"object","properties":{"n":{"type":"integer","minimum":0,"isRequired":true,"uniqueKey":"suggestion.oneOf.0.evidence.by_source.app_native.n","typeLabel":"integer"},"fixes":{"type":"integer","minimum":0,"isRequired":true,"uniqueKey":"suggestion.oneOf.0.evidence.by_source.app_native.fixes","typeLabel":"integer"},"breaks":{"type":"integer","minimum":0,"isRequired":true,"uniqueKey":"suggestion.oneOf.0.evidence.by_source.app_native.breaks","typeLabel":"integer"},"base_correct":{"type":"integer","minimum":0,"isRequired":true,"uniqueKey":"suggestion.oneOf.0.evidence.by_source.app_native.base_correct","typeLabel":"integer"},"candidate_correct":{"type":"integer","minimum":0,"isRequired":true,"uniqueKey":"suggestion.oneOf.0.evidence.by_source.app_native.candidate_correct","typeLabel":"integer"},"holdout_uses":{"type":"integer","minimum":0,"uniqueKey":"suggestion.oneOf.0.evidence.by_source.app_native.holdout_uses","typeLabel":"integer"},"owner_decided":{"type":"integer","minimum":0,"uniqueKey":"suggestion.oneOf.0.evidence.by_source.app_native.owner_decided","typeLabel":"integer"}},"required":["n","fixes","breaks","base_correct","candidate_correct"],"additionalProperties":false,"uniqueKey":"suggestion.oneOf.0.evidence.by_source.app_native","typeLabel":"object"},"app_resolution":{"type":"object","properties":{"n":{"type":"integer","minimum":0,"isRequired":true,"uniqueKey":"suggestion.oneOf.0.evidence.by_source.app_resolution.n","typeLabel":"integer"},"fixes":{"type":"integer","minimum":0,"isRequired":true,"uniqueKey":"suggestion.oneOf.0.evidence.by_source.app_resolution.fixes","typeLabel":"integer"},"breaks":{"type":"integer","minimum":0,"isRequired":true,"uniqueKey":"suggestion.oneOf.0.evidence.by_source.app_resolution.breaks","typeLabel":"integer"},"base_correct":{"type":"integer","minimum":0,"isRequired":true,"uniqueKey":"suggestion.oneOf.0.evidence.by_source.app_resolution.base_correct","typeLabel":"integer"},"candidate_correct":{"type":"integer","minimum":0,"isRequired":true,"uniqueKey":"suggestion.oneOf.0.evidence.by_source.app_resolution.candidate_correct","typeLabel":"integer"},"holdout_uses":{"type":"integer","minimum":0,"uniqueKey":"suggestion.oneOf.0.evidence.by_source.app_resolution.holdout_uses","typeLabel":"integer"},"owner_decided":{"type":"integer","minimum":0,"uniqueKey":"suggestion.oneOf.0.evidence.by_source.app_resolution.owner_decided","typeLabel":"integer"}},"required":["n","fixes","breaks","base_correct","candidate_correct"],"additionalProperties":false,"uniqueKey":"suggestion.oneOf.0.evidence.by_source.app_resolution","typeLabel":"object"},"reviewer":{"type":"object","properties":{"n":{"type":"integer","minimum":0,"isRequired":true,"uniqueKey":"suggestion.oneOf.0.evidence.by_source.reviewer.n","typeLabel":"integer"},"fixes":{"type":"integer","minimum":0,"isRequired":true,"uniqueKey":"suggestion.oneOf.0.evidence.by_source.reviewer.fixes","typeLabel":"integer"},"breaks":{"type":"integer","minimum":0,"isRequired":true,"uniqueKey":"suggestion.oneOf.0.evidence.by_source.reviewer.breaks","typeLabel":"integer"},"base_correct":{"type":"integer","minimum":0,"isRequired":true,"uniqueKey":"suggestion.oneOf.0.evidence.by_source.reviewer.base_correct","typeLabel":"integer"},"candidate_correct":{"type":"integer","minimum":0,"isRequired":true,"uniqueKey":"suggestion.oneOf.0.evidence.by_source.reviewer.candidate_correct","typeLabel":"integer"},"holdout_uses":{"type":"integer","minimum":0,"uniqueKey":"suggestion.oneOf.0.evidence.by_source.reviewer.holdout_uses","typeLabel":"integer"},"owner_decided":{"type":"integer","minimum":0,"uniqueKey":"suggestion.oneOf.0.evidence.by_source.reviewer.owner_decided","typeLabel":"integer"}},"required":["n","fixes","breaks","base_correct","candidate_correct"],"additionalProperties":false,"uniqueKey":"suggestion.oneOf.0.evidence.by_source.reviewer","typeLabel":"object"},"owner":{"type":"object","properties":{"n":{"type":"integer","minimum":0,"isRequired":true,"uniqueKey":"suggestion.oneOf.0.evidence.by_source.owner.n","typeLabel":"integer"},"fixes":{"type":"integer","minimum":0,"isRequired":true,"uniqueKey":"suggestion.oneOf.0.evidence.by_source.owner.fixes","typeLabel":"integer"},"breaks":{"type":"integer","minimum":0,"isRequired":true,"uniqueKey":"suggestion.oneOf.0.evidence.by_source.owner.breaks","typeLabel":"integer"},"base_correct":{"type":"integer","minimum":0,"isRequired":true,"uniqueKey":"suggestion.oneOf.0.evidence.by_source.owner.base_correct","typeLabel":"integer"},"candidate_correct":{"type":"integer","minimum":0,"isRequired":true,"uniqueKey":"suggestion.oneOf.0.evidence.by_source.owner.candidate_correct","typeLabel":"integer"},"holdout_uses":{"type":"integer","minimum":0,"uniqueKey":"suggestion.oneOf.0.evidence.by_source.owner.holdout_uses","typeLabel":"integer"},"owner_decided":{"type":"integer","minimum":0,"uniqueKey":"suggestion.oneOf.0.evidence.by_source.owner.owner_decided","typeLabel":"integer"}},"required":["n","fixes","breaks","base_correct","candidate_correct"],"additionalProperties":false,"uniqueKey":"suggestion.oneOf.0.evidence.by_source.owner","typeLabel":"object"},"import":{"type":"object","properties":{"n":{"type":"integer","minimum":0,"isRequired":true,"uniqueKey":"suggestion.oneOf.0.evidence.by_source.import.n","typeLabel":"integer"},"fixes":{"type":"integer","minimum":0,"isRequired":true,"uniqueKey":"suggestion.oneOf.0.evidence.by_source.import.fixes","typeLabel":"integer"},"breaks":{"type":"integer","minimum":0,"isRequired":true,"uniqueKey":"suggestion.oneOf.0.evidence.by_source.import.breaks","typeLabel":"integer"},"base_correct":{"type":"integer","minimum":0,"isRequired":true,"uniqueKey":"suggestion.oneOf.0.evidence.by_source.import.base_correct","typeLabel":"integer"},"candidate_correct":{"type":"integer","minimum":0,"isRequired":true,"uniqueKey":"suggestion.oneOf.0.evidence.by_source.import.candidate_correct","typeLabel":"integer"},"holdout_uses":{"type":"integer","minimum":0,"uniqueKey":"suggestion.oneOf.0.evidence.by_source.import.holdout_uses","typeLabel":"integer"},"owner_decided":{"type":"integer","minimum":0,"uniqueKey":"suggestion.oneOf.0.evidence.by_source.import.owner_decided","typeLabel":"integer"}},"required":["n","fixes","breaks","base_correct","candidate_correct"],"additionalProperties":false,"uniqueKey":"suggestion.oneOf.0.evidence.by_source.import","typeLabel":"object"},"synthetic_review":{"type":"object","properties":{"n":{"type":"integer","minimum":0,"isRequired":true,"uniqueKey":"suggestion.oneOf.0.evidence.by_source.synthetic_review.n","typeLabel":"integer"},"fixes":{"type":"integer","minimum":0,"isRequired":true,"uniqueKey":"suggestion.oneOf.0.evidence.by_source.synthetic_review.fixes","typeLabel":"integer"},"breaks":{"type":"integer","minimum":0,"isRequired":true,"uniqueKey":"suggestion.oneOf.0.evidence.by_source.synthetic_review.breaks","typeLabel":"integer"},"base_correct":{"type":"integer","minimum":0,"isRequired":true,"uniqueKey":"suggestion.oneOf.0.evidence.by_source.synthetic_review.base_correct","typeLabel":"integer"},"candidate_correct":{"type":"integer","minimum":0,"isRequired":true,"uniqueKey":"suggestion.oneOf.0.evidence.by_source.synthetic_review.candidate_correct","typeLabel":"integer"},"holdout_uses":{"type":"integer","minimum":0,"uniqueKey":"suggestion.oneOf.0.evidence.by_source.synthetic_review.holdout_uses","typeLabel":"integer"},"owner_decided":{"type":"integer","minimum":0,"uniqueKey":"suggestion.oneOf.0.evidence.by_source.synthetic_review.owner_decided","typeLabel":"integer"}},"required":["n","fixes","breaks","base_correct","candidate_correct"],"additionalProperties":false,"uniqueKey":"suggestion.oneOf.0.evidence.by_source.synthetic_review","typeLabel":"object"}},"uniqueKey":"suggestion.oneOf.0.evidence.by_source","typeLabel":"object"}},"required":["label","frozen_at","by_split","noise_rate","action_mix","changed_items","credited_feedback"],"additionalProperties":false,"isRequired":true,"uniqueKey":"suggestion.oneOf.0.evidence","typeLabel":"object"},"preview_id":{"type":"string","pattern":"^run_[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$","isRequired":true,"uniqueKey":"suggestion.oneOf.0.preview_id","typeLabel":"string"},"generator":{"type":"object","properties":{"name":{"type":"string","minLength":1,"isRequired":true,"uniqueKey":"suggestion.oneOf.0.generator.name","typeLabel":"string"},"version":{"type":"string","minLength":1,"isRequired":true,"uniqueKey":"suggestion.oneOf.0.generator.version","typeLabel":"string"},"model":{"type":"string","uniqueKey":"suggestion.oneOf.0.generator.model","typeLabel":"string"}},"required":["name","version"],"additionalProperties":false,"isRequired":true,"uniqueKey":"suggestion.oneOf.0.generator","typeLabel":"object"},"status":{"type":"string","enum":["proposed","pulled","accepted","rejected","superseded"],"isRequired":true,"uniqueKey":"suggestion.oneOf.0.status","typeLabel":"enum\u003cstring>"},"created_at":{"type":"string","format":"date-time","isRequired":true,"uniqueKey":"suggestion.oneOf.0.created_at","typeLabel":"string\u003cdate-time>"},"status_at":{"type":"string","format":"date-time","uniqueKey":"suggestion.oneOf.0.status_at","typeLabel":"string\u003cdate-time>"},"rejection_reason":{"type":"string","uniqueKey":"suggestion.oneOf.0.rejection_reason","typeLabel":"string"},"accepted_evaluation_id":{"type":"string","pattern":"^evl_[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$","uniqueKey":"suggestion.oneOf.0.accepted_evaluation_id","typeLabel":"string"},"accepted_at":{"type":"string","format":"date-time","uniqueKey":"suggestion.oneOf.0.accepted_at","typeLabel":"string\u003cdate-time>"},"stale":{"type":"object","properties":{"reason":{"type":"string","isRequired":true,"uniqueKey":"suggestion.oneOf.0.stale.reason","typeLabel":"string"},"cases":{"type":"integer","minimum":1,"description":"How many of its evaluated cases have changed feedback.","isRequired":true,"uniqueKey":"suggestion.oneOf.0.stale.cases","typeLabel":"integer"}},"required":["reason","cases"],"additionalProperties":false,"description":"Present when feedback on cases this suggestion was evaluated on changed after its evidence was read: an answer it read was changed, withdrawn or corrected, or the owner, a reviewer or a seed judged one of its cases since, or any feedback since marked one's input as broken. Its evidence is as it was then; preview it again before relying on it.","uniqueKey":"suggestion.oneOf.0.stale","typeLabel":"object"}},"additionalProperties":false,"isRequired":true,"uniqueKey":"suggestion.oneOf.0","typeLabel":"object"},{"type":"null","isRequired":true,"uniqueKey":"suggestion.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"suggestion","typeLabel":"object | null"},"reason":{"type":"string","uniqueKey":"reason","typeLabel":"string"}},"required":["environment","suggestion"],"additionalProperties":false,"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"environment":"production","suggestion":{"id":"\u003cstring>","decision_id":"\u003cstring>","kind":"feature_rewrite","target":"structure","summary":"\u003cstring>","environment":"production","base":{"structure":"\u003cstring>","weights":"\u003cstring>","engine_profile":"\u003cstring>"},"candidate":{"structure":"\u003cstring>","weights":"\u003cstring>","engine_profile":"\u003cstring>","weights_pin":"default"},"requires":["\u003cstring>"],"candidate_spec":{"format":"moonbounce.spec/0","nodes":{},"output":"\u003cstring>","guidance":"\u003cstring>","target":"\u003cstring>","meta":{"title":"\u003cstring>","description":"\u003cstring>","owner":"\u003cstring>","tags":["\u003cstring>"],"display":{}}},"diff":[{"op":"replace","path":"\u003cstring>","before":"\u003cunknown>","after":"\u003cunknown>"}],"evidence":{"label":"starting_examples","frozen_at":"2023-11-07T05:31:56Z","by_split":{"seed":{"n":1,"fixes":1,"breaks":1,"base_correct":1,"candidate_correct":1,"holdout_uses":1,"owner_decided":1},"train":{"n":1,"fixes":1,"breaks":1,"base_correct":1,"candidate_correct":1,"holdout_uses":1,"owner_decided":1},"holdout":{"n":1,"fixes":1,"breaks":1,"base_correct":1,"candidate_correct":1,"holdout_uses":1,"owner_decided":1}},"noise_rate":0.5,"action_mix":{"before":{},"after":{},"on":"\u003cstring>","n":1},"changed_items":[{"evaluation_id":"\u003cstring>","feedback_id":"\u003cstring>","split":"seed","change":"fix","before":{"features":{},"outcome":"\u003cstring>","score":123},"after":{"features":{},"outcome":"\u003cstring>","score":123}}],"credited_feedback":["\u003cstring>"],"by_source":{"app_native":{"n":1,"fixes":1,"breaks":1,"base_correct":1,"candidate_correct":1,"holdout_uses":1,"owner_decided":1},"app_resolution":{"n":1,"fixes":1,"breaks":1,"base_correct":1,"candidate_correct":1,"holdout_uses":1,"owner_decided":1},"reviewer":{"n":1,"fixes":1,"breaks":1,"base_correct":1,"candidate_correct":1,"holdout_uses":1,"owner_decided":1},"owner":{"n":1,"fixes":1,"breaks":1,"base_correct":1,"candidate_correct":1,"holdout_uses":1,"owner_decided":1},"import":{"n":1,"fixes":1,"breaks":1,"base_correct":1,"candidate_correct":1,"holdout_uses":1,"owner_decided":1},"synthetic_review":{"n":1,"fixes":1,"breaks":1,"base_correct":1,"candidate_correct":1,"holdout_uses":1,"owner_decided":1}}},"preview_id":"\u003cstring>","generator":{"name":"\u003cstring>","version":"\u003cstring>","model":"\u003cstring>"},"status":"proposed","created_at":"2023-11-07T05:31:56Z","status_at":"2023-11-07T05:31:56Z","rejection_reason":"\u003cstring>","accepted_evaluation_id":"\u003cstring>","accepted_at":"2023-11-07T05:31:56Z","stale":{"reason":"\u003cstring>","cases":2}},"reason":"\u003cstring>"}}},"exampleType":"generated"}},"exampleType":"generated"},"34ca0e72-e607-4aa6-9067-455e082d10b1":{"description":"Invalid request: `param` names the field at fault when one applies","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request","authentication","permission_denied","not_found","conflict","rate_limited","engine_failed","unavailable","internal"],"isRequired":true,"uniqueKey":"error.type","typeLabel":"enum\u003cstring>"},"message":{"type":"string","description":"For people; don't parse it.","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"reason":{"type":"string","pattern":"^[A-Z][A-Z0-9_]+$","description":"Set where a caller can act on it, one of the reasons in the ErrorReason schema. New reasons may be added: treat an unknown one by the status and `type`.","uniqueKey":"error.reason","typeLabel":"string"},"param":{"type":"string","description":"The request field at fault, as a dotted path (`subject.0.text`, `claims.1.value`).","uniqueKey":"error.param","typeLabel":"string"},"details":{"type":"object","additionalProperties":{"oneOf":[{}],"uniqueKey":"error.details.additionalProperties","typeLabel":"any"},"uniqueKey":"error.details","typeLabel":"object"}},"required":["type","message"],"additionalProperties":false,"isRequired":true,"uniqueKey":"error","typeLabel":"object"}},"required":["error"],"additionalProperties":false,"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"error":{"type":"invalid_request","message":"\u003cstring>","reason":"\u003cstring>","param":"\u003cstring>","details":{}}}}},"exampleType":"generated"}},"exampleType":"generated"},"f3f1ab11-b3e4-44f2-8617-bafe45146167":{"description":"Missing or invalid API key (reason KEY_INVALID)","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request","authentication","permission_denied","not_found","conflict","rate_limited","engine_failed","unavailable","internal"],"isRequired":true,"uniqueKey":"error.type","typeLabel":"enum\u003cstring>"},"message":{"type":"string","description":"For people; don't parse it.","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"reason":{"type":"string","pattern":"^[A-Z][A-Z0-9_]+$","description":"Set where a caller can act on it, one of the reasons in the ErrorReason schema. New reasons may be added: treat an unknown one by the status and `type`.","uniqueKey":"error.reason","typeLabel":"string"},"param":{"type":"string","description":"The request field at fault, as a dotted path (`subject.0.text`, `claims.1.value`).","uniqueKey":"error.param","typeLabel":"string"},"details":{"type":"object","additionalProperties":{"oneOf":[{}],"uniqueKey":"error.details.additionalProperties","typeLabel":"any"},"uniqueKey":"error.details","typeLabel":"object"}},"required":["type","message"],"additionalProperties":false,"isRequired":true,"uniqueKey":"error","typeLabel":"object"}},"required":["error"],"additionalProperties":false,"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"error":{"type":"invalid_request","message":"\u003cstring>","reason":"\u003cstring>","param":"\u003cstring>","details":{}}}}},"exampleType":"generated"}},"exampleType":"generated"},"7fe340ff-b738-496b-9ecc-bd8e002c24aa":{"description":"The key may not do this","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request","authentication","permission_denied","not_found","conflict","rate_limited","engine_failed","unavailable","internal"],"isRequired":true,"uniqueKey":"error.type","typeLabel":"enum\u003cstring>"},"message":{"type":"string","description":"For people; don't parse it.","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"reason":{"type":"string","pattern":"^[A-Z][A-Z0-9_]+$","description":"Set where a caller can act on it, one of the reasons in the ErrorReason schema. New reasons may be added: treat an unknown one by the status and `type`.","uniqueKey":"error.reason","typeLabel":"string"},"param":{"type":"string","description":"The request field at fault, as a dotted path (`subject.0.text`, `claims.1.value`).","uniqueKey":"error.param","typeLabel":"string"},"details":{"type":"object","additionalProperties":{"oneOf":[{}],"uniqueKey":"error.details.additionalProperties","typeLabel":"any"},"uniqueKey":"error.details","typeLabel":"object"}},"required":["type","message"],"additionalProperties":false,"isRequired":true,"uniqueKey":"error","typeLabel":"object"}},"required":["error"],"additionalProperties":false,"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"error":{"type":"invalid_request","message":"\u003cstring>","reason":"\u003cstring>","param":"\u003cstring>","details":{}}}}},"exampleType":"generated"}},"exampleType":"generated"},"6ff7d7f3-f2b7-4d88-bd36-a52acf5f7374":{"description":"Not found, or not in this key's organization and environment","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request","authentication","permission_denied","not_found","conflict","rate_limited","engine_failed","unavailable","internal"],"isRequired":true,"uniqueKey":"error.type","typeLabel":"enum\u003cstring>"},"message":{"type":"string","description":"For people; don't parse it.","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"reason":{"type":"string","pattern":"^[A-Z][A-Z0-9_]+$","description":"Set where a caller can act on it, one of the reasons in the ErrorReason schema. New reasons may be added: treat an unknown one by the status and `type`.","uniqueKey":"error.reason","typeLabel":"string"},"param":{"type":"string","description":"The request field at fault, as a dotted path (`subject.0.text`, `claims.1.value`).","uniqueKey":"error.param","typeLabel":"string"},"details":{"type":"object","additionalProperties":{"oneOf":[{}],"uniqueKey":"error.details.additionalProperties","typeLabel":"any"},"uniqueKey":"error.details","typeLabel":"object"}},"required":["type","message"],"additionalProperties":false,"isRequired":true,"uniqueKey":"error","typeLabel":"object"}},"required":["error"],"additionalProperties":false,"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"error":{"type":"invalid_request","message":"\u003cstring>","reason":"\u003cstring>","param":"\u003cstring>","details":{}}}}},"exampleType":"generated"}},"exampleType":"generated"},"3360c9c3-cf07-4a5b-b68c-69fc0dcaca7c":{"description":"Conflict with the current state","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request","authentication","permission_denied","not_found","conflict","rate_limited","engine_failed","unavailable","internal"],"isRequired":true,"uniqueKey":"error.type","typeLabel":"enum\u003cstring>"},"message":{"type":"string","description":"For people; don't parse it.","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"reason":{"type":"string","pattern":"^[A-Z][A-Z0-9_]+$","description":"Set where a caller can act on it, one of the reasons in the ErrorReason schema. New reasons may be added: treat an unknown one by the status and `type`.","uniqueKey":"error.reason","typeLabel":"string"},"param":{"type":"string","description":"The request field at fault, as a dotted path (`subject.0.text`, `claims.1.value`).","uniqueKey":"error.param","typeLabel":"string"},"details":{"type":"object","additionalProperties":{"oneOf":[{}],"uniqueKey":"error.details.additionalProperties","typeLabel":"any"},"uniqueKey":"error.details","typeLabel":"object"}},"required":["type","message"],"additionalProperties":false,"isRequired":true,"uniqueKey":"error","typeLabel":"object"}},"required":["error"],"additionalProperties":false,"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"error":{"type":"invalid_request","message":"\u003cstring>","reason":"\u003cstring>","param":"\u003cstring>","details":{}}}}},"exampleType":"generated"}},"exampleType":"generated"},"63563dc7-09d7-4a63-85c5-8dbc305a0724":{"description":"The Idempotency-Key's first result was deleted, so it cannot be replayed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request","authentication","permission_denied","not_found","conflict","rate_limited","engine_failed","unavailable","internal"],"isRequired":true,"uniqueKey":"error.type","typeLabel":"enum\u003cstring>"},"message":{"type":"string","description":"For people; don't parse it.","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"reason":{"type":"string","pattern":"^[A-Z][A-Z0-9_]+$","description":"Set where a caller can act on it, one of the reasons in the ErrorReason schema. New reasons may be added: treat an unknown one by the status and `type`.","uniqueKey":"error.reason","typeLabel":"string"},"param":{"type":"string","description":"The request field at fault, as a dotted path (`subject.0.text`, `claims.1.value`).","uniqueKey":"error.param","typeLabel":"string"},"details":{"type":"object","additionalProperties":{"oneOf":[{}],"uniqueKey":"error.details.additionalProperties","typeLabel":"any"},"uniqueKey":"error.details","typeLabel":"object"}},"required":["type","message"],"additionalProperties":false,"isRequired":true,"uniqueKey":"error","typeLabel":"object"}},"required":["error"],"additionalProperties":false,"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"error":{"type":"invalid_request","message":"\u003cstring>","reason":"\u003cstring>","param":"\u003cstring>","details":{}}}}},"exampleType":"generated"}},"exampleType":"generated"},"e25499c4-08d0-4eb1-af17-5549672075a2":{"description":"The request is well formed but cannot be processed (for example reason IDEMPOTENCY_KEY_REUSED)","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request","authentication","permission_denied","not_found","conflict","rate_limited","engine_failed","unavailable","internal"],"isRequired":true,"uniqueKey":"error.type","typeLabel":"enum\u003cstring>"},"message":{"type":"string","description":"For people; don't parse it.","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"reason":{"type":"string","pattern":"^[A-Z][A-Z0-9_]+$","description":"Set where a caller can act on it, one of the reasons in the ErrorReason schema. New reasons may be added: treat an unknown one by the status and `type`.","uniqueKey":"error.reason","typeLabel":"string"},"param":{"type":"string","description":"The request field at fault, as a dotted path (`subject.0.text`, `claims.1.value`).","uniqueKey":"error.param","typeLabel":"string"},"details":{"type":"object","additionalProperties":{"oneOf":[{}],"uniqueKey":"error.details.additionalProperties","typeLabel":"any"},"uniqueKey":"error.details","typeLabel":"object"}},"required":["type","message"],"additionalProperties":false,"isRequired":true,"uniqueKey":"error","typeLabel":"object"}},"required":["error"],"additionalProperties":false,"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"error":{"type":"invalid_request","message":"\u003cstring>","reason":"\u003cstring>","param":"\u003cstring>","details":{}}}}},"exampleType":"generated"}},"exampleType":"generated"},"0c6d4098-5087-4944-9241-22743f90ccde":{"description":"RATE_LIMITED: retry after Retry-After seconds; QUOTA_EXCEEDED: details.reset_at gives the daily reset time (no Retry-After), or details.too_large asks for a smaller request","headers":{"Retry-After":{"schema":{"type":"string","description":"Seconds to wait before retrying, when waiting helps."},"required":false,"description":"Seconds to wait before retrying, when waiting helps."}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request","authentication","permission_denied","not_found","conflict","rate_limited","engine_failed","unavailable","internal"],"isRequired":true,"uniqueKey":"error.type","typeLabel":"enum\u003cstring>"},"message":{"type":"string","description":"For people; don't parse it.","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"reason":{"type":"string","pattern":"^[A-Z][A-Z0-9_]+$","description":"Set where a caller can act on it, one of the reasons in the ErrorReason schema. New reasons may be added: treat an unknown one by the status and `type`.","uniqueKey":"error.reason","typeLabel":"string"},"param":{"type":"string","description":"The request field at fault, as a dotted path (`subject.0.text`, `claims.1.value`).","uniqueKey":"error.param","typeLabel":"string"},"details":{"type":"object","additionalProperties":{"oneOf":[{}],"uniqueKey":"error.details.additionalProperties","typeLabel":"any"},"uniqueKey":"error.details","typeLabel":"object"}},"required":["type","message"],"additionalProperties":false,"isRequired":true,"uniqueKey":"error","typeLabel":"object"}},"required":["error"],"additionalProperties":false,"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"error":{"type":"invalid_request","message":"\u003cstring>","reason":"\u003cstring>","param":"\u003cstring>","details":{}}}}},"exampleType":"generated"}},"exampleType":"generated"},"f98ba71a-789c-4feb-a04f-b89429acd9e9":{"description":"An engine failed to answer a feature the output needs (type engine_failed, reason ENGINE_FAILED)","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request","authentication","permission_denied","not_found","conflict","rate_limited","engine_failed","unavailable","internal"],"isRequired":true,"uniqueKey":"error.type","typeLabel":"enum\u003cstring>"},"message":{"type":"string","description":"For people; don't parse it.","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"reason":{"type":"string","pattern":"^[A-Z][A-Z0-9_]+$","description":"Set where a caller can act on it, one of the reasons in the ErrorReason schema. New reasons may be added: treat an unknown one by the status and `type`.","uniqueKey":"error.reason","typeLabel":"string"},"param":{"type":"string","description":"The request field at fault, as a dotted path (`subject.0.text`, `claims.1.value`).","uniqueKey":"error.param","typeLabel":"string"},"details":{"type":"object","additionalProperties":{"oneOf":[{}],"uniqueKey":"error.details.additionalProperties","typeLabel":"any"},"uniqueKey":"error.details","typeLabel":"object"}},"required":["type","message"],"additionalProperties":false,"isRequired":true,"uniqueKey":"error","typeLabel":"object"}},"required":["error"],"additionalProperties":false,"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"error":{"type":"invalid_request","message":"\u003cstring>","reason":"\u003cstring>","param":"\u003cstring>","details":{}}}}},"exampleType":"generated"}},"exampleType":"generated"},"aa8d5074-9236-4265-8373-4bdc4c09a6fb":{"description":"Temporarily unavailable, with Retry-After (for example reason AUTH_UNAVAILABLE, ENGINE_UNAVAILABLE or STORE_UNAVAILABLE): retry with the same Idempotency-Key","headers":{"Retry-After":{"schema":{"type":"string","description":"Seconds to wait before retrying, when waiting helps."},"required":true,"description":"Seconds to wait before retrying, when waiting helps."}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request","authentication","permission_denied","not_found","conflict","rate_limited","engine_failed","unavailable","internal"],"isRequired":true,"uniqueKey":"error.type","typeLabel":"enum\u003cstring>"},"message":{"type":"string","description":"For people; don't parse it.","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"reason":{"type":"string","pattern":"^[A-Z][A-Z0-9_]+$","description":"Set where a caller can act on it, one of the reasons in the ErrorReason schema. New reasons may be added: treat an unknown one by the status and `type`.","uniqueKey":"error.reason","typeLabel":"string"},"param":{"type":"string","description":"The request field at fault, as a dotted path (`subject.0.text`, `claims.1.value`).","uniqueKey":"error.param","typeLabel":"string"},"details":{"type":"object","additionalProperties":{"oneOf":[{}],"uniqueKey":"error.details.additionalProperties","typeLabel":"any"},"uniqueKey":"error.details","typeLabel":"object"}},"required":["type","message"],"additionalProperties":false,"isRequired":true,"uniqueKey":"error","typeLabel":"object"}},"required":["error"],"additionalProperties":false,"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"error":{"type":"invalid_request","message":"\u003cstring>","reason":"\u003cstring>","param":"\u003cstring>","details":{}}}}},"exampleType":"generated"}},"exampleType":"generated"}},"security":{"1f8dd892-edb9-437a-a111-92ca1ddfe8aa":{"bearerAuth":{"type":"http","scheme":"bearer","description":"An API key, sent as `Authorization: Bearer \u003ckey>`. Each operation lists the scope its key needs: `decisions:evaluate` (evaluate and read evaluations), `decisions:feedback` (your app's feedback) or `decisions:develop` (everything else, including owner feedback and the review queue). An operation listing no scope takes any scoped key. A key with no scope, or without the operation's, gets 403 INSUFFICIENT_SCOPE.","scopes":["decisions:develop"],"schemeName":"bearerAuth"}}},"servers":{"9e61324b-4cc4-430d-a8d9-fa0221e50db5":{"url":"https://api.moonbounce.ai","description":"Production"}},"processedSecurityOptions":[{"schemes":[{"scheme":{"type":"http","scheme":"bearer","description":"An API key, sent as `Authorization: Bearer \u003ckey>`. Each operation lists the scope its key needs: `decisions:evaluate` (evaluate and read evaluations), `decisions:feedback` (your app's feedback) or `decisions:develop` (everything else, including owner feedback and the review queue). An operation listing no scope takes any scoped key. A key with no scope, or without the operation's, gets 403 INSUFFICIENT_SCOPE.","scopes":["decisions:develop"],"schemeName":"bearerAuth"},"schema":{"title":"Bearer Auth","type":"string","isRequired":true,"description":"An API key, sent as `Authorization: Bearer \u003ckey>`. Each operation lists the scope its key needs: `decisions:evaluate` (evaluate and read evaluations), `decisions:feedback` (your app's feedback) or `decisions:develop` (everything else, including owner feedback and the review queue). An operation listing no scope takes any scoped key. A key with no scope, or without the operation's, gets 403 INSUFFICIENT_SCOPE.","format":"bearer","typeLabel":"string\u003cbearer>","deprecated":false},"schemeName":"bearerAuth","name":"Authorization"}],"title":"bearerAuth"}]},"originalFileLocation":"openapi.json"},"subdomain":"moonbounce","siteName":"Moonbounce Decisions API","title":"Generate a suggestion on demand - Moonbounce Decisions API","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-11-02T20:55:04.108Z","originalFileLocation":"api-reference/suggestions/generate-a-suggestion-on-demand.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Proposes one change to the decision\u0026#x27;s spec from its feedback (a feature rewrite or a new feature), with its preview as evidence. suggestion is null when there is nothing worth proposing, and reason says why. The same candidate proposed earlier in the key\u0026#x27;s environment is returned instead of a duplicate. Everything is read in the key\u0026#x27;s environment: its feedback, cases and suggestions (a test key learns from test cases only). Without spec, the base is the version serving primary traffic in that environment (else the latest version seeded there). A spec sent here must already be registered (evaluated, seeded or POST /v1/decisions/{id}/structures), or it is 404 VERSION_UNKNOWN. Send outcomes unless the base\u0026#x27;s latest primary evaluation in the key\u0026#x27;s environment, else its latest seed there, recorded cut points (400 OUTCOMES_INVALID). Only cases with an outcome from the owner, reviewers or seeds count. 503 ENGINE_UNAVAILABLE (retry later) when no generator is configured, the generator\u0026#x27;s provider fails, or the engines could not score the cases.\">\u003cmeta data-mint-head name=\"application-name\" content=\"Moonbounce Decisions API\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"https://mintlify.s3.us-west-1.amazonaws.com/moonbounce/_generated/favicon/apple-touch-icon.png?v=3\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"https://mintlify.s3.us-west-1.amazonaws.com/moonbounce/_generated/favicon/favicon-32x32.png?v=3\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"https://mintlify.s3.us-west-1.amazonaws.com/moonbounce/_generated/favicon/favicon-16x16.png?v=3\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"https://mintlify.s3.us-west-1.amazonaws.com/moonbounce/_generated/favicon/favicon.ico?v=3\">\u003cmeta data-mint-head property=\"og:title\" content=\"Generate a suggestion on demand - Moonbounce Decisions API\">\u003cmeta data-mint-head property=\"og:description\" content=\"Proposes one change to the decision\u0026#x27;s spec from its feedback (a feature rewrite or a new feature), with its preview as evidence. suggestion is null when there is nothing worth proposing, and reason says why. The same candidate proposed earlier in the key\u0026#x27;s environment is returned instead of a duplicate. Everything is read in the key\u0026#x27;s environment: its feedback, cases and suggestions (a test key learns from test cases only). Without spec, the base is the version serving primary traffic in that environment (else the latest version seeded there). A spec sent here must already be registered (evaluated, seeded or POST /v1/decisions/{id}/structures), or it is 404 VERSION_UNKNOWN. Send outcomes unless the base\u0026#x27;s latest primary evaluation in the key\u0026#x27;s environment, else its latest seed there, recorded cut points (400 OUTCOMES_INVALID). Only cases with an outcome from the owner, reviewers or seeds count. 503 ENGINE_UNAVAILABLE (retry later) when no generator is configured, the generator\u0026#x27;s provider fails, or the engines could not score the cases.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Moonbounce Decisions API\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://moonbounce.mintlify.app/api-reference/suggestions/generate-a-suggestion-on-demand\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://moonbounce.mintlify.app/_mintlify/api/og/v2?division=suggestions\u0026amp;title=Generate+a+suggestion+on+demand\u0026amp;description=Proposes+one+change+to+the+decision%27s+spec+from+its+feedback+%28a+feature+rewrite+or+a+new+feature%29%2C+with+its+preview+as+evidence.+%60suggestion%60+is+null+when+there\u0026amp;theme=6d67371419b6cc4f4d7d2b27\u0026amp;signature=0190fe81f444c0779b29509749862c4c789c2a82290e8628acdccd272278f7ad\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Generate a suggestion on demand - Moonbounce Decisions API\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Proposes one change to the decision\u0026#x27;s spec from its feedback (a feature rewrite or a new feature), with its preview as evidence. suggestion is null when there is nothing worth proposing, and reason says why. The same candidate proposed earlier in the key\u0026#x27;s environment is returned instead of a duplicate. Everything is read in the key\u0026#x27;s environment: its feedback, cases and suggestions (a test key learns from test cases only). Without spec, the base is the version serving primary traffic in that environment (else the latest version seeded there). A spec sent here must already be registered (evaluated, seeded or POST /v1/decisions/{id}/structures), or it is 404 VERSION_UNKNOWN. Send outcomes unless the base\u0026#x27;s latest primary evaluation in the key\u0026#x27;s environment, else its latest seed there, recorded cut points (400 OUTCOMES_INVALID). Only cases with an outcome from the owner, reviewers or seeds count. 503 ENGINE_UNAVAILABLE (retry later) when no generator is configured, the generator\u0026#x27;s provider fails, or the engines could not score the cases.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://moonbounce.mintlify.app/_mintlify/api/og/v2?division=suggestions\u0026amp;title=Generate+a+suggestion+on+demand\u0026amp;description=Proposes+one+change+to+the+decision%27s+spec+from+its+feedback+%28a+feature+rewrite+or+a+new+feature%29%2C+with+its+preview+as+evidence.+%60suggestion%60+is+null+when+there\u0026amp;theme=6d67371419b6cc4f4d7d2b27\u0026amp;signature=0190fe81f444c0779b29509749862c4c789c2a82290e8628acdccd272278f7ad\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"https://mintlify.s3.us-west-1.amazonaws.com/moonbounce/_generated/favicon/browserconfig.xml?v=3\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Moonbounce Decisions API\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#4f46e5\">\u003clink data-mint-head rel=\"canonical\" href=\"https://moonbounce.mintlify.app/api-reference/suggestions/generate-a-suggestion-on-demand\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/api-reference/suggestions/generate-a-suggestion-on-demand.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://moonbounce.mintlify.app/#organization\",\"name\":\"Moonbounce Decisions API\",\"url\":\"https://moonbounce.mintlify.app\"},{\"@type\":\"WebSite\",\"@id\":\"https://moonbounce.mintlify.app#website\",\"name\":\"Moonbounce Decisions API\",\"url\":\"https://moonbounce.mintlify.app\",\"publisher\":{\"@id\":\"https://moonbounce.mintlify.app/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://moonbounce.mintlify.app/api-reference/suggestions/generate-a-suggestion-on-demand#webpage\",\"url\":\"https://moonbounce.mintlify.app/api-reference/suggestions/generate-a-suggestion-on-demand\",\"name\":\"Generate a suggestion on demand\",\"description\":\"Proposes one change to the decision's spec from its feedback (a feature rewrite or a new feature), with its preview as evidence. suggestion is null when there is nothing worth proposing, and reason says why. The same candidate proposed earlier in the key's environment is returned instead of a duplicate. Everything is read in the key's environment: its feedback, cases and suggestions (a test key learns from test cases only). Without spec, the base is the version serving primary traffic in that environment (else the latest version seeded there). A spec sent here must already be registered (evaluated, seeded or POST /v1/decisions/{id}/structures), or it is 404 VERSION_UNKNOWN. Send outcomes unless the base's latest primary evaluation in the key's environment, else its latest seed there, recorded cut points (400 OUTCOMES_INVALID). Only cases with an outcome from the owner, reviewers or seeds count. 503 ENGINE_UNAVAILABLE (retry later) when no generator is configured, the generator's provider fails, or the engines could not score the cases.\",\"dateModified\":\"2026-11-02T20:55:04.108Z\",\"isPartOf\":{\"@id\":\"https://moonbounce.mintlify.app#website\"},\"breadcrumb\":{\"@id\":\"https://moonbounce.mintlify.app/api-reference/suggestions/generate-a-suggestion-on-demand#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://moonbounce.mintlify.app/api-reference/suggestions/generate-a-suggestion-on-demand#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Endpoints\",\"item\":\"https://moonbounce.mintlify.app/api-reference/health/health-check\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"suggestions\",\"item\":\"https://moonbounce.mintlify.app/api-reference/suggestions/list-suggestions-for-a-decision\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Generate a suggestion on demand\",\"item\":\"https://moonbounce.mintlify.app/api-reference/suggestions/generate-a-suggestion-on-demand\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://moonbounce.mintlify.app/api-reference/suggestions/generate-a-suggestion-on-demand#apireference\",\"headline\":\"Generate a suggestion on demand\",\"name\":\"Generate a suggestion on demand\",\"description\":\"Proposes one change to the decision's spec from its feedback (a feature rewrite or a new feature), with its preview as evidence. suggestion is null when there is nothing worth proposing, and reason says why. The same candidate proposed earlier in the key's environment is returned instead of a duplicate. Everything is read in the key's environment: its feedback, cases and suggestions (a test key learns from test cases only). Without spec, the base is the version serving primary traffic in that environment (else the latest version seeded there). A spec sent here must already be registered (evaluated, seeded or POST /v1/decisions/{id}/structures), or it is 404 VERSION_UNKNOWN. Send outcomes unless the base's latest primary evaluation in the key's environment, else its latest seed there, recorded cut points (400 OUTCOMES_INVALID). Only cases with an outcome from the owner, reviewers or seeds count. 503 ENGINE_UNAVAILABLE (retry later) when no generator is configured, the generator's provider fails, or the engines could not score the cases.\",\"url\":\"https://moonbounce.mintlify.app/api-reference/suggestions/generate-a-suggestion-on-demand\",\"mainEntityOfPage\":{\"@id\":\"https://moonbounce.mintlify.app/api-reference/suggestions/generate-a-suggestion-on-demand#webpage\"},\"dateModified\":\"2026-11-02T20:55:04.108Z\",\"publisher\":{\"@id\":\"https://moonbounce.mintlify.app/#organization\"},\"isPartOf\":{\"@id\":\"https://moonbounce.mintlify.app#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Moonbounce Decisions API\",\"creator\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","siteName":"Moonbounce Decisions API","nav":{"global":null,"tabs":[{"tab":"Guides","pages":[{"title":"Guides","href":""}]},{"tab":"API reference","groups":[{"group":"Overview","pages":[{"title":"API reference overview","href":"/reference/overview"}]},{"group":"Endpoints","pages":[{"group":"health","pages":[{"title":"Health check","deprecated":null,"version":null,"openapi":"/openapi.json get /health","href":"/api-reference/health/health-check"}]},{"group":"specs","pages":[{"title":"Hash a decision spec","deprecated":null,"version":null,"openapi":"/openapi.json post /v1/specs/hash","href":"/api-reference/specs/hash-a-decision-spec"},{"title":"List registered structures","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/decisions/{decision_id}/structures","href":"/api-reference/specs/list-registered-structures"},{"title":"Register a spec structure","deprecated":null,"version":null,"openapi":"/openapi.json post /v1/decisions/{decision_id}/structures","href":"/api-reference/specs/register-a-spec-structure"},{"title":"Get a registered structure and its spec","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/decisions/{decision_id}/structures/{structure}","href":"/api-reference/specs/get-a-registered-structure-and-its-spec"},{"title":"List decisions in this environment","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/decisions","href":"/api-reference/specs/list-decisions-in-this-environment"}]},{"group":"engines","pages":[{"title":"List the engines a decision can run on","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/engines","href":"/api-reference/engines/list-the-engines-a-decision-can-run-on"},{"title":"Get the engine a decision runs on","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/decisions/{decision_id}/binding","href":"/api-reference/engines/get-the-engine-a-decision-runs-on"},{"title":"Choose the engine a decision runs on","deprecated":null,"version":null,"openapi":"/openapi.json post /v1/decisions/{decision_id}/binding/revisions","href":"/api-reference/engines/choose-the-engine-a-decision-runs-on"}]},{"group":"evaluate","pages":[{"title":"Evaluate an item against a decision","deprecated":null,"version":null,"openapi":"/openapi.json post /v1/evaluate","href":"/api-reference/evaluate/evaluate-an-item-against-a-decision"},{"title":"Get a past evaluation","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/evaluations/{evaluation_id}","href":"/api-reference/evaluate/get-a-past-evaluation"},{"title":"List a decision's evaluations","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/decisions/{decision_id}/evaluations","href":"/api-reference/evaluate/list-a-decisions-evaluations"}]},{"group":"feedback","pages":[{"title":"Submit feedback on an evaluation or item","deprecated":null,"version":null,"openapi":"/openapi.json post /v1/feedback","href":"/api-reference/feedback/submit-feedback-on-an-evaluation-or-item"},{"title":"Get a feedback submission as stored","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/feedback/{feedback_id}","href":"/api-reference/feedback/get-a-feedback-submission-as-stored"},{"title":"Export a decision's feedback as training data","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/decisions/{decision_id}/feedback","href":"/api-reference/feedback/export-a-decisions-feedback-as-training-data"},{"title":"Seed a decision with labeled examples","deprecated":null,"version":null,"openapi":"/openapi.json post /v1/decisions/{decision_id}/seeds","href":"/api-reference/feedback/seed-a-decision-with-labeled-examples"}]},{"group":"review","pages":[{"title":"List review items","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/review/items","href":"/api-reference/review/list-review-items"},{"title":"Get a review item","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/review/items/{item_id}","href":"/api-reference/review/get-a-review-item"},{"title":"Get the structure and weights a review item was decided with","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/review/items/{item_id}/configuration","href":"/api-reference/review/get-the-structure-and-weights-a-review-item-was-decided-with"},{"title":"Mark a review item as shown","deprecated":null,"version":null,"openapi":"/openapi.json post /v1/review/items/{item_id}/shown","href":"/api-reference/review/mark-a-review-item-as-shown"},{"title":"Submit a review","deprecated":null,"version":null,"openapi":"/openapi.json post /v1/review/items/{item_id}/submit","href":"/api-reference/review/submit-a-review"},{"title":"Withdraw a review answer","deprecated":null,"version":null,"openapi":"/openapi.json post /v1/review/items/{item_id}/withdraw","href":"/api-reference/review/withdraw-a-review-answer"},{"title":"Change your own earlier review answer","deprecated":null,"version":null,"openapi":"/openapi.json post /v1/review/items/{item_id}/change","href":"/api-reference/review/change-your-own-earlier-review-answer"},{"title":"Skip a review item","deprecated":null,"version":null,"openapi":"/openapi.json post /v1/review/items/{item_id}/skip","href":"/api-reference/review/skip-a-review-item"},{"title":"Add the reason for a blind disagreement","deprecated":null,"version":null,"openapi":"/openapi.json post /v1/review/items/{item_id}/reason","href":"/api-reference/review/add-the-reason-for-a-blind-disagreement"}]},{"group":"suggestions","pages":[{"title":"List suggestions for a decision","description":"Newest first, the key's environment's suggestions only. On a production key, acceptance is recorded before the list is read: a suggestion whose candidate hashes have since served primary production traffic comes back `accepted`. A test key's suggestions are never accepted. `stale` is set on a suggestion when feedback on a case it was evaluated on changed after its evidence was read (an answer changed, withdrawn, corrected or newly given); its evidence is never rescored, so preview it again.","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/decisions/{decision_id}/suggestions","href":"/api-reference/suggestions/list-suggestions-for-a-decision"},{"title":"Generate a suggestion on demand","deprecated":null,"version":null,"openapi":"/openapi.json post /v1/decisions/{decision_id}/suggestions","href":"/api-reference/suggestions/generate-a-suggestion-on-demand"},{"title":"Get a suggestion","description":"Another environment's suggestion is 404, like another organization's. On a production key, acceptance is recorded before it is read. `stale` is set when feedback on a case it was evaluated on changed after its evidence was read; its evidence is never rescored, so preview it again.","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/suggestions/{suggestion_id}","href":"/api-reference/suggestions/get-a-suggestion"},{"title":"Mark a suggestion pulled or rejected","deprecated":null,"version":null,"openapi":"/openapi.json post /v1/suggestions/{suggestion_id}/status","href":"/api-reference/suggestions/mark-a-suggestion-pulled-or-rejected"},{"title":"Preview a spec change against past feedback","deprecated":null,"version":null,"openapi":"/openapi.json post /v1/decisions/{decision_id}/previews","href":"/api-reference/suggestions/preview-a-spec-change-against-past-feedback"},{"title":"Get the improvement loop's status","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/decisions/{decision_id}/loop","href":"/api-reference/suggestions/get-the-improvement-loops-status"}]},{"group":"usage","pages":[{"title":"Engine and model cost for a decision, per evaluation and in total","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/decisions/{decision_id}/usage","href":"/api-reference/usage/engine-and-model-cost-for-a-decision-per-evaluation-and-in-total"}]},{"group":"keys","pages":[{"title":"Identify the calling key or sign-in","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/whoami","href":"/api-reference/keys/identify-the-calling-key-or-sign-in"}]}]}]}]},"basePath":"","title":"Generate a suggestion on demand - Moonbounce Decisions API","buildId":"dpl_36EDyZCDfRuoUD9af5CH4M1bqY2h","deploymentId":"dpl_36EDyZCDfRuoUD9af5CH4M1bqY2h","dynamics":["10e4515597","c2aa737661","2b790eda92","b0f84f53ff","a9bb46feb3"],"chunks":["BannerMarkdown-DHaG7hr_.js","dist-DKZWslLH.js","lib-DuNMoZ05.js","lib-B8HbPgcC.js","clsx-BIWXJmsZ.js","html-void-elements-mCSPHezU.js","katex-YMM-FMeD.js","marked.esm-CZWythHk.js","OpenApiReferenceProvider-DCDCdBVX.js","utils-ME8dDnLe.js","cloneDeep-izs3Hzxb.js","_Uint8Array-BVIqJ90l.js","isObjectLike-C8vmzPEN.js","isArray-Dcu1dQ5t.js","utils-0e84ACsd.js","toString-BX-iyh8G.js","isSymbol-CSH9U2Gm.js","addUniqueKeysToSchema-wgRBj-ia.js","snippetPresets-C11Sgb-o.js","style-to-object-BY3JEAdk.js","v4-DIgz8zy6.js","ApiExamples-C0lapOpP.js","isEqual-BfaiBbcl.js","usePlaygroundInputsStore-ZeRQV8fF.js","shallow-BupWh095.js","getApiPlaygroundDisplay-BnYQO2Ss.js","CodeSnippet-RKKOc8c_.js","CodeSnippets-Drf_m8wS.js","Page-Bevw23-4.js","getPastedJson-u6QiPzNZ.js","icon-Bb-CBSxO.js","MethodPill-F7l5AI7V.js","DuplicateIcon-IiAXkdSg.js","createIcon-FliI8EBc.js","DynamicMarkdown-B62XqCSI.js","SectionHeading-Dj31pT03.js","axios-vUo_bRtp.js","Markdown-BOgQCTwD.js","AssistantPageLink-UDqbR6xh.js"]}