Stops the generation’s unfinished outputs. Outputs a vendor already finished are kept and charged; cancelling a finished generation returns it unchanged. Takes no body.
Makes retries safe: a retry with the same key and body returns the first response for 24 hours instead of repeating the work. Reusing a key with a different body returns 409.
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"ZeroGen API","description":"Generate images and video with every model in ZeroGen from your own servers.","colors":{"primary":"#18181B","light":"#E4E4E7","dark":"#18181B"},"logo":{"light":"https://mintcdn.com/zero-gen/W2GmhRNTfZqjZw9S/logo/light.svg?fit=max\u0026auto=format\u0026n=W2GmhRNTfZqjZw9S\u0026q=85\u0026s=35d09db4e90566e79f5af1c3d8ffb4be","dark":"https://mintcdn.com/zero-gen/W2GmhRNTfZqjZw9S/logo/dark.svg?fit=max\u0026auto=format\u0026n=W2GmhRNTfZqjZw9S\u0026q=85\u0026s=f4fcd821b66e08a00c2975e2458a4edc"},"favicon":"https://mintcdn.com/zero-gen/W2GmhRNTfZqjZw9S/favicon.svg?fit=max\u0026auto=format\u0026n=W2GmhRNTfZqjZw9S\u0026q=85\u0026s=46d5ff92806d6efc0a27dd88bce49b88","api":{"openapi":"openapi.json","playground":{"display":"simple"},"examples":{"languages":["curl","javascript","python"]}},"contextual":{"options":["copy","view","claude","chatgpt","cursor","vscode","mcp"],"display":"header"},"styling":{"latex":false},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"zero-gen","hasAudioNarration":false,"actualSubdomain":"zero-gen","customDomains":["docs.zerogen.com"],"gitSource":{"type":"github","owner":"zerogeneration","repo":"platform","deployBranch":"main","contentDirectory":"apps/api-docs","isPrivate":true,"mountPath":"","label":"","_id":"6adcf0cde85b0c9dcc4acad1"},"chroma":{"latestBuiltDeploymentHistoryId":"6add10119e1712172edc1116","collectionId":"5f92acff-b495-46a2-9c1b-66df9fb7c4b7","liveDeploymentHistoryId":"6add10119e1712172edc1116","schemaVersion":"v3"},"entitlements":{"AI_CHAT":{"status":"ENABLED"},"WEB_MCP":{"status":"ENABLED"},"NARRATION":{"status":"ENABLED"}},"buildId":"6add6db9cd8ebdc75e362e82","clientVersion":"0.0.3965","searchFilterCounts":[{"language":"default","tag":"API reference","count":13},{"language":"default","tag":"Guides","count":13},{"language":"default","tag":"Endpoints","count":12},{"language":"default","tag":"Get started","count":5},{"language":"default","tag":"Generations","count":5},{"language":"default","tag":"Generate","count":4},{"language":"default","tag":"Conventions","count":4},{"language":"default","tag":"Uploads","count":3},{"language":"default","tag":"Account","count":2},{"language":"default","tag":"Models","count":2}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableContextualStarterQuestions":false,"enableAskAiSearchBar":true},"hasChatPermissions":true,"hasWebMcpPermissions":true,"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":"editor-v7-file-tree","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":"pause-universal-search-reconcile","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":"per-site-search-delta","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":"editor-private-page-search","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":"editor-nav-generations","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":"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":"editor-agent-model-picker","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":"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}],"isAtlas":false,"googleFontsInlined":false},"customCss":[],"page":{"pagePath":"api-reference/generations/cancel-a-generation","slug":"/api-reference/generations/cancel-a-generation","pageMetadata":{"title":"Cancel a generation","description":"Stops the generation's unfinished outputs. Outputs a vendor already finished are kept and charged; cancelling a finished generation returns it unchanged. Takes no body.\n\nNeeds the `generations:cancel` scope.","deprecated":null,"version":null,"openapi":"/openapi.json post /generations/{id}/cancel","href":"/api-reference/generations/cancel-a-generation","autogeneratedByOpenApi":true},"description":{"compiledSource":"\"use strict\";\nconst {Fragment: _Fragment, 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(_Fragment, {\n children: [_jsx(_components.p, {\n children: \"Stops the generation’s unfinished outputs. Outputs a vendor already finished are kept and charged; cancelling a finished generation returns it unchanged. Takes no body.\"\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"Needs the \", _jsx(_components.code, {\n children: \"generations:cancel\"\n }), \" scope.\"]\n })]\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":"Cancel a generation","description":"Stops the generation's unfinished outputs. Outputs a vendor already finished are kept and charged; cancelling a finished generation returns it unchanged. Takes no body.\n\nNeeds the `generations:cancel` scope.","deprecated":null,"version":null,"openapi":"/openapi.json post /generations/{id}/cancel","href":"/api-reference/generations/cancel-a-generation","autogeneratedByOpenApi":true}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[],"codeExamples":{}},"jsLinks":[],"openApiReferenceData":{"operation":{"operationId":"cancelGeneration","tags":["Generations"],"summary":"Cancel a generation","description":"Stops the generation's unfinished outputs. Outputs a vendor already finished are kept and charged; cancelling a finished generation returns it unchanged. Takes no body.\n\nNeeds the `generations:cancel` scope.","parameters":["5371cce4-b11a-496f-aba7-83e947b163b4","f85dfdf3-98eb-4478-bd8f-6c0785d88e16"],"responses":{"200":"05ebff5b-7654-4e23-a67d-249eec4ae4e2","400":"480cf6cb-c8c3-4fd0-afc6-dce43a5b1c11","401":"79cc579f-ed28-47b1-a93c-4f7188708361","403":"9bdeb04e-a027-447a-b872-abb3cb6b6e0c","404":"5382fd87-552e-421d-b4e8-f1e0582b5cca","409":"ad25a67e-77e9-4fd7-af55-78a36b6e6cfc","413":"55bd17d2-4874-4732-983e-355162346956","415":"5a07ce6c-a37c-4038-a6dd-bc55110fe92c","429":"8e740fc9-62d7-42aa-84ba-5cedeb3af568","500":"65dd2df9-6722-426b-9ab3-5a87296262b0","503":"879d3a48-20be-45d0-9ac5-6ce7f873180a"},"method":"post","type":"path","servers":["a6b98c3c-1283-400d-ad4f-17f195c5cbe1"],"security":["2878f9b5-d2e6-4cb9-ba92-fe02c38d64db"],"path":"/generations/{id}/cancel","baseUrlOptions":["https://api.zerogen.com/v1"],"title":"Cancel a generation","codeSamples":[],"requestExampleLanguages":["bash","javascript","python"],"requiredOnlyExamples":false,"requestExampleType":"generated","responseExampleType":"generated"},"dependencies":{"parameters":{"5371cce4-b11a-496f-aba7-83e947b163b4":{"name":"id","in":"path","required":true,"description":"The generation's ID","schema":{"type":"string","isRequired":true,"description":"The generation's ID","uniqueKey":"","typeLabel":"string"}},"f85dfdf3-98eb-4478-bd8f-6c0785d88e16":{"name":"Idempotency-Key","in":"header","required":false,"description":"Makes retries safe: a retry with the same key and body returns the first response for 24 hours instead of repeating the work. Reusing a key with a different body returns 409.","schema":{"type":"string","minLength":1,"maxLength":255,"pattern":"^[\\x21-\\x7e]+$","isRequired":false,"description":"Makes retries safe: a retry with the same key and body returns the first response for 24 hours instead of repeating the work. Reusing a key with a different body returns 409.","uniqueKey":"","typeLabel":"string"}}},"responses":{"05ebff5b-7654-4e23-a67d-249eec4ae4e2":{"description":"The generation.","headers":{"Request-Id":{"description":"Identifies the request; quote it when contacting support.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests the key may make in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"Idempotent-Replayed":{"description":"true when this response replays an earlier request with the same Idempotency-Key.","schema":{"type":"string","enum":["true"]}},"Deprecation":{"description":"When the model was deprecated, as @ followed by Unix seconds.","schema":{"type":"string"}},"Sunset":{"description":"When the deprecated model stops accepting requests (HTTP date).","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","isRequired":true,"uniqueKey":"id","typeLabel":"string"},"projectId":{"type":"string","description":"The project that holds the outputs","isRequired":true,"uniqueKey":"projectId","typeLabel":"string"},"model":{"oneOf":[{"type":"string","maxLength":200,"pattern":"^[a-z0-9]+(?:[.-][a-z0-9]+)*\\/[a-z0-9]+(?:[.-][a-z0-9]+)*\\/[a-z0-9]+(?:[.-][a-z0-9]+)*$","isRequired":true,"uniqueKey":"model.oneOf.0","typeLabel":"string"},{"type":"null","isRequired":true,"uniqueKey":"model.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"model","typeLabel":"string | null"},"modelVersion":{"oneOf":[{"type":"string","isRequired":true,"uniqueKey":"modelVersion.oneOf.0","typeLabel":"string"},{"type":"null","isRequired":true,"uniqueKey":"modelVersion.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"modelVersion","typeLabel":"string | null"},"status":{"type":"string","enum":["queued","running","succeeded","partial","failed","cancelled"],"isRequired":true,"uniqueKey":"status","typeLabel":"enum\u003cstring>"},"outputs":{"type":"array","items":{"type":"object","properties":{"index":{"type":"integer","minimum":0,"maximum":9007199254740991,"isRequired":true,"uniqueKey":"outputs.items.[INDEX].index","typeLabel":"integer"},"status":{"type":"string","enum":["queued","running","succeeded","failed","cancelled"],"isRequired":true,"uniqueKey":"outputs.items.[INDEX].status","typeLabel":"enum\u003cstring>"},"asset":{"oneOf":[{"type":"object","required":["id","mimeType","width","height","durationMs"],"properties":{"id":{"type":"string","isRequired":true,"uniqueKey":"outputs.items.[INDEX].asset.oneOf.0.id","typeLabel":"string"},"mimeType":{"type":"string","isRequired":true,"uniqueKey":"outputs.items.[INDEX].asset.oneOf.0.mimeType","typeLabel":"string"},"width":{"oneOf":[{"type":"integer","maximum":9007199254740991,"minimum":0,"exclusiveMinimum":true,"isRequired":true,"uniqueKey":"outputs.items.[INDEX].asset.oneOf.0.width.oneOf.0","typeLabel":"integer"},{"type":"null","isRequired":true,"uniqueKey":"outputs.items.[INDEX].asset.oneOf.0.width.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"outputs.items.[INDEX].asset.oneOf.0.width","typeLabel":"integer | null"},"height":{"oneOf":[{"type":"integer","maximum":9007199254740991,"minimum":0,"exclusiveMinimum":true,"isRequired":true,"uniqueKey":"outputs.items.[INDEX].asset.oneOf.0.height.oneOf.0","typeLabel":"integer"},{"type":"null","isRequired":true,"uniqueKey":"outputs.items.[INDEX].asset.oneOf.0.height.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"outputs.items.[INDEX].asset.oneOf.0.height","typeLabel":"integer | null"},"durationMs":{"oneOf":[{"type":"integer","maximum":9007199254740991,"minimum":0,"isRequired":true,"uniqueKey":"outputs.items.[INDEX].asset.oneOf.0.durationMs.oneOf.0","typeLabel":"integer"},{"type":"null","isRequired":true,"uniqueKey":"outputs.items.[INDEX].asset.oneOf.0.durationMs.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"outputs.items.[INDEX].asset.oneOf.0.durationMs","typeLabel":"integer | null"},"resourceUri":{"type":"string","description":"Where this transport's client reads the asset, such as an MCP resource","uniqueKey":"outputs.items.[INDEX].asset.oneOf.0.resourceUri","typeLabel":"string"}},"additionalProperties":false,"isRequired":true,"uniqueKey":"outputs.items.[INDEX].asset.oneOf.0","typeLabel":"object"},{"type":"null","isRequired":true,"uniqueKey":"outputs.items.[INDEX].asset.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"outputs.items.[INDEX].asset","typeLabel":"object | null"},"error":{"oneOf":[{"type":"object","required":["code","message","retryable"],"properties":{"code":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,79}$","isRequired":true,"uniqueKey":"outputs.items.[INDEX].error.oneOf.0.code","typeLabel":"string"},"message":{"type":"string","isRequired":true,"uniqueKey":"outputs.items.[INDEX].error.oneOf.0.message","typeLabel":"string"},"retryable":{"type":"boolean","isRequired":true,"uniqueKey":"outputs.items.[INDEX].error.oneOf.0.retryable","typeLabel":"boolean"},"param":{"type":"string","uniqueKey":"outputs.items.[INDEX].error.oneOf.0.param","typeLabel":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"oneOf":[{}],"uniqueKey":"outputs.items.[INDEX].error.oneOf.0.details.additionalProperties","typeLabel":"any"},"uniqueKey":"outputs.items.[INDEX].error.oneOf.0.details","typeLabel":"object"}},"additionalProperties":false,"isRequired":true,"uniqueKey":"outputs.items.[INDEX].error.oneOf.0","typeLabel":"object"},{"type":"null","isRequired":true,"uniqueKey":"outputs.items.[INDEX].error.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"outputs.items.[INDEX].error","typeLabel":"object | null"},"warnings":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","isRequired":true,"uniqueKey":"outputs.items.[INDEX].warnings.items.[INDEX].code","typeLabel":"string"},"message":{"type":"string","isRequired":true,"uniqueKey":"outputs.items.[INDEX].warnings.items.[INDEX].message","typeLabel":"string"}},"required":["code","message"],"additionalProperties":false,"uniqueKey":"outputs.items.[INDEX].warnings.items.[INDEX]","typeLabel":"object"},"description":"What the provider ignored, such as an unused reference","uniqueKey":"outputs.items.[INDEX].warnings","typeLabel":"object[]"},"draft":{"type":"object","properties":{"expiresAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","description":"When upscaling this output closes","isRequired":true,"uniqueKey":"outputs.items.[INDEX].draft.expiresAt","typeLabel":"string\u003cdate-time>"},"upscalable":{"type":"boolean","description":"A final can be requested now: unexpired, with no final in progress","isRequired":true,"uniqueKey":"outputs.items.[INDEX].draft.upscalable","typeLabel":"boolean"},"upscale":{"oneOf":[{"type":"string","description":"The newest final's state, or null when none was requested","enum":["upscaling","upscaled"],"isRequired":true,"uniqueKey":"outputs.items.[INDEX].draft.upscale.oneOf.0","typeLabel":"enum\u003cstring>"},{"type":"null","description":"The newest final's state, or null when none was requested","isRequired":true,"uniqueKey":"outputs.items.[INDEX].draft.upscale.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"outputs.items.[INDEX].draft.upscale","typeLabel":"enum\u003cstring> | null"},"finalResolution":{"type":"string","description":"That final's resolution, one the model's draft control lists","uniqueKey":"outputs.items.[INDEX].draft.finalResolution","typeLabel":"string"},"finalAssetId":{"type":"string","description":"The newest finished final's asset","uniqueKey":"outputs.items.[INDEX].draft.finalAssetId","typeLabel":"string"}},"required":["expiresAt","upscalable","upscale"],"additionalProperties":false,"description":"A 480p Draft output; upscaling it makes a final with the same seed, at a resolution the model's draft control lists","uniqueKey":"outputs.items.[INDEX].draft","typeLabel":"object"}},"required":["index","status","asset","error"],"additionalProperties":false,"uniqueKey":"outputs.items.[INDEX]","typeLabel":"object"},"isRequired":true,"uniqueKey":"outputs","typeLabel":"object[]"},"error":{"oneOf":[{"type":"object","required":["code","message","retryable"],"properties":{"code":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,79}$","isRequired":true,"uniqueKey":"error.oneOf.0.code","typeLabel":"string"},"message":{"type":"string","isRequired":true,"uniqueKey":"error.oneOf.0.message","typeLabel":"string"},"retryable":{"type":"boolean","isRequired":true,"uniqueKey":"error.oneOf.0.retryable","typeLabel":"boolean"},"param":{"type":"string","uniqueKey":"error.oneOf.0.param","typeLabel":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"oneOf":[{}],"uniqueKey":"error.oneOf.0.details.additionalProperties","typeLabel":"any"},"uniqueKey":"error.oneOf.0.details","typeLabel":"object"}},"additionalProperties":false,"isRequired":true,"uniqueKey":"error.oneOf.0","typeLabel":"object"},{"type":"null","isRequired":true,"uniqueKey":"error.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"error","typeLabel":"object | null"},"billing":{"type":"object","properties":{"mode":{"type":"string","enum":["platform","byok","test"],"isRequired":true,"uniqueKey":"billing.mode","typeLabel":"enum\u003cstring>"},"state":{"oneOf":[{"type":"string","description":"held: an amount is reserved and nothing is charged yet; charged: chargedMicroUsd is the final charge; released: the hold ended with no charge; null: billing never admitted the generation, so nothing was held or charged","enum":["held","charged","released"],"isRequired":true,"uniqueKey":"billing.state.oneOf.0","typeLabel":"enum\u003cstring>"},{"type":"null","description":"held: an amount is reserved and nothing is charged yet; charged: chargedMicroUsd is the final charge; released: the hold ended with no charge; null: billing never admitted the generation, so nothing was held or charged","isRequired":true,"uniqueKey":"billing.state.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"billing.state","typeLabel":"enum\u003cstring> | null"},"quotedMicroUsd":{"oneOf":[{"type":"integer","description":"Reserved maximum expected charge","maximum":9007199254740991,"minimum":0,"isRequired":true,"uniqueKey":"billing.quotedMicroUsd.oneOf.0","typeLabel":"integer"},{"type":"null","description":"Reserved maximum expected charge","isRequired":true,"uniqueKey":"billing.quotedMicroUsd.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"billing.quotedMicroUsd","typeLabel":"integer | null"},"heldMicroUsd":{"oneOf":[{"type":"integer","description":"While held, the amount reserved now; it is never a charge","maximum":9007199254740991,"minimum":0,"isRequired":true,"uniqueKey":"billing.heldMicroUsd.oneOf.0","typeLabel":"integer"},{"type":"null","description":"While held, the amount reserved now; it is never a charge","isRequired":true,"uniqueKey":"billing.heldMicroUsd.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"billing.heldMicroUsd","typeLabel":"integer | null"},"chargedMicroUsd":{"oneOf":[{"type":"integer","description":"The final charge once charged, zero once released; it can rarely exceed the quote","maximum":9007199254740991,"minimum":0,"isRequired":true,"uniqueKey":"billing.chargedMicroUsd.oneOf.0","typeLabel":"integer"},{"type":"null","description":"The final charge once charged, zero once released; it can rarely exceed the quote","isRequired":true,"uniqueKey":"billing.chargedMicroUsd.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"billing.chargedMicroUsd","typeLabel":"integer | null"},"hold":{"type":"object","properties":{"state":{"type":"string","enum":["running","ended","needs_attention"],"description":"running: the generation has not ended; ended: it ended and the hold is still pending; needs_attention: it has stayed pending 30 minutes after ending, or 24 hours after admission with no end recorded (endedAt then stays null), so ZeroGen is looking into it","isRequired":true,"uniqueKey":"billing.hold.state","typeLabel":"enum\u003cstring>"},"endedAt":{"oneOf":[{"type":"string","description":"When the generation ended; null while it runs or when no end was recorded","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","isRequired":true,"uniqueKey":"billing.hold.endedAt.oneOf.0","typeLabel":"string\u003cdate-time>"},{"type":"null","description":"When the generation ended; null while it runs or when no end was recorded","isRequired":true,"uniqueKey":"billing.hold.endedAt.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"billing.hold.endedAt","typeLabel":"string\u003cdate-time> | null"}},"required":["state","endedAt"],"additionalProperties":false,"description":"While held, where the generation stands. It reports facts, not what settlement will do","uniqueKey":"billing.hold","typeLabel":"object"}},"required":["mode","state","quotedMicroUsd","heldMicroUsd","chargedMicroUsd"],"additionalProperties":false,"isRequired":true,"uniqueKey":"billing","typeLabel":"object"},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","isRequired":true,"uniqueKey":"createdAt","typeLabel":"string\u003cdate-time>"},"startedAt":{"oneOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","isRequired":true,"uniqueKey":"startedAt.oneOf.0","typeLabel":"string\u003cdate-time>"},{"type":"null","isRequired":true,"uniqueKey":"startedAt.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"startedAt","typeLabel":"string\u003cdate-time> | null"},"finishedAt":{"oneOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","isRequired":true,"uniqueKey":"finishedAt.oneOf.0","typeLabel":"string\u003cdate-time>"},{"type":"null","isRequired":true,"uniqueKey":"finishedAt.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"finishedAt","typeLabel":"string\u003cdate-time> | null"}},"required":["id","projectId","model","modelVersion","status","outputs","error","billing","createdAt","startedAt","finishedAt"],"additionalProperties":false,"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"id":"\u003cstring>","projectId":"\u003cstring>","model":"\u003cstring>","modelVersion":"\u003cstring>","status":"queued","outputs":[{"index":4503599627370495,"status":"queued","asset":{"id":"\u003cstring>","mimeType":"\u003cstring>","width":4503599627370495,"height":4503599627370495,"durationMs":4503599627370495,"resourceUri":"\u003cstring>"},"error":{"code":"\u003cstring>","message":"\u003cstring>","retryable":true,"param":"\u003cstring>","details":{}},"warnings":[{"code":"\u003cstring>","message":"\u003cstring>"}],"draft":{"expiresAt":"2023-11-07T05:31:56Z","upscalable":true,"upscale":"upscaling","finalResolution":"\u003cstring>","finalAssetId":"\u003cstring>"}}],"error":{"code":"\u003cstring>","message":"\u003cstring>","retryable":true,"param":"\u003cstring>","details":{}},"billing":{"mode":"platform","state":"held","quotedMicroUsd":4503599627370495,"heldMicroUsd":4503599627370495,"chargedMicroUsd":4503599627370495,"hold":{"state":"running","endedAt":"2023-11-07T05:31:56Z"}},"createdAt":"2023-11-07T05:31:56Z","startedAt":"2023-11-07T05:31:56Z","finishedAt":"2023-11-07T05:31:56Z"}}},"exampleType":"generated"}},"exampleType":"generated"},"480cf6cb-c8c3-4fd0-afc6-dce43a5b1c11":{"description":"The request is malformed or invalid: invalid_request, validation_failed, model_unavailable or input_import_failed.","headers":{"Request-Id":{"description":"Identifies the request; quote it when contacting support.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests the key may make in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,79}$","isRequired":true,"uniqueKey":"error.code","typeLabel":"string"},"message":{"type":"string","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"retryable":{"type":"boolean","isRequired":true,"uniqueKey":"error.retryable","typeLabel":"boolean"},"param":{"type":"string","uniqueKey":"error.param","typeLabel":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"oneOf":[{}],"uniqueKey":"error.details.additionalProperties","typeLabel":"any"},"uniqueKey":"error.details","typeLabel":"object"}},"required":["code","message","retryable"],"additionalProperties":false,"isRequired":true,"uniqueKey":"error","typeLabel":"object"}},"required":["error"],"additionalProperties":false,"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"error":{"code":"\u003cstring>","message":"\u003cstring>","retryable":true,"param":"\u003cstring>","details":{}}}}},"exampleType":"generated"}},"exampleType":"generated"},"79cc579f-ed28-47b1-a93c-4f7188708361":{"description":"invalid_api_key: the key is missing, revoked or expired.","headers":{"Request-Id":{"description":"Identifies the request; quote it when contacting support.","schema":{"type":"string"}},"WWW-Authenticate":{"description":"Bearer realm=\"ZeroGen API\".","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,79}$","isRequired":true,"uniqueKey":"error.code","typeLabel":"string"},"message":{"type":"string","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"retryable":{"type":"boolean","isRequired":true,"uniqueKey":"error.retryable","typeLabel":"boolean"},"param":{"type":"string","uniqueKey":"error.param","typeLabel":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"oneOf":[{}],"uniqueKey":"error.details.additionalProperties","typeLabel":"any"},"uniqueKey":"error.details","typeLabel":"object"}},"required":["code","message","retryable"],"additionalProperties":false,"isRequired":true,"uniqueKey":"error","typeLabel":"object"}},"required":["error"],"additionalProperties":false,"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"error":{"code":"\u003cstring>","message":"\u003cstring>","retryable":true,"param":"\u003cstring>","details":{}}}}},"exampleType":"generated"}},"exampleType":"generated"},"9bdeb04e-a027-447a-b872-abb3cb6b6e0c":{"description":"permission_denied: the key lacks the scope this endpoint needs, the request came from a browser, or the API isn't enabled for the organization.","headers":{"Request-Id":{"description":"Identifies the request; quote it when contacting support.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests the key may make in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,79}$","isRequired":true,"uniqueKey":"error.code","typeLabel":"string"},"message":{"type":"string","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"retryable":{"type":"boolean","isRequired":true,"uniqueKey":"error.retryable","typeLabel":"boolean"},"param":{"type":"string","uniqueKey":"error.param","typeLabel":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"oneOf":[{}],"uniqueKey":"error.details.additionalProperties","typeLabel":"any"},"uniqueKey":"error.details","typeLabel":"object"}},"required":["code","message","retryable"],"additionalProperties":false,"isRequired":true,"uniqueKey":"error","typeLabel":"object"}},"required":["error"],"additionalProperties":false,"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"error":{"code":"\u003cstring>","message":"\u003cstring>","retryable":true,"param":"\u003cstring>","details":{}}}}},"exampleType":"generated"}},"exampleType":"generated"},"5382fd87-552e-421d-b4e8-f1e0582b5cca":{"description":"not_found: no such resource for this caller, including a projectId the caller can't use.","headers":{"Request-Id":{"description":"Identifies the request; quote it when contacting support.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests the key may make in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,79}$","isRequired":true,"uniqueKey":"error.code","typeLabel":"string"},"message":{"type":"string","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"retryable":{"type":"boolean","isRequired":true,"uniqueKey":"error.retryable","typeLabel":"boolean"},"param":{"type":"string","uniqueKey":"error.param","typeLabel":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"oneOf":[{}],"uniqueKey":"error.details.additionalProperties","typeLabel":"any"},"uniqueKey":"error.details","typeLabel":"object"}},"required":["code","message","retryable"],"additionalProperties":false,"isRequired":true,"uniqueKey":"error","typeLabel":"object"}},"required":["error"],"additionalProperties":false,"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"error":{"code":"\u003cstring>","message":"\u003cstring>","retryable":true,"param":"\u003cstring>","details":{}}}}},"exampleType":"generated"}},"exampleType":"generated"},"ad25a67e-77e9-4fd7-af55-78a36b6e6cfc":{"description":"idempotency_conflict: the Idempotency-Key was used for a different request. idempotency_in_progress: the first request with this key hasn't finished. invalid_state: the request can't go ahead as things stand, such as a generation that needs a person's approval in ZeroGen.","headers":{"Request-Id":{"description":"Identifies the request; quote it when contacting support.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests the key may make in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,79}$","isRequired":true,"uniqueKey":"error.code","typeLabel":"string"},"message":{"type":"string","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"retryable":{"type":"boolean","isRequired":true,"uniqueKey":"error.retryable","typeLabel":"boolean"},"param":{"type":"string","uniqueKey":"error.param","typeLabel":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"oneOf":[{}],"uniqueKey":"error.details.additionalProperties","typeLabel":"any"},"uniqueKey":"error.details","typeLabel":"object"}},"required":["code","message","retryable"],"additionalProperties":false,"isRequired":true,"uniqueKey":"error","typeLabel":"object"}},"required":["error"],"additionalProperties":false,"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"error":{"code":"\u003cstring>","message":"\u003cstring>","retryable":true,"param":"\u003cstring>","details":{}}}}},"exampleType":"generated"}},"exampleType":"generated"},"55bd17d2-4874-4732-983e-355162346956":{"description":"The request body is larger than 128 KB.","headers":{"Request-Id":{"description":"Identifies the request; quote it when contacting support.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests the key may make in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,79}$","isRequired":true,"uniqueKey":"error.code","typeLabel":"string"},"message":{"type":"string","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"retryable":{"type":"boolean","isRequired":true,"uniqueKey":"error.retryable","typeLabel":"boolean"},"param":{"type":"string","uniqueKey":"error.param","typeLabel":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"oneOf":[{}],"uniqueKey":"error.details.additionalProperties","typeLabel":"any"},"uniqueKey":"error.details","typeLabel":"object"}},"required":["code","message","retryable"],"additionalProperties":false,"isRequired":true,"uniqueKey":"error","typeLabel":"object"}},"required":["error"],"additionalProperties":false,"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"error":{"code":"\u003cstring>","message":"\u003cstring>","retryable":true,"param":"\u003cstring>","details":{}}}}},"exampleType":"generated"}},"exampleType":"generated"},"5a07ce6c-a37c-4038-a6dd-bc55110fe92c":{"description":"Send the body as application/json.","headers":{"Request-Id":{"description":"Identifies the request; quote it when contacting support.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests the key may make in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,79}$","isRequired":true,"uniqueKey":"error.code","typeLabel":"string"},"message":{"type":"string","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"retryable":{"type":"boolean","isRequired":true,"uniqueKey":"error.retryable","typeLabel":"boolean"},"param":{"type":"string","uniqueKey":"error.param","typeLabel":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"oneOf":[{}],"uniqueKey":"error.details.additionalProperties","typeLabel":"any"},"uniqueKey":"error.details","typeLabel":"object"}},"required":["code","message","retryable"],"additionalProperties":false,"isRequired":true,"uniqueKey":"error","typeLabel":"object"}},"required":["error"],"additionalProperties":false,"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"error":{"code":"\u003cstring>","message":"\u003cstring>","retryable":true,"param":"\u003cstring>","details":{}}}}},"exampleType":"generated"}},"exampleType":"generated"},"8e740fc9-62d7-42aa-84ba-5cedeb3af568":{"description":"rate_limited: the key or its owner is over the rate limit, or the organization is at its running cap. Retry after Retry-After seconds.","headers":{"Request-Id":{"description":"Identifies the request; quote it when contacting support.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests the key may make in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,79}$","isRequired":true,"uniqueKey":"error.code","typeLabel":"string"},"message":{"type":"string","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"retryable":{"type":"boolean","isRequired":true,"uniqueKey":"error.retryable","typeLabel":"boolean"},"param":{"type":"string","uniqueKey":"error.param","typeLabel":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"oneOf":[{}],"uniqueKey":"error.details.additionalProperties","typeLabel":"any"},"uniqueKey":"error.details","typeLabel":"object"}},"required":["code","message","retryable"],"additionalProperties":false,"isRequired":true,"uniqueKey":"error","typeLabel":"object"}},"required":["error"],"additionalProperties":false,"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"error":{"code":"\u003cstring>","message":"\u003cstring>","retryable":true,"param":"\u003cstring>","details":{}}}}},"exampleType":"generated"}},"exampleType":"generated"},"65dd2df9-6722-426b-9ab3-5a87296262b0":{"description":"internal: something went wrong. Retry.","headers":{"Request-Id":{"description":"Identifies the request; quote it when contacting support.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests the key may make in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,79}$","isRequired":true,"uniqueKey":"error.code","typeLabel":"string"},"message":{"type":"string","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"retryable":{"type":"boolean","isRequired":true,"uniqueKey":"error.retryable","typeLabel":"boolean"},"param":{"type":"string","uniqueKey":"error.param","typeLabel":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"oneOf":[{}],"uniqueKey":"error.details.additionalProperties","typeLabel":"any"},"uniqueKey":"error.details","typeLabel":"object"}},"required":["code","message","retryable"],"additionalProperties":false,"isRequired":true,"uniqueKey":"error","typeLabel":"object"}},"required":["error"],"additionalProperties":false,"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"error":{"code":"\u003cstring>","message":"\u003cstring>","retryable":true,"param":"\u003cstring>","details":{}}}}},"exampleType":"generated"}},"exampleType":"generated"},"879d3a48-20be-45d0-9ac5-6ce7f873180a":{"description":"unavailable or pricing_unavailable: API keys, billing or pricing can't be reached right now. Retry.","headers":{"Request-Id":{"description":"Identifies the request; quote it when contacting support.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Requests the key may make in the current window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Requests left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the current window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,79}$","isRequired":true,"uniqueKey":"error.code","typeLabel":"string"},"message":{"type":"string","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"retryable":{"type":"boolean","isRequired":true,"uniqueKey":"error.retryable","typeLabel":"boolean"},"param":{"type":"string","uniqueKey":"error.param","typeLabel":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"oneOf":[{}],"uniqueKey":"error.details.additionalProperties","typeLabel":"any"},"uniqueKey":"error.details","typeLabel":"object"}},"required":["code","message","retryable"],"additionalProperties":false,"isRequired":true,"uniqueKey":"error","typeLabel":"object"}},"required":["error"],"additionalProperties":false,"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"error":{"code":"\u003cstring>","message":"\u003cstring>","retryable":true,"param":"\u003cstring>","details":{}}}}},"exampleType":"generated"}},"exampleType":"generated"}},"security":{"2878f9b5-d2e6-4cb9-ba92-fe02c38d64db":{"bearerAuth":{"type":"http","scheme":"bearer","description":"A ZeroGen API key: zg_ for a live key, zg_test_ for a test key.","scopes":[],"schemeName":"bearerAuth"}}},"servers":{"a6b98c3c-1283-400d-ad4f-17f195c5cbe1":{"url":"https://api.zerogen.com/v1"}},"processedSecurityOptions":[{"schemes":[{"scheme":{"type":"http","scheme":"bearer","description":"A ZeroGen API key: zg_ for a live key, zg_test_ for a test key.","scopes":[],"schemeName":"bearerAuth"},"schema":{"title":"Bearer Auth","type":"string","isRequired":true,"description":"A ZeroGen API key: zg_ for a live key, zg_test_ for a test key.","format":"bearer","typeLabel":"string\u003cbearer>","deprecated":false},"schemeName":"bearerAuth","name":"Authorization"}],"title":"bearerAuth"}]},"originalFileLocation":"openapi.json"},"subdomain":"zero-gen","siteName":"ZeroGen API","title":"Cancel a generation - ZeroGen API","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-10-24T20:07:49.916Z","originalFileLocation":"api-reference/generations/cancel-a-generation.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=\"Stops the generation\u0026#x27;s unfinished outputs. Outputs a vendor already finished are kept and charged; cancelling a finished generation returns it unchanged. Takes no body. Needs the generations:cancel scope.\">\u003cmeta data-mint-head name=\"application-name\" content=\"ZeroGen API\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/zero-gen/ben01azdM0Av99iT/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/zero-gen/ben01azdM0Av99iT/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/zero-gen/ben01azdM0Av99iT/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/zero-gen/ben01azdM0Av99iT/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/zero-gen/ben01azdM0Av99iT/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/zero-gen/ben01azdM0Av99iT/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/zero-gen/ben01azdM0Av99iT/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/zero-gen/ben01azdM0Av99iT/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/zero-gen/ben01azdM0Av99iT/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Cancel a generation - ZeroGen API\">\u003cmeta data-mint-head property=\"og:description\" content=\"Stops the generation\u0026#x27;s unfinished outputs. Outputs a vendor already finished are kept and charged; cancelling a finished generation returns it unchanged. Takes no body. Needs the generations:cancel scope.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"ZeroGen API\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.zerogen.com/api-reference/generations/cancel-a-generation\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://zero-gen.mintlify.app/_mintlify/api/og/v2?division=Generations\u0026amp;title=Cancel+a+generation\u0026amp;description=Stops+the+generation%27s+unfinished+outputs.+Outputs+a+vendor+already+finished+are+kept+and+charged%3B+cancelling+a+finished+generation+returns+it+unchanged.+Takes+\u0026amp;theme=faa3a38b66501c3fd9e9fb87\u0026amp;signature=4779e9649be66f43e20e6ccbaa8eb2a683eac8fa3d7f1b3cba7cf12e1e913f58\">\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=\"Cancel a generation - ZeroGen API\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Stops the generation\u0026#x27;s unfinished outputs. Outputs a vendor already finished are kept and charged; cancelling a finished generation returns it unchanged. Takes no body. Needs the generations:cancel scope.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://zero-gen.mintlify.app/_mintlify/api/og/v2?division=Generations\u0026amp;title=Cancel+a+generation\u0026amp;description=Stops+the+generation%27s+unfinished+outputs.+Outputs+a+vendor+already+finished+are+kept+and+charged%3B+cancelling+a+finished+generation+returns+it+unchanged.+Takes+\u0026amp;theme=faa3a38b66501c3fd9e9fb87\u0026amp;signature=4779e9649be66f43e20e6ccbaa8eb2a683eac8fa3d7f1b3cba7cf12e1e913f58\">\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=\"/mintlify-assets/_mintlify/favicons/zero-gen/ben01azdM0Av99iT/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"ZeroGen API\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#18181B\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.zerogen.com/api-reference/generations/cancel-a-generation\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/api-reference/generations/cancel-a-generation.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.zerogen.com/#organization\",\"name\":\"ZeroGen API\",\"url\":\"https://docs.zerogen.com\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/zero-gen/W2GmhRNTfZqjZw9S/logo/light.svg?fit=max\u0026auto=format\u0026n=W2GmhRNTfZqjZw9S\u0026q=85\u0026s=35d09db4e90566e79f5af1c3d8ffb4be\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.zerogen.com#website\",\"name\":\"ZeroGen API\",\"url\":\"https://docs.zerogen.com\",\"publisher\":{\"@id\":\"https://docs.zerogen.com/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.zerogen.com/api-reference/generations/cancel-a-generation#webpage\",\"url\":\"https://docs.zerogen.com/api-reference/generations/cancel-a-generation\",\"name\":\"Cancel a generation\",\"description\":\"Stops the generation's unfinished outputs. Outputs a vendor already finished are kept and charged; cancelling a finished generation returns it unchanged. Takes no body. Needs the generations:cancel scope.\",\"dateModified\":\"2026-10-24T20:07:49.916Z\",\"isPartOf\":{\"@id\":\"https://docs.zerogen.com#website\"},\"breadcrumb\":{\"@id\":\"https://docs.zerogen.com/api-reference/generations/cancel-a-generation#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.zerogen.com/api-reference/generations/cancel-a-generation#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Endpoints\",\"item\":\"https://docs.zerogen.com/api-reference/account/read-the-calling-key\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Generations\",\"item\":\"https://docs.zerogen.com/api-reference/generations/quote-a-generation\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Cancel a generation\",\"item\":\"https://docs.zerogen.com/api-reference/generations/cancel-a-generation\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://docs.zerogen.com/api-reference/generations/cancel-a-generation#apireference\",\"headline\":\"Cancel a generation\",\"name\":\"Cancel a generation\",\"description\":\"Stops the generation's unfinished outputs. Outputs a vendor already finished are kept and charged; cancelling a finished generation returns it unchanged. Takes no body. Needs the generations:cancel scope.\",\"url\":\"https://docs.zerogen.com/api-reference/generations/cancel-a-generation\",\"mainEntityOfPage\":{\"@id\":\"https://docs.zerogen.com/api-reference/generations/cancel-a-generation#webpage\"},\"dateModified\":\"2026-10-24T20:07:49.916Z\",\"publisher\":{\"@id\":\"https://docs.zerogen.com/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.zerogen.com#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"ZeroGen API\",\"creator\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","siteName":"ZeroGen API","nav":{"global":null,"tabs":[{"tab":"Guides","pages":[{"title":"Guides","href":""}]},{"tab":"API reference","groups":[{"group":"Overview","pages":[{"title":"Overview","href":"/api-reference/overview"}]},{"group":"Endpoints","pages":[{"group":"Account","pages":[{"title":"Read the calling key","deprecated":null,"version":null,"openapi":"/openapi.json get /me","href":"/api-reference/account/read-the-calling-key"},{"title":"Read the organization's balance","deprecated":null,"version":null,"openapi":"/openapi.json get /balance","href":"/api-reference/account/read-the-organizations-balance"}]},{"group":"Models","pages":[{"title":"List models","deprecated":null,"version":null,"openapi":"/openapi.json get /models","href":"/api-reference/models/list-models"},{"title":"Read a model","deprecated":null,"version":null,"openapi":"/openapi.json get /models/{vendor}/{model}/{operation}","href":"/api-reference/models/read-a-model"}]},{"group":"Generations","pages":[{"title":"Quote a generation","deprecated":null,"version":null,"openapi":"/openapi.json post /generations/quote","href":"/api-reference/generations/quote-a-generation"},{"title":"List generations","deprecated":null,"version":null,"openapi":"/openapi.json get /generations","href":"/api-reference/generations/list-generations"},{"title":"Create a generation","deprecated":null,"version":null,"openapi":"/openapi.json post /generations","href":"/api-reference/generations/create-a-generation"},{"title":"Read a generation","description":"One generation and each output's status, asset and error. Send `Prefer: wait=N` to hold the response until it ends. Reads never start or repeat work.\n\nNeeds the `generations:read` scope.","deprecated":null,"version":null,"openapi":"/openapi.json get /generations/{id}","href":"/api-reference/generations/read-a-generation"},{"title":"Cancel a generation","deprecated":null,"version":null,"openapi":"/openapi.json post /generations/{id}/cancel","href":"/api-reference/generations/cancel-a-generation"}]},{"group":"Uploads","pages":[{"title":"Create an upload","description":"Starts an upload into the Library. PUT the file's exact bytes to the returned target, then complete the upload. With `sha256`, an identical file already in the project comes back ready, with nothing to send.\n\nNeeds the `uploads:create` scope.","deprecated":null,"version":null,"openapi":"/openapi.json post /uploads","href":"/api-reference/uploads/create-an-upload"},{"title":"Read an upload","deprecated":null,"version":null,"openapi":"/openapi.json get /uploads/{id}","href":"/api-reference/uploads/read-an-upload"},{"title":"Complete an upload","deprecated":null,"version":null,"openapi":"/openapi.json post /uploads/{id}/complete","href":"/api-reference/uploads/complete-an-upload"}]}]}]}]},"title":"Cancel a generation - ZeroGen API","buildId":"dpl_849ArpqvBiCczQiT1Y1stNGpbqHT","deploymentId":"dpl_849ArpqvBiCczQiT1Y1stNGpbqHT","dynamics":["c2aa737661","2b790eda92","b0f84f53ff","a9bb46feb3"],"chunks":["OpenApiReferenceProvider-Bbp7I60D.js","utils-C3RIvJha.js","cloneDeep-izs3Hzxb.js","_Uint8Array-BVIqJ90l.js","isObjectLike-C8vmzPEN.js","isArray-Dcu1dQ5t.js","utils-DqD-vLt8.js","toString-BX-iyh8G.js","isSymbol-CSH9U2Gm.js","addUniqueKeysToSchema-B31Loprg.js","snippetPresets-DKpk-b8t.js","style-to-object-BY3JEAdk.js","v4-DIgz8zy6.js","ApiExamples-Cj65AhOR.js","isEqual-BfaiBbcl.js","usePlaygroundInputsStore-BXtn5gcC.js","shallow-RY2b03Cp.js","getApiPlaygroundDisplay-B0jeiPk3.js","CodeSnippet-CYgBjjwn.js","CodeSnippets-DOngDrYB.js","Page-n7I5XbKb.js","getPastedJson-DRQbJx-T.js","icon-CQiQCicY.js","MethodPill-BKTLdNtu.js","DuplicateIcon-B9jpAdat.js","createIcon-DCddRrXv.js","DynamicMarkdown-a8hUKrw6.js","SectionHeading-eECVV2eH.js","axios-vUo_bRtp.js","Markdown--GF7ZIpf.js","clsx-DZLdJUrt.js","lib--scc4DXi.js","lib-B8HbPgcC.js","html-void-elements-mCSPHezU.js","dist-2LoAhjKH.js","katex-YMM-FMeD.js","marked.esm-CZWythHk.js","AssistantPageLink-Zwc0ZncM.js"]}