Sent to the webhook_url of a generation once it succeeds or fails, with the same body as GET /generations/{id}. Delivered at least once and retried with exponential backoff for 24 hours. Verify the signature before trusting the body.
Received. Any 2xx status ends the delivery; any other answer is retried.
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"Codzen API","description":"Generate video and images with every Codzen model through one asynchronous API.","colors":{"primary":"#F2541B","light":"#F2541B","dark":"#F2541B"},"logo":{"light":"https://mintcdn.com/codzen/AesJFc5DenfzYYMK/logo/light.png?fit=max\u0026auto=format\u0026n=AesJFc5DenfzYYMK\u0026q=85\u0026s=b3066730127fcdcdc4776e6a11061cff","dark":"https://mintcdn.com/codzen/AesJFc5DenfzYYMK/logo/dark.png?fit=max\u0026auto=format\u0026n=AesJFc5DenfzYYMK\u0026q=85\u0026s=545709dced5893e41aab7890c6f0b410","href":"https://codzen.ai"},"favicon":"https://mintcdn.com/codzen/AesJFc5DenfzYYMK/favicon.svg?fit=max\u0026auto=format\u0026n=AesJFc5DenfzYYMK\u0026q=85\u0026s=f41c9c6d24e9ad9a66fe305ae7cd90b0","api":{"playground":{"display":"simple"},"examples":{"languages":["curl","javascript","python"]}},"styling":{"latex":false},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"codzen","hasAudioNarration":false,"actualSubdomain":"codzen","customDomains":["docs.codzen.ai"],"gitSource":{"type":"github","owner":"codzen-ai","repo":"multimodal-gateway","deployBranch":"main","contentDirectory":"docs-site","isPrivate":true,"mountPath":"","label":"","_id":"6adf4ab7362b83303f21cbe1"},"chroma":{"latestBuiltDeploymentHistoryId":"6ac7588094d102775f8f89bd","collectionId":"756659ef-85c7-4c42-ab69-2340b6765817","liveDeploymentHistoryId":"6ac7588094d102775f8f89bd","schemaVersion":"v3"},"entitlements":{"AI_CHAT":{"status":"DISABLED"},"WEB_MCP":{"status":"DISABLED"},"NARRATION":{"status":"DISABLED"}},"buildId":"6adf4ab7362b83303f21cbe7","clientVersion":"0.0.3966","searchFilterCounts":[{"language":"default","tag":"API reference","count":6},{"language":"default","tag":"Guides","count":5},{"language":"default","tag":"Models","count":1},{"language":"default","tag":"Get started","count":1}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableContextualStarterQuestions":false,"enableAskAiSearchBar":true},"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":"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/generation-completed","slug":"/api-reference/generation-completed","pageMetadata":{"title":"Generation completed","description":"Sent to the `webhook_url` of a generation once it succeeds or fails, with the same body as `GET /generations/{id}`. Delivered at least once and retried with exponential backoff for 24 hours. Verify the signature before trusting the body.","version":null,"deprecated":null,"openapi":"/openapi.json webhook generation.completed","href":"/api-reference/generation-completed","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: [\"Sent to the \", _jsx(_components.code, {\n children: \"webhook_url\"\n }), \" of a generation once it succeeds or fails, with the same body as \", _jsx(_components.code, {\n children: \"GET /generations/{id}\"\n }), \". Delivered at least once and retried with exponential backoff for 24 hours. Verify the signature before trusting the body.\"]\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":"Generation completed","description":"Sent to the `webhook_url` of a generation once it succeeds or fails, with the same body as `GET /generations/{id}`. Delivered at least once and retried with exponential backoff for 24 hours. Verify the signature before trusting the body.","version":null,"deprecated":null,"openapi":"/openapi.json webhook generation.completed","href":"/api-reference/generation-completed","autogeneratedByOpenApi":true}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[],"codeExamples":{}},"jsLinks":[],"openApiReferenceData":{"operation":{"operationId":"generationCompleted","summary":"Generation completed","description":"Sent to the `webhook_url` of a generation once it succeeds or fails, with the same body as `GET /generations/{id}`. Delivered at least once and retried with exponential backoff for 24 hours. Verify the signature before trusting the body.","security":[],"parameters":["7ed600ad-7d2a-4ecf-855c-cc451ef325cd","331f1175-f4a9-4ce1-b526-137457a2a8b6","988478b4-4f99-476d-9888-dc1bda7e3dc3"],"requestBody":"1ded37a7-027d-4b47-947b-0cb167607090","responses":{"200":"020b7c2b-b402-43d2-b815-823a10819c8c"},"method":"post","type":"webhook","servers":["2aa32099-f431-40c3-b7ab-3081a580a287"],"path":"generation.completed","baseUrlOptions":["https://codzen.ai/api/v1"],"title":"Generation completed","codeSamples":[],"requestExampleLanguages":["bash","javascript","python"],"requiredOnlyExamples":false,"requestExamples":[{"language":"json","filename":"Example","code":"{\n \"id\": \"\u003cstring>\",\n \"model\": \"\u003cstring>\",\n \"input\": {},\n \"outputs\": [\n {\n \"url\": \"\u003cstring>\"\n }\n ],\n \"cost\": {\n \"currency\": \"USD\",\n \"estimated\": \"\u003cstring>\",\n \"amount\": \"\u003cstring>\",\n \"usage\": [\n {\n \"unit\": \"\u003cstring>\",\n \"quantity\": 1,\n \"unit_price\": \"\u003cstring>\"\n }\n ]\n },\n \"error\": {\n \"message\": \"\u003cstring>\",\n \"retryable\": true,\n \"param\": \"\u003cstring>\"\n },\n \"created_at\": \"2023-11-07T05:31:56Z\",\n \"started_at\": \"2023-11-07T05:31:56Z\",\n \"completed_at\": \"2023-11-07T05:31:56Z\"\n}"}],"requestExampleType":"webhook","responseExampleType":"generated"},"dependencies":{"parameters":{"7ed600ad-7d2a-4ecf-855c-cc451ef325cd":{"name":"webhook-id","in":"header","required":true,"description":"Event ID, the same on every retry of a delivery; use it to drop duplicates.","schema":{"type":"string","isRequired":true,"description":"Event ID, the same on every retry of a delivery; use it to drop duplicates.","uniqueKey":"","typeLabel":"string"}},"331f1175-f4a9-4ce1-b526-137457a2a8b6":{"name":"webhook-timestamp","in":"header","required":true,"description":"When the delivery was sent, in Unix seconds.","schema":{"type":"string","isRequired":true,"description":"When the delivery was sent, in Unix seconds.","uniqueKey":"","typeLabel":"string"}},"988478b4-4f99-476d-9888-dc1bda7e3dc3":{"name":"webhook-signature","in":"header","required":true,"description":"Space-separated `v1,\u003cbase64>` HMAC-SHA256 signatures of `\u003cwebhook-id>.\u003cwebhook-timestamp>.\u003cbody>`, made with your webhook signing secret (`whsec_…`).","schema":{"type":"string","isRequired":true,"description":"Space-separated `v1,\u003cbase64>` HMAC-SHA256 signatures of `\u003cwebhook-id>.\u003cwebhook-timestamp>.\u003cbody>`, made with your webhook signing secret (`whsec_…`).","uniqueKey":"","typeLabel":"string"}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","pattern":"^gen_","description":"ID of the generation.","isRequired":true,"uniqueKey":"id","typeLabel":"string"},"model":{"type":"string","description":"Slug of the model, as submitted.","isRequired":true,"uniqueKey":"model","typeLabel":"string"},"status":{"type":"string","enum":["succeeded","failed"],"description":"The terminal state.","isRequired":true,"uniqueKey":"status","typeLabel":"enum\u003cstring>"},"input":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"oneOf":[{}],"uniqueKey":"input.additionalProperties","typeLabel":"any"},"description":"The input, normalized: input assets point at Codzen copies; other fields are as submitted.","isRequired":true,"uniqueKey":"input","typeLabel":"object"},"outputs":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["video","image","audio","3d"],"description":"Kind of media.","isRequired":true,"uniqueKey":"outputs.items.[INDEX].type","typeLabel":"enum\u003cstring>"},"url":{"type":"string","format":"uri","description":"Where to download the output; no API key is needed.","isRequired":true,"uniqueKey":"outputs.items.[INDEX].url","typeLabel":"string\u003curi>"}},"required":["type","url"],"additionalProperties":false,"description":"One delivered output.","uniqueKey":"outputs.items.[INDEX]","typeLabel":"object"},"description":"Delivered outputs; empty until the generation succeeds.","isRequired":true,"uniqueKey":"outputs","typeLabel":"object[]"},"cost":{"type":"object","properties":{"currency":{"type":"string","const":"USD","isRequired":true,"uniqueKey":"cost.currency","typeLabel":"string"},"estimated":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?$","description":"The estimate, held from the balance at submission.","isRequired":true,"uniqueKey":"cost.estimated","typeLabel":"string"},"amount":{"oneOf":[{"type":"string","description":"The final cost: `null` until the generation finishes, `\"0.00\"` when it fails.","pattern":"^-?\\d+(\\.\\d+)?$","isRequired":true,"uniqueKey":"cost.amount.oneOf.0","typeLabel":"string"},{"type":"null","description":"The final cost: `null` until the generation finishes, `\"0.00\"` when it fails.","isRequired":true,"uniqueKey":"cost.amount.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"cost.amount","typeLabel":"string | null"},"usage":{"type":"array","items":{"type":"object","properties":{"unit":{"type":"string","description":"Billing unit, as the model is priced, such as `output_second` or `million_tokens`.","isRequired":true,"uniqueKey":"cost.usage.items.[INDEX].unit","typeLabel":"string"},"quantity":{"type":"number","minimum":0,"description":"Billed quantity of the unit.","isRequired":true,"uniqueKey":"cost.usage.items.[INDEX].quantity","typeLabel":"number"},"unit_price":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?$","description":"Price of one unit, in USD.","isRequired":true,"uniqueKey":"cost.usage.items.[INDEX].unit_price","typeLabel":"string"}},"required":["unit","quantity","unit_price"],"additionalProperties":false,"description":"One price row the generation was billed by.","uniqueKey":"cost.usage.items.[INDEX]","typeLabel":"object"},"description":"What the final cost was computed from; empty until known.","isRequired":true,"uniqueKey":"cost.usage","typeLabel":"object[]"}},"required":["currency","estimated","amount","usage"],"additionalProperties":false,"description":"What the generation costs.","isRequired":true,"uniqueKey":"cost","typeLabel":"object"},"error":{"oneOf":[{"type":"object","description":"Why the generation failed; `null` unless it failed.","required":["type","code","message","retryable"],"properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","billing_error","permission_error","not_found_error","rate_limit_error","upstream_error","api_error"],"description":"Broad category of the error.","isRequired":true,"uniqueKey":"error.oneOf.0.type","typeLabel":"enum\u003cstring>"},"code":{"type":"string","enum":["invalid_request","content_rejected","invalid_api_key","insufficient_balance","api_key_disabled","account_suspended","model_not_found","generation_not_found","rate_limited","concurrency_limit","model_unavailable","upstream_failed","timeout","internal_error"],"description":"Stable error code; branch on this, not on `message`.","isRequired":true,"uniqueKey":"error.oneOf.0.code","typeLabel":"enum\u003cstring>"},"message":{"type":"string","description":"Human-readable explanation; it may change at any time.","isRequired":true,"uniqueKey":"error.oneOf.0.message","typeLabel":"string"},"retryable":{"type":"boolean","description":"Whether sending the same request again may succeed.","isRequired":true,"uniqueKey":"error.oneOf.0.retryable","typeLabel":"boolean"},"param":{"description":"The request field the error is about, such as `input.seed`.","type":"string","uniqueKey":"error.oneOf.0.param","typeLabel":"string"},"stage":{"description":"For `content_rejected`: whether the input or the output was rejected.","type":"string","enum":["input","output"],"uniqueKey":"error.oneOf.0.stage","typeLabel":"enum\u003cstring>"}},"additionalProperties":false,"isRequired":true,"uniqueKey":"error.oneOf.0","typeLabel":"object"},{"type":"null","description":"Why the generation failed; `null` unless it failed.","isRequired":true,"uniqueKey":"error.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"error","typeLabel":"object | null"},"created_at":{"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":"ISO 8601 time in UTC.","isRequired":true,"uniqueKey":"created_at","typeLabel":"string\u003cdate-time>"},"started_at":{"oneOf":[{"type":"string","description":"When processing started; `null` while queued.","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":"started_at.oneOf.0","typeLabel":"string\u003cdate-time>"},{"type":"null","description":"When processing started; `null` while queued.","isRequired":true,"uniqueKey":"started_at.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"started_at","typeLabel":"string\u003cdate-time> | null"},"completed_at":{"oneOf":[{"type":"string","description":"When the generation finished; `null` until then.","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":"completed_at.oneOf.0","typeLabel":"string\u003cdate-time>"},{"type":"null","description":"When the generation finished; `null` until then.","isRequired":true,"uniqueKey":"completed_at.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"completed_at","typeLabel":"string\u003cdate-time> | null"}},"required":["id","model","status","input","outputs","cost","error","created_at","started_at","completed_at"],"additionalProperties":false,"description":"The finished generation, as `GET /generations/{id}` returns it.","uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"id":"\u003cstring>","model":"\u003cstring>","input":{},"outputs":[{"url":"\u003cstring>"}],"cost":{"currency":"USD","estimated":"\u003cstring>","amount":"\u003cstring>","usage":[{"unit":"\u003cstring>","quantity":1,"unit_price":"\u003cstring>"}]},"error":{"message":"\u003cstring>","retryable":true,"param":"\u003cstring>"},"created_at":"2023-11-07T05:31:56Z","started_at":"2023-11-07T05:31:56Z","completed_at":"2023-11-07T05:31:56Z"}}},"exampleType":"generated"}},"exampleType":"generated"},"responses":{"020b7c2b-b402-43d2-b815-823a10819c8c":{"description":"Received. Any 2xx status ends the delivery; any other answer is retried.","content":{"_mintlify/placeholder":{"schema":{"type":"object","description":""}}}}},"security":{},"servers":{"2aa32099-f431-40c3-b7ab-3081a580a287":{"url":"https://codzen.ai/api/v1"}}},"originalFileLocation":"openapi.json"},"subdomain":"codzen","siteName":"Codzen API","title":"Generation completed - Codzen API","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-10-26T12:42:35.615Z","originalFileLocation":"api-reference/generation-completed.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=\"Sent to the webhook_url of a generation once it succeeds or fails, with the same body as GET /generations/{id}. Delivered at least once and retried with exponential backoff for 24 hours. Verify the signature before trusting the body.\">\u003cmeta data-mint-head name=\"application-name\" content=\"Codzen 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/codzen/qXEmLmO-OuhPxDFN/_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/codzen/qXEmLmO-OuhPxDFN/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/codzen/qXEmLmO-OuhPxDFN/_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/codzen/qXEmLmO-OuhPxDFN/_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/codzen/qXEmLmO-OuhPxDFN/_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/codzen/qXEmLmO-OuhPxDFN/_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/codzen/qXEmLmO-OuhPxDFN/_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/codzen/qXEmLmO-OuhPxDFN/_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/codzen/qXEmLmO-OuhPxDFN/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Generation completed - Codzen API\">\u003cmeta data-mint-head property=\"og:description\" content=\"Sent to the webhook_url of a generation once it succeeds or fails, with the same body as GET /generations/{id}. Delivered at least once and retried with exponential backoff for 24 hours. Verify the signature before trusting the body.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Codzen API\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.codzen.ai/api-reference/generation-completed\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://codzen.mintlify.app/_mintlify/api/og/v2?division=API+reference\u0026amp;title=Generation+completed\u0026amp;description=Sent+to+the+%60webhook_url%60+of+a+generation+once+it+succeeds+or+fails%2C+with+the+same+body+as+%60GET+%2Fgenerations%2F%7Bid%7D%60.+Delivered+at+least+once+and+retried+with+exp\u0026amp;theme=e284728bad8fe7cd7f57d6c9\u0026amp;signature=8973f46ff65f0e17fd66dbb5af0b246da65aaf18936b8129858174cd64756d52\">\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=\"Generation completed - Codzen API\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Sent to the webhook_url of a generation once it succeeds or fails, with the same body as GET /generations/{id}. Delivered at least once and retried with exponential backoff for 24 hours. Verify the signature before trusting the body.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://codzen.mintlify.app/_mintlify/api/og/v2?division=API+reference\u0026amp;title=Generation+completed\u0026amp;description=Sent+to+the+%60webhook_url%60+of+a+generation+once+it+succeeds+or+fails%2C+with+the+same+body+as+%60GET+%2Fgenerations%2F%7Bid%7D%60.+Delivered+at+least+once+and+retried+with+exp\u0026amp;theme=e284728bad8fe7cd7f57d6c9\u0026amp;signature=8973f46ff65f0e17fd66dbb5af0b246da65aaf18936b8129858174cd64756d52\">\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/codzen/qXEmLmO-OuhPxDFN/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Codzen API\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#F2541B\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.codzen.ai/api-reference/generation-completed\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/api-reference/generation-completed.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.codzen.ai/#organization\",\"name\":\"Codzen API\",\"url\":\"https://docs.codzen.ai\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/codzen/AesJFc5DenfzYYMK/logo/light.png?fit=max\u0026auto=format\u0026n=AesJFc5DenfzYYMK\u0026q=85\u0026s=b3066730127fcdcdc4776e6a11061cff\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.codzen.ai#website\",\"name\":\"Codzen API\",\"url\":\"https://docs.codzen.ai\",\"publisher\":{\"@id\":\"https://docs.codzen.ai/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.codzen.ai/api-reference/generation-completed#webpage\",\"url\":\"https://docs.codzen.ai/api-reference/generation-completed\",\"name\":\"Generation completed\",\"description\":\"Sent to the webhook_url of a generation once it succeeds or fails, with the same body as GET /generations/{id}. Delivered at least once and retried with exponential backoff for 24 hours. Verify the signature before trusting the body.\",\"dateModified\":\"2026-10-26T12:42:35.615Z\",\"isPartOf\":{\"@id\":\"https://docs.codzen.ai#website\"},\"breadcrumb\":{\"@id\":\"https://docs.codzen.ai/api-reference/generation-completed#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.codzen.ai/api-reference/generation-completed#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"API reference\",\"item\":\"https://docs.codzen.ai/api-reference/create-a-generation\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Generation completed\",\"item\":\"https://docs.codzen.ai/api-reference/generation-completed\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://docs.codzen.ai/api-reference/generation-completed#apireference\",\"headline\":\"Generation completed\",\"name\":\"Generation completed\",\"description\":\"Sent to the webhook_url of a generation once it succeeds or fails, with the same body as GET /generations/{id}. Delivered at least once and retried with exponential backoff for 24 hours. Verify the signature before trusting the body.\",\"url\":\"https://docs.codzen.ai/api-reference/generation-completed\",\"mainEntityOfPage\":{\"@id\":\"https://docs.codzen.ai/api-reference/generation-completed#webpage\"},\"dateModified\":\"2026-10-26T12:42:35.615Z\",\"publisher\":{\"@id\":\"https://docs.codzen.ai/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.codzen.ai#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Codzen API\",\"creator\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","siteName":"Codzen API","nav":{"global":null,"groups":[{"group":"Get started","pages":[{"title":"Quickstart","href":"/quickstart"}]},{"group":"Guides","pages":[{"title":"Authentication and rate limits","href":"/guides/authentication"},{"title":"Generation lifecycle","href":"/guides/generation-lifecycle"},{"title":"Webhooks and signatures","href":"/guides/webhooks"},{"title":"Errors","href":"/guides/errors"},{"title":"Billing","href":"/guides/billing"}]},{"group":"API reference","pages":[{"title":"Create a generation","deprecated":null,"version":null,"openapi":"/openapi.json post /generations","href":"/api-reference/create-a-generation"},{"title":"Get a generation","deprecated":null,"version":null,"openapi":"/openapi.json get /generations/{id}","href":"/api-reference/get-a-generation"},{"title":"List generations","deprecated":null,"version":null,"openapi":"/openapi.json get /generations","href":"/api-reference/list-generations"},{"title":"List models","deprecated":null,"version":null,"openapi":"/openapi.json get /models","href":"/api-reference/list-models"},{"title":"Get the balance","description":"Your account balance. It can be negative after a final cost exceeds its estimate; new generations then fail with `insufficient_balance` until you top up.","deprecated":null,"version":null,"openapi":"/openapi.json get /balance","href":"/api-reference/get-the-balance"},{"title":"Generation completed","version":null,"deprecated":null,"openapi":"/openapi.json webhook generation.completed","href":"/api-reference/generation-completed"}]},{"group":"Models","pages":[{"title":"Models","description":"Every model you can call, with its slug and output type. Each links to its model page for its input fields.","href":"/models"}]}]},"title":"Generation completed - Codzen API","buildId":"dpl_cadrRc5H9XQiJQbDFN5mcYRs2PAj","deploymentId":"dpl_cadrRc5H9XQiJQbDFN5mcYRs2PAj","dynamics":["c2aa737661","2b790eda92","b0f84f53ff","a9bb46feb3"],"chunks":["OpenApiReferenceProvider-DKJwRUt2.js","utils-CWD_VS3u.js","cloneDeep-izs3Hzxb.js","_Uint8Array-BVIqJ90l.js","isObjectLike-C8vmzPEN.js","isArray-Dcu1dQ5t.js","utils-oFjciODD.js","toString-BX-iyh8G.js","isSymbol-CSH9U2Gm.js","addUniqueKeysToSchema-C76WsxC3.js","snippetPresets-DvPMxpX_.js","style-to-object-BY3JEAdk.js","v4-DIgz8zy6.js","ApiExamples-CuNQfndH.js","isEqual-BfaiBbcl.js","usePlaygroundInputsStore-BVFpVUoF.js","shallow-t59Jg5Kr.js","getApiPlaygroundDisplay-C_JZ4amX.js","CodeSnippet-CLRDnx_h.js","CodeSnippets-C2myU4kc.js","Page-7TwLLapg.js","getPastedJson-B-JaVXw7.js","icon-BA-iDhH3.js","MethodPill-D4qZABFp.js","DuplicateIcon-THIDKO1O.js","createIcon-CYYJwgFd.js","DynamicMarkdown-UGQuxDKp.js","SectionHeading-jYELb23h.js","axios-vUo_bRtp.js","Markdown-DKsLa3wy.js","clsx-CefdjKz2.js","lib--scc4DXi.js","lib-B8HbPgcC.js","html-void-elements-mCSPHezU.js","dist-BaREnp3o.js","katex-YMM-FMeD.js","marked.esm-CZWythHk.js","AssistantPageLink-sgx_0XzF.js"]}