Receive APIPod image and video task completion callbacks.
Add callback_url to an image or video generation request to receive a POST request when the task reaches completed or failed.
{ "model": "gpt-image-2", "prompt": "A technical cutaway illustration of a compact camera", "callback_url": "https://api.example.com/webhooks/apipod/opaque-route-token"}
Callback request
APIPod sends Content-Type: application/json and User-Agent: APIPod-Callback/1.0.
error_code is optional. Do not infer success from its absence; use status.
Usage and cost
Completed callbacks include a usage object with the final amount charged for the task:
Field
Type
Description
usage.cost
number
Final amount charged for this task, in USD. This is the settled amount after any post-completion adjustment, matching the cost shown in the dashboard.
usage.prompt_tokens
integer
Present only when the upstream provider reports token usage.
usage.completion_tokens
integer
Present only when the upstream provider reports token usage.
usage.total_tokens
integer
Present only when the upstream provider reports token usage.
usage appears only on completed callbacks. Failed tasks are refunded per the model’s refund policy and carry no usage object.
Image metadata
For layer-decomposition models (seedream-5.0-pro-layer, seedream-5.0-flash-layer), each item in the completed callback’s result is an object with url, z_index, bounding_box, name and description instead of a plain URL string. The format is identical to the result field of the query image task endpoint. Other models keep sending result as an array of URL strings.
Delivery behavior
Any HTTP status from 200 through 299 acknowledges the callback.
Non-2xx responses and network errors are retried.
APIPod currently makes up to five delivery attempts with exponential backoff.
Duplicate delivery is possible, so receivers must be idempotent.
Callback delivery is asynchronous and does not change the task’s terminal state.
Secure the receiver
The current public callback contract does not include a signature header. Do not claim that a callback is authenticated solely because its JSON shape looks correct.
Use HTTPS and a high-entropy, unguessable token in the callback path.
Keep the callback URL server-side; do not expose it in client applications.
Match task_id and request_id against tasks your system created.
Store a processed-event key and make duplicate callbacks return the same successful outcome.
Validate field types and reject unexpectedly large bodies.
Return 2xx only after the callback has been durably accepted; process slow work asynchronously.
If authenticity is critical, query the authenticated status endpoint before applying irreversible business actions.
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"APIPod Docs","description":"APIPod API documentation for image and video generation models.","colors":{"primary":"#7F22FE","light":"#A684FF","dark":"#7008E7"},"logo":{"light":"https://mintcdn.com/apipod/eQooMSJ0T7lbhJsR/logo.svg?fit=max\u0026auto=format\u0026n=eQooMSJ0T7lbhJsR\u0026q=85\u0026s=8c3136fb3cec60f625ec4693d5313b42","dark":"https://mintcdn.com/apipod/eQooMSJ0T7lbhJsR/logo.svg?fit=max\u0026auto=format\u0026n=eQooMSJ0T7lbhJsR\u0026q=85\u0026s=8c3136fb3cec60f625ec4693d5313b42","href":"https://www.apipod.ai"},"favicon":"https://mintcdn.com/apipod/eQooMSJ0T7lbhJsR/favicon.ico?fit=max\u0026auto=format\u0026n=eQooMSJ0T7lbhJsR\u0026q=85\u0026s=f81f92481d656456460373ccf2fe85d0","api":{"openapi":["api-reference/openapi/gpt-image-2--gpt-image-2.yaml","api-reference/openapi/gpt-image-2--gpt-image-2.zh.yaml","api-reference/openapi/gpt-image-2.5--gpt-image-2.5-flare.yaml","api-reference/openapi/gpt-image-2.5--gpt-image-2.5-flare.zh.yaml","api-reference/openapi/gpt-image-2.5--gpt-image-2.5-flare-lite.yaml","api-reference/openapi/gpt-image-2.5--gpt-image-2.5-flare-lite.zh.yaml","api-reference/openapi/gpt-image-2.5--gpt-image-2.5-sunburst.yaml","api-reference/openapi/gpt-image-2.5--gpt-image-2.5-sunburst.zh.yaml","api-reference/openapi/gpt-image-2.5--gpt-image-2.5-sunburst-lite.yaml","api-reference/openapi/gpt-image-2.5--gpt-image-2.5-sunburst-lite.zh.yaml","api-reference/openapi/gpt-image-2.6--gpt-image-2.6-flare.yaml","api-reference/openapi/gpt-image-2.6--gpt-image-2.6-flare.zh.yaml","api-reference/openapi/gpt-image-2.6--gpt-image-2.6-flare-hd.yaml","api-reference/openapi/gpt-image-2.6--gpt-image-2.6-flare-hd.zh.yaml","api-reference/openapi/gpt-image-2.6--gpt-image-2.6-flare-lite.yaml","api-reference/openapi/gpt-image-2.6--gpt-image-2.6-flare-lite.zh.yaml","api-reference/openapi/gpt-image-2.6--gpt-image-2.6-sunburst.yaml","api-reference/openapi/gpt-image-2.6--gpt-image-2.6-sunburst.zh.yaml","api-reference/openapi/gpt-image-2.6--gpt-image-2.6-sunburst-hd.yaml","api-reference/openapi/gpt-image-2.6--gpt-image-2.6-sunburst-hd.zh.yaml","api-reference/openapi/gpt-image-2.6--gpt-image-2.6-sunburst-lite.yaml","api-reference/openapi/gpt-image-2.6--gpt-image-2.6-sunburst-lite.zh.yaml","api-reference/openapi/gpt-image-2--gpt-image-2-lite.yaml","api-reference/openapi/gpt-image-2--gpt-image-2-lite.zh.yaml","api-reference/openapi/gpt-image-2--gpt-image-2-1k.yaml","api-reference/openapi/gpt-image-2--gpt-image-2-1k.zh.yaml","api-reference/openapi/gpt-image-2--gpt-image-2-fast.yaml","api-reference/openapi/gpt-image-2--gpt-image-2-fast.zh.yaml","api-reference/openapi/nano-banana--nano-banana-2.yaml","api-reference/openapi/nano-banana--nano-banana-2.zh.yaml","api-reference/openapi/nano-banana--nano-banana-2-lite.yaml","api-reference/openapi/nano-banana--nano-banana-2-lite.zh.yaml","api-reference/openapi/nano-banana--nano-banana-pro.yaml","api-reference/openapi/nano-banana--nano-banana-pro.zh.yaml","api-reference/openapi/nano-banana--nano-banana-2.1.yaml","api-reference/openapi/nano-banana--nano-banana-2.1.zh.yaml","api-reference/openapi/seedream--4-5-text-to-image.yaml","api-reference/openapi/seedream--4-5-text-to-image.zh.yaml","api-reference/openapi/seedream--4-5-image-to-image.yaml","api-reference/openapi/seedream--4-5-image-to-image.zh.yaml","api-reference/openapi/seedream--5-0-lite-text-to-image.yaml","api-reference/openapi/seedream--5-0-lite-text-to-image.zh.yaml","api-reference/openapi/seedream--5-0-lite-image-to-image.yaml","api-reference/openapi/seedream--5-0-lite-image-to-image.zh.yaml","api-reference/openapi/seedream--5-0-pro-text-to-image.yaml","api-reference/openapi/seedream--5-0-pro-text-to-image.zh.yaml","api-reference/openapi/seedream--5-0-pro-image-to-image.yaml","api-reference/openapi/seedream--5-0-pro-image-to-image.zh.yaml","api-reference/openapi/seedream--5-0-pro-layer.yaml","api-reference/openapi/seedream--5-0-pro-layer.zh.yaml","api-reference/openapi/seedream--5-0-flash-text-to-image.yaml","api-reference/openapi/seedream--5-0-flash-text-to-image.zh.yaml","api-reference/openapi/seedream--5-0-flash-image-to-image.yaml","api-reference/openapi/seedream--5-0-flash-image-to-image.zh.yaml","api-reference/openapi/seedream--5-0-flash-layer.yaml","api-reference/openapi/seedream--5-0-flash-layer.zh.yaml","api-reference/openapi/wan--2-7-text-to-image.yaml","api-reference/openapi/wan--2-7-text-to-image.zh.yaml","api-reference/openapi/wan--2-7-image-to-image.yaml","api-reference/openapi/wan--2-7-image-to-image.zh.yaml","api-reference/openapi/wan--2-7-text-to-image-pro.yaml","api-reference/openapi/wan--2-7-text-to-image-pro.zh.yaml","api-reference/openapi/wan--2-7-image-to-image-pro.yaml","api-reference/openapi/wan--2-7-image-to-image-pro.zh.yaml","api-reference/openapi/query-image-task.yaml","api-reference/openapi/query-image-task.zh.yaml","api-reference/openapi/veo--3-1-fast.yaml","api-reference/openapi/veo--3-1-fast.zh.yaml","api-reference/openapi/veo--3-1-fast-4k.yaml","api-reference/openapi/veo--3-1-fast-4k.zh.yaml","api-reference/openapi/veo--3-1-fast-ref.yaml","api-reference/openapi/veo--3-1-fast-ref.zh.yaml","api-reference/openapi/veo--3-1-quality.yaml","api-reference/openapi/veo--3-1-quality.zh.yaml","api-reference/openapi/veo--3-1-quality-4k.yaml","api-reference/openapi/veo--3-1-quality-4k.zh.yaml","api-reference/openapi/seedance--2-0-text-to-video.yaml","api-reference/openapi/seedance--2-0-text-to-video.zh.yaml","api-reference/openapi/seedance--2-0-image-to-video.yaml","api-reference/openapi/seedance--2-0-image-to-video.zh.yaml","api-reference/openapi/seedance--2-0-reference-to-video.yaml","api-reference/openapi/seedance--2-0-reference-to-video.zh.yaml","api-reference/openapi/seedance--2-0-fast-text-to-video.yaml","api-reference/openapi/seedance--2-0-fast-text-to-video.zh.yaml","api-reference/openapi/seedance--2-0-fast-image-to-video.yaml","api-reference/openapi/seedance--2-0-fast-image-to-video.zh.yaml","api-reference/openapi/seedance--2-0-fast-reference-to-video.yaml","api-reference/openapi/seedance--2-0-fast-reference-to-video.zh.yaml","api-reference/openapi/grok-imagine--grok-imagine-t2v.yaml","api-reference/openapi/grok-imagine--grok-imagine-t2v.zh.yaml","api-reference/openapi/grok-imagine--grok-imagine-i2v.yaml","api-reference/openapi/grok-imagine--grok-imagine-i2v.zh.yaml","api-reference/openapi/grok-imagine-1-5--grok-imagine-1-5-fast.yaml","api-reference/openapi/grok-imagine-1-5--grok-imagine-1-5-fast.zh.yaml","api-reference/openapi/grok-imagine-1-5--grok-imagine-1-5-preview.yaml","api-reference/openapi/grok-imagine-1-5--grok-imagine-1-5-preview.zh.yaml","api-reference/openapi/sora-2--sora-2-vip.yaml","api-reference/openapi/sora-2--sora-2-vip.zh.yaml","api-reference/openapi/gemini-omni--gemini-omni-t2v.yaml","api-reference/openapi/gemini-omni--gemini-omni-t2v.zh.yaml","api-reference/openapi/gemini-omni--gemini-omni-i2v.yaml","api-reference/openapi/gemini-omni--gemini-omni-i2v.zh.yaml","api-reference/openapi/gemini-omni--gemini-omni-r2v.yaml","api-reference/openapi/gemini-omni--gemini-omni-r2v.zh.yaml","api-reference/openapi/gemini-omni--gemini-omni-extend.yaml","api-reference/openapi/gemini-omni--gemini-omni-extend.zh.yaml","api-reference/openapi/gemini-omni-flash-1.1--gemini-omni-flash-1.1-t2v.yaml","api-reference/openapi/gemini-omni-flash-1.1--gemini-omni-flash-1.1-t2v.zh.yaml","api-reference/openapi/gemini-omni-flash-1.1--gemini-omni-flash-1.1-i2v.yaml","api-reference/openapi/gemini-omni-flash-1.1--gemini-omni-flash-1.1-i2v.zh.yaml","api-reference/openapi/gemini-omni-flash-1.1--gemini-omni-flash-1.1-r2v.yaml","api-reference/openapi/gemini-omni-flash-1.1--gemini-omni-flash-1.1-r2v.zh.yaml","api-reference/openapi/gemini-omni-flash-1.1-lite--gemini-omni-flash-1.1-lite-t2v.yaml","api-reference/openapi/gemini-omni-flash-1.1-lite--gemini-omni-flash-1.1-lite-t2v.zh.yaml","api-reference/openapi/gemini-omni-flash-1.1-lite--gemini-omni-flash-1.1-lite-i2v.yaml","api-reference/openapi/gemini-omni-flash-1.1-lite--gemini-omni-flash-1.1-lite-i2v.zh.yaml","api-reference/openapi/gemini-omni-flash-1.1-lite--gemini-omni-flash-1.1-lite-r2v.yaml","api-reference/openapi/gemini-omni-flash-1.1-lite--gemini-omni-flash-1.1-lite-r2v.zh.yaml","api-reference/openapi/gemini-omni-flash-1.2-lite--gemini-omni-flash-1.2-lite-t2v.yaml","api-reference/openapi/gemini-omni-flash-1.2-lite--gemini-omni-flash-1.2-lite-t2v.zh.yaml","api-reference/openapi/gemini-omni-flash-1.2-lite--gemini-omni-flash-1.2-lite-i2v.yaml","api-reference/openapi/gemini-omni-flash-1.2-lite--gemini-omni-flash-1.2-lite-i2v.zh.yaml","api-reference/openapi/gemini-omni-flash-1.2-lite--gemini-omni-flash-1.2-lite-r2v.yaml","api-reference/openapi/gemini-omni-flash-1.2-lite--gemini-omni-flash-1.2-lite-r2v.zh.yaml","api-reference/openapi/gemini-omni-flash-1.2-lite--gemini-omni-flash-1.2-lite-edit.yaml","api-reference/openapi/gemini-omni-flash-1.2-lite--gemini-omni-flash-1.2-lite-edit.zh.yaml","api-reference/openapi/gemini-omni-flash-1.2-lite--gemini-omni-flash-1.2-lite-extend.yaml","api-reference/openapi/gemini-omni-flash-1.2-lite--gemini-omni-flash-1.2-lite-extend.zh.yaml","api-reference/openapi/gemini-omni-flash-1.1--gemini-omni-flash-1.1-extend.yaml","api-reference/openapi/gemini-omni-flash-1.1--gemini-omni-flash-1.1-extend.zh.yaml","api-reference/openapi/minimax-h3--minimax-h3.yaml","api-reference/openapi/minimax-h3--minimax-h3.zh.yaml","api-reference/openapi/minimax-h3--minimax-h3-t2v.yaml","api-reference/openapi/minimax-h3--minimax-h3-t2v.zh.yaml","api-reference/openapi/minimax-h3--minimax-h3-i2v.yaml","api-reference/openapi/minimax-h3--minimax-h3-i2v.zh.yaml","api-reference/openapi/minimax-h3--minimax-h3-r2v.yaml","api-reference/openapi/minimax-h3--minimax-h3-r2v.zh.yaml","api-reference/openapi/query-video-task.yaml","api-reference/openapi/query-video-task.zh.yaml","api-reference/openapi/ark-query-video-task.yaml","api-reference/openapi/ark-query-video-task.zh.yaml","api-reference/openapi/grok-imagine-1-5--grok-imagine-1-5-vip.yaml","api-reference/openapi/grok-imagine-1-5--grok-imagine-1-5-vip.zh.yaml","api-reference/openapi/kling--kling-2-6-motion-control.yaml","api-reference/openapi/kling--kling-2-6-motion-control.zh.yaml","api-reference/openapi/kling-3.0--kling-3.0-t2v.yaml","api-reference/openapi/kling-3.0--kling-3.0-t2v.zh.yaml","api-reference/openapi/kling-3.0--kling-3.0-i2v.yaml","api-reference/openapi/kling-3.0--kling-3.0-i2v.zh.yaml","api-reference/openapi/kling-3.0--kling-3.0-turbo-t2v.yaml","api-reference/openapi/kling-3.0--kling-3.0-turbo-t2v.zh.yaml","api-reference/openapi/kling-3.0--kling-3.0-turbo-i2v.yaml","api-reference/openapi/kling-3.0--kling-3.0-turbo-i2v.zh.yaml","api-reference/openapi/kling-3.0--kling-3.0-omni-t2v.yaml","api-reference/openapi/kling-3.0--kling-3.0-omni-t2v.zh.yaml","api-reference/openapi/kling-3.0--kling-3.0-omni-i2v.yaml","api-reference/openapi/kling-3.0--kling-3.0-omni-i2v.zh.yaml","api-reference/openapi/kling-3.0--kling-3.0-omni-r2v.yaml","api-reference/openapi/kling-3.0--kling-3.0-omni-r2v.zh.yaml","api-reference/openapi/kling-3.0--kling-3.0-omni-edit.yaml","api-reference/openapi/kling-3.0--kling-3.0-omni-edit.zh.yaml","api-reference/openapi/kling-4.0--kling-4.0-t2v.yaml","api-reference/openapi/kling-4.0--kling-4.0-t2v.zh.yaml","api-reference/openapi/kling-4.0--kling-4.0-i2v.yaml","api-reference/openapi/kling-4.0--kling-4.0-i2v.zh.yaml","api-reference/openapi/kling-4.0--kling-4.0-r2v.yaml","api-reference/openapi/kling-4.0--kling-4.0-r2v.zh.yaml","api-reference/openapi/motion-control--motion-control-m1.yaml","api-reference/openapi/motion-control--motion-control-m1.zh.yaml","api-reference/openapi/seedance--doubao-seedance-1-0-pro-fast-i2v.yaml","api-reference/openapi/seedance--doubao-seedance-1-0-pro-fast-i2v.zh.yaml","api-reference/openapi/seedance--seedance-1-0-lite-i2v.yaml","api-reference/openapi/seedance--seedance-1-0-lite-i2v.zh.yaml","api-reference/openapi/seedance--seedance-1-0-lite-i2v-ref.yaml","api-reference/openapi/seedance--seedance-1-0-lite-i2v-ref.zh.yaml","api-reference/openapi/seedance--seedance-1-0-lite-t2v.yaml","api-reference/openapi/seedance--seedance-1-0-lite-t2v.zh.yaml","api-reference/openapi/seedance--seedance-1-0-pro-fast-i2v.yaml","api-reference/openapi/seedance--seedance-1-0-pro-fast-i2v.zh.yaml","api-reference/openapi/seedance--seedance-1-0-pro-fast-t2v.yaml","api-reference/openapi/seedance--seedance-1-0-pro-fast-t2v.zh.yaml","api-reference/openapi/seedance--seedance-1-0-pro-i2v.yaml","api-reference/openapi/seedance--seedance-1-0-pro-i2v.zh.yaml","api-reference/openapi/seedance--seedance-1-0-pro-t2v.yaml","api-reference/openapi/seedance--seedance-1-0-pro-t2v.zh.yaml","api-reference/openapi/seedance--seedance-1-5-pro-i2v.yaml","api-reference/openapi/seedance--seedance-1-5-pro-i2v.zh.yaml","api-reference/openapi/seedance--seedance-1-5-pro-t2v.yaml","api-reference/openapi/seedance--seedance-1-5-pro-t2v.zh.yaml","api-reference/openapi/seedance--2-0-mini-image-to-video.yaml","api-reference/openapi/seedance--2-0-mini-image-to-video.zh.yaml","api-reference/openapi/seedance--2-0-mini-reference-to-video.yaml","api-reference/openapi/seedance--2-0-mini-reference-to-video.zh.yaml","api-reference/openapi/seedance--2-0-mini-text-to-video.yaml","api-reference/openapi/seedance--2-0-mini-text-to-video.zh.yaml","api-reference/openapi/seedance--seedance-2-0-t2v-vip.yaml","api-reference/openapi/seedance--seedance-2-0-t2v-vip.zh.yaml","api-reference/openapi/seedance--2-0-lite-text-to-video.yaml","api-reference/openapi/seedance--2-0-lite-text-to-video.zh.yaml","api-reference/openapi/seedance--2-0-lite-image-to-video.yaml","api-reference/openapi/seedance--2-0-lite-image-to-video.zh.yaml","api-reference/openapi/seedance--2-0-lite-reference-to-video.yaml","api-reference/openapi/seedance--2-0-lite-reference-to-video.zh.yaml","api-reference/openapi/seedance--2-0-fast-lite-text-to-video.yaml","api-reference/openapi/seedance--2-0-fast-lite-text-to-video.zh.yaml","api-reference/openapi/seedance--2-0-fast-lite-image-to-video.yaml","api-reference/openapi/seedance--2-0-fast-lite-image-to-video.zh.yaml","api-reference/openapi/seedance--2-0-fast-lite-reference-to-video.yaml","api-reference/openapi/seedance--2-0-fast-lite-reference-to-video.zh.yaml","api-reference/openapi/seedance--2-0-mini-lite-text-to-video.yaml","api-reference/openapi/seedance--2-0-mini-lite-text-to-video.zh.yaml","api-reference/openapi/seedance--2-0-mini-lite-image-to-video.yaml","api-reference/openapi/seedance--2-0-mini-lite-image-to-video.zh.yaml","api-reference/openapi/seedance--2-0-mini-lite-reference-to-video.yaml","api-reference/openapi/seedance--2-0-mini-lite-reference-to-video.zh.yaml","api-reference/openapi/seedance--2-5-text-to-video.yaml","api-reference/openapi/seedance--2-5-text-to-video.zh.yaml","api-reference/openapi/seedance--2-5-image-to-video.yaml","api-reference/openapi/seedance--2-5-image-to-video.zh.yaml","api-reference/openapi/seedance--2-5-reference-to-video.yaml","api-reference/openapi/seedance--2-5-reference-to-video.zh.yaml","api-reference/openapi/seedance--2-5-video-edit.yaml","api-reference/openapi/seedance--2-5-video-edit.zh.yaml","api-reference/openapi/seedance--2-5-video-extend.yaml","api-reference/openapi/seedance--2-5-video-extend.zh.yaml","api-reference/openapi/seedance--2-5-draft.yaml","api-reference/openapi/seedance--2-5-draft.zh.yaml","api-reference/openapi/seedance--2-5-lite-text-to-video.yaml","api-reference/openapi/seedance--2-5-lite-text-to-video.zh.yaml","api-reference/openapi/seedance--2-5-lite-image-to-video.yaml","api-reference/openapi/seedance--2-5-lite-image-to-video.zh.yaml","api-reference/openapi/seedance--2-5-lite-reference-to-video.yaml","api-reference/openapi/seedance--2-5-lite-reference-to-video.zh.yaml","api-reference/openapi/veo--3-1-lite.yaml","api-reference/openapi/veo--3-1-lite.zh.yaml","api-reference/openapi/veo--3-1-lite-4k.yaml","api-reference/openapi/veo--3-1-lite-4k.zh.yaml","api-reference/openapi/wan--wan2-7-i2v.yaml","api-reference/openapi/wan--wan2-7-i2v.zh.yaml","api-reference/openapi/wan--wan2-7-t2v.yaml","api-reference/openapi/wan--wan2-7-t2v.zh.yaml","api-reference/openapi/wan--wan2-7-videoedit.yaml","api-reference/openapi/wan--wan2-7-videoedit.zh.yaml","api-reference/openapi/wan--wan3-0-video.yaml","api-reference/openapi/wan--wan3-0-video.zh.yaml","api-reference/openapi/wan--wan3-0-i2v.yaml","api-reference/openapi/wan--wan3-0-i2v.zh.yaml","api-reference/openapi/wan--wan3-0-r2v.yaml","api-reference/openapi/wan--wan3-0-r2v.zh.yaml","api-reference/openapi/wan--wan3-0-t2v.yaml","api-reference/openapi/wan--wan3-0-t2v.zh.yaml","api-reference/openapi/wan--wan3-0-video-prime.yaml","api-reference/openapi/wan--wan3-0-video-prime.zh.yaml","api-reference/openapi/wan--wan3-0-prime-i2v.yaml","api-reference/openapi/wan--wan3-0-prime-i2v.zh.yaml","api-reference/openapi/wan--wan3-0-prime-r2v.yaml","api-reference/openapi/wan--wan3-0-prime-r2v.zh.yaml","api-reference/openapi/wan--wan3-0-prime-t2v.yaml","api-reference/openapi/wan--wan3-0-prime-t2v.zh.yaml","api-reference/openapi/seedance--2-0-spicy-text-to-video.yaml","api-reference/openapi/seedance--2-0-spicy-text-to-video.zh.yaml","api-reference/openapi/seedance--2-0-spicy-image-to-video.yaml","api-reference/openapi/seedance--2-0-spicy-image-to-video.zh.yaml","api-reference/openapi/seedance--2-0-spicy-reference-to-video.yaml","api-reference/openapi/seedance--2-0-spicy-reference-to-video.zh.yaml","api-reference/openapi/seedance--2-5-spicy-text-to-video.yaml","api-reference/openapi/seedance--2-5-spicy-text-to-video.zh.yaml","api-reference/openapi/seedance--2-5-spicy-image-to-video.yaml","api-reference/openapi/seedance--2-5-spicy-image-to-video.zh.yaml","api-reference/openapi/seedance--2-5-spicy-reference-to-video.yaml","api-reference/openapi/seedance--2-5-spicy-reference-to-video.zh.yaml","api-reference/openapi/seedance--2-5-spicy-video-edit.yaml","api-reference/openapi/seedance--2-5-spicy-video-edit.zh.yaml","api-reference/openapi/seedance--2-5-spicy-video-extend.yaml","api-reference/openapi/seedance--2-5-spicy-video-extend.zh.yaml","api-reference/openapi/seedance--2-0-x-text-to-video.yaml","api-reference/openapi/seedance--2-0-x-text-to-video.zh.yaml","api-reference/openapi/seedance--2-0-x-reference-to-video.yaml","api-reference/openapi/seedance--2-0-x-reference-to-video.zh.yaml","api-reference/openapi/seedance--2-5-x-text-to-video.yaml","api-reference/openapi/seedance--2-5-x-text-to-video.zh.yaml","api-reference/openapi/seedance--2-5-x-reference-to-video.yaml","api-reference/openapi/seedance--2-5-x-reference-to-video.zh.yaml","api-reference/openapi/wan--wan3-0-spicy-t2v.yaml","api-reference/openapi/wan--wan3-0-spicy-t2v.zh.yaml","api-reference/openapi/wan--wan3-0-spicy-i2v.yaml","api-reference/openapi/wan--wan3-0-spicy-i2v.zh.yaml","api-reference/openapi/wan--wan3-0-spicy-r2v.yaml","api-reference/openapi/wan--wan3-0-spicy-r2v.zh.yaml","api-reference/openapi/wan--wan3-0-video-spicy.yaml","api-reference/openapi/wan--wan3-0-video-spicy.zh.yaml","api-reference/openapi/wan--wan3-0-pro-spicy-t2v.yaml","api-reference/openapi/wan--wan3-0-pro-spicy-t2v.zh.yaml","api-reference/openapi/wan--wan3-0-pro-spicy-i2v.yaml","api-reference/openapi/wan--wan3-0-pro-spicy-i2v.zh.yaml","api-reference/openapi/wan--wan3-0-pro-spicy-r2v.yaml","api-reference/openapi/wan--wan3-0-pro-spicy-r2v.zh.yaml","api-reference/openapi/wan--wan3-0-video-pro-spicy.yaml","api-reference/openapi/wan--wan3-0-video-pro-spicy.zh.yaml","api-reference/openapi/wan--wan3-0-prime-spicy-t2v.yaml","api-reference/openapi/wan--wan3-0-prime-spicy-t2v.zh.yaml","api-reference/openapi/wan--wan3-0-prime-spicy-i2v.yaml","api-reference/openapi/wan--wan3-0-prime-spicy-i2v.zh.yaml","api-reference/openapi/wan--wan3-0-prime-spicy-r2v.yaml","api-reference/openapi/wan--wan3-0-prime-spicy-r2v.zh.yaml","api-reference/openapi/wan--wan3-0-video-prime-spicy.yaml","api-reference/openapi/wan--wan3-0-video-prime-spicy.zh.yaml","api-reference/openapi/muse-video--muse-video-t2v.yaml","api-reference/openapi/muse-video--muse-video-t2v.zh.yaml","api-reference/openapi/muse-video--muse-video-i2v.yaml","api-reference/openapi/muse-video--muse-video-i2v.zh.yaml","api-reference/openapi/muse-video--muse-video-r2v.yaml","api-reference/openapi/muse-video--muse-video-r2v.zh.yaml","api-reference/openapi/gemini-omni-flash-1.2--gemini-omni-flash-1.2-edit.yaml","api-reference/openapi/gemini-omni-flash-1.2--gemini-omni-flash-1.2-edit.zh.yaml","api-reference/openapi/gemini-omni-flash-1.2--gemini-omni-flash-1.2-extend.yaml","api-reference/openapi/gemini-omni-flash-1.2--gemini-omni-flash-1.2-extend.zh.yaml","api-reference/openapi/gemini-omni-flash-1.2--gemini-omni-flash-1.2-i2v.yaml","api-reference/openapi/gemini-omni-flash-1.2--gemini-omni-flash-1.2-i2v.zh.yaml","api-reference/openapi/gemini-omni-flash-1.2--gemini-omni-flash-1.2-r2v.yaml","api-reference/openapi/gemini-omni-flash-1.2--gemini-omni-flash-1.2-r2v.zh.yaml","api-reference/openapi/gemini-omni-flash-1.2--gemini-omni-flash-1.2-t2v.yaml","api-reference/openapi/gemini-omni-flash-1.2--gemini-omni-flash-1.2-t2v.zh.yaml","api-reference/openapi/seedance--2-5-flash-text-to-video.yaml","api-reference/openapi/seedance--2-5-flash-text-to-video.zh.yaml","api-reference/openapi/seedance--2-5-flash-image-to-video.yaml","api-reference/openapi/seedance--2-5-flash-image-to-video.zh.yaml","api-reference/openapi/seedance--2-5-flash-reference-to-video.yaml","api-reference/openapi/seedance--2-5-flash-reference-to-video.zh.yaml","api-reference/openapi/seedance--2-5-flash-video-edit.yaml","api-reference/openapi/seedance--2-5-flash-video-edit.zh.yaml","api-reference/openapi/seedance--2-5-flash-video-extend.yaml","api-reference/openapi/seedance--2-5-flash-video-extend.zh.yaml","api-reference/openapi/seedance--2-5-flash-spicy-text-to-video.yaml","api-reference/openapi/seedance--2-5-flash-spicy-text-to-video.zh.yaml","api-reference/openapi/seedance--2-5-flash-spicy-image-to-video.yaml","api-reference/openapi/seedance--2-5-flash-spicy-image-to-video.zh.yaml","api-reference/openapi/seedance--2-5-flash-spicy-reference-to-video.yaml","api-reference/openapi/seedance--2-5-flash-spicy-reference-to-video.zh.yaml","api-reference/openapi/seedance--2-5-flash-spicy-video-edit.yaml","api-reference/openapi/seedance--2-5-flash-spicy-video-edit.zh.yaml","api-reference/openapi/seedance--2-5-flash-spicy-video-extend.yaml","api-reference/openapi/seedance--2-5-flash-spicy-video-extend.zh.yaml"],"playground":{"display":"interactive","proxy":false},"examples":{"defaults":"required","languages":["curl","python","go","rust","javascript"]},"url":"full"},"navbar":{"links":[{"href":"https://www.apipod.ai/models","label":"Models"},{"href":"https://www.apipod.ai/pricing","label":"Pricing"},{"href":"mailto:[email protected]","label":"Support"}],"primary":{"type":"button","label":"Console","href":"https://www.apipod.ai/console"}},"footer":{"socials":{"github":"https://github.com/APIPod"}},"search":{"prompt":"Search APIPod documentation"},"seo":{"indexing":"navigable"},"icons":{"library":"lucide"},"contextual":{"options":["copy","view","chatgpt","claude","cursor"],"display":"header"},"styling":{"latex":false},"navigation":{"languages":[{"language":"en","default":true,"href":"introduction"},{"language":"zh-CN","href":"zh-CN/introduction"}]}},"deployment":{"deploymentMetadataValue":{"subdomain":"apipod","hasAudioNarration":false,"actualSubdomain":"apipod","customDomains":["docs.apipod.ai"],"gitSource":{"type":"github","owner":"apipodai","repo":"docs","deployBranch":"main","contentDirectory":"","isPrivate":false,"mountPath":"","label":""},"feedback":{"thumbs":true,"agentFeedback":true},"entitlements":{},"buildId":"6afd152c5ec46423cf3ba590","clientVersion":"0.0.4270","searchFilterCounts":[{"language":"en","tag":"API Reference","count":133},{"language":"zh-CN","tag":"API 参考","count":133},{"language":"en","tag":"Videos","count":95},{"language":"zh-CN","tag":"视频","count":95},{"language":"en","tag":"Images","count":36},{"language":"en","tag":"Seedance","count":36},{"language":"zh-CN","tag":"图片","count":36},{"language":"zh-CN","tag":"Seedance","count":36},{"language":"en","tag":"Seedance 2.5","count":22},{"language":"zh-CN","tag":"Seedance 2.5","count":22},{"language":"en","tag":"Seedance 2.0","count":11},{"language":"zh-CN","tag":"Seedance 2.0","count":11},{"language":"en","tag":"Kling 3.0","count":10},{"language":"en","tag":"Seedream","count":10},{"language":"zh-CN","tag":"Kling 3.0","count":10},{"language":"zh-CN","tag":"Seedream","count":10},{"language":"en","tag":"Wan Video","count":9},{"language":"zh-CN","tag":"Wan Video","count":9},{"language":"en","tag":"Get Started","count":7},{"language":"zh-CN","tag":"开始使用","count":7}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableAskAiSearchBar":true},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-rbac-roles","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","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":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"site-roles","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"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":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-metadata","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"starter-pricing","enabled":true,"variant":{"name":"treatment","enabled":true,"payload":{"type":"string","value":"treatment"},"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"wildcard-email-auth","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":false},"customCss":[]}
{"page":{"pagePath":"webhooks","slug":"/webhooks","pageMetadata":{"title":"Webhooks","description":"Receive APIPod image and video task completion callbacks.","icon":"webhook","href":"/webhooks"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"Receive APIPod image and video task completion callbacks.\"\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,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,li:`li`,p:`p`,pre:`pre`,span:`span`,tbody:`tbody`,td:`td`,th:`th`,thead:`thead`,tr:`tr`,ul:`ul`,..._provideComponents(),...props.components},{CodeBlock,Heading,Table,Warning}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Table)_missingMdxReference(`Table`,true);if(!Warning)_missingMdxReference(`Warning`,true);return _jsxs(_Fragment,{children:[_jsxs(_components.p,{children:[`Add `,_jsx(_components.code,{children:`callback_url`}),` to an image or video generation request to receive a POST request when the task reaches `,_jsx(_components.code,{children:`completed`}),` or `,_jsx(_components.code,{children:`failed`}),`.`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`5`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`5`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"model\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"gpt-image-2\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"prompt\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"A technical cutaway illustration of a compact camera\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"callback_url\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"https://api.example.com/webhooks/apipod/opaque-route-token\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsx(Heading,{level:`2`,id:`callback-request`,children:`Callback request`}),`\n`,_jsxs(_components.p,{children:[`APIPod sends `,_jsx(_components.code,{children:`Content-Type: application/json`}),` and `,_jsx(_components.code,{children:`User-Agent: APIPod-Callback/1.0`}),`.`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`15`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`15`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"task_id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"img_example_task_id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"request_id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"req_example_request_id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"status\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"completed\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"result\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"https://example.com/generated-image.png\"`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ],`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"usage\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"completion_tokens\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`123`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"total_tokens\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`456`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"cost\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0.053`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"created_at\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"2026-08-10T09:00:00Z\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"completed_at\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"2026-08-10T09:01:30Z\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`A failed task uses the same envelope, without `,_jsx(_components.code,{children:`usage`}),`:`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`9`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`9`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"task_id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"img_example_task_id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"request_id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"req_example_request_id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"status\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"failed\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"error\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Upstream request failed. Please retry later.\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"error_code\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"UPSTREAM_CAPACITY_EXHAUSTED\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"created_at\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"2026-08-10T09:00:00Z\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"completed_at\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"2026-08-10T09:01:30Z\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.code,{children:`error_code`}),` is optional. Do not infer success from its absence; use `,_jsx(_components.code,{children:`status`}),`.`]}),`\n`,_jsx(Heading,{level:`2`,id:`usage-and-cost`,children:`Usage and cost`}),`\n`,_jsxs(_components.p,{children:[`Completed callbacks include a `,_jsx(_components.code,{children:`usage`}),` object with the final amount charged for the task:`]}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Field`}),_jsx(_components.th,{children:`Type`}),_jsx(_components.th,{children:`Description`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`usage.cost`})}),_jsx(_components.td,{children:`number`}),_jsx(_components.td,{children:`Final amount charged for this task, in USD. This is the settled amount after any post-completion adjustment, matching the cost shown in the dashboard.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`usage.prompt_tokens`})}),_jsx(_components.td,{children:`integer`}),_jsx(_components.td,{children:`Present only when the upstream provider reports token usage.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`usage.completion_tokens`})}),_jsx(_components.td,{children:`integer`}),_jsx(_components.td,{children:`Present only when the upstream provider reports token usage.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`usage.total_tokens`})}),_jsx(_components.td,{children:`integer`}),_jsx(_components.td,{children:`Present only when the upstream provider reports token usage.`})]})]})]}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.code,{children:`usage`}),` appears only on `,_jsx(_components.code,{children:`completed`}),` callbacks. Failed tasks are refunded per the model’s refund policy and carry no usage object.`]}),`\n`,_jsx(Heading,{level:`2`,id:`image-metadata`,children:`Image metadata`}),`\n`,_jsxs(_components.p,{children:[`For layer-decomposition models (`,_jsx(_components.code,{children:`seedream-5.0-pro-layer`}),`, `,_jsx(_components.code,{children:`seedream-5.0-flash-layer`}),`), each item in the completed callback’s `,_jsx(_components.code,{children:`result`}),` is an object with `,_jsx(_components.code,{children:`url`}),`, `,_jsx(_components.code,{children:`z_index`}),`, `,_jsx(_components.code,{children:`bounding_box`}),`, `,_jsx(_components.code,{children:`name`}),` and `,_jsx(_components.code,{children:`description`}),` instead of a plain URL string. The format is identical to the `,_jsx(_components.code,{children:`result`}),` field of the `,_jsx(_components.a,{href:`/query-image-task`,children:`query image task`}),` endpoint. Other models keep sending `,_jsx(_components.code,{children:`result`}),` as an array of URL strings.`]}),`\n`,_jsx(Heading,{level:`2`,id:`delivery-behavior`,children:`Delivery behavior`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[`Any HTTP status from `,_jsx(_components.code,{children:`200`}),` through `,_jsx(_components.code,{children:`299`}),` acknowledges the callback.`]}),`\n`,_jsx(_components.li,{children:`Non-2xx responses and network errors are retried.`}),`\n`,_jsx(_components.li,{children:`APIPod currently makes up to five delivery attempts with exponential backoff.`}),`\n`,_jsx(_components.li,{children:`Duplicate delivery is possible, so receivers must be idempotent.`}),`\n`,_jsx(_components.li,{children:`Callback delivery is asynchronous and does not change the task’s terminal state.`}),`\n`]}),`\n`,_jsx(Heading,{level:`2`,id:`secure-the-receiver`,children:`Secure the receiver`}),`\n`,_jsx(Warning,{children:_jsx(_components.p,{children:`The current public callback contract does not include a signature header. Do not claim that a callback is authenticated solely because its JSON shape looks correct.`})}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:`Use HTTPS and a high-entropy, unguessable token in the callback path.`}),`\n`,_jsx(_components.li,{children:`Keep the callback URL server-side; do not expose it in client applications.`}),`\n`,_jsxs(_components.li,{children:[`Match `,_jsx(_components.code,{children:`task_id`}),` and `,_jsx(_components.code,{children:`request_id`}),` against tasks your system created.`]}),`\n`,_jsx(_components.li,{children:`Store a processed-event key and make duplicate callbacks return the same successful outcome.`}),`\n`,_jsx(_components.li,{children:`Validate field types and reject unexpectedly large bodies.`}),`\n`,_jsx(_components.li,{children:`Return 2xx only after the callback has been durably accepted; process slow work asynchronously.`}),`\n`,_jsx(_components.li,{children:`If authenticity is critical, query the authenticated status endpoint before applying irreversible business actions.`}),`\n`]}),`\n`,_jsx(Heading,{level:`2`,id:`minimal-receiver`,children:`Minimal receiver`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`18`,language:`javascript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`javascript`,children:_jsxs(_components.code,{language:`javascript`,numberOfLines:`18`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` express`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` from`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"express\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` app`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` express`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`();`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`app`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`use`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`express`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`json`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`({ `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`limit:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"64kb\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }));`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`app`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`post`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"/webhooks/apipod/:token\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`async`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`req`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`res`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`=>`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` if`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`req`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`params`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`token`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` !==`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` process`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`env`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:`APIPOD_WEBHOOK_TOKEN`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` return`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` res`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`sendStatus`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`404`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` const`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:`task_id`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:`request_id`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:`status`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` } `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` req`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`body`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` if`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`!`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`task_id`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` ||`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` !`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`request_id`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` ||`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` !`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`[`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"completed\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"failed\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`].`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`includes`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`status`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)) {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` return`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` res`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`sendStatus`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`400`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` await`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` persistIdempotently`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`({ `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`task_id`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`request_id`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`payload:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` req`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`body`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` });`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` return`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` res`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`sendStatus`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`204`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`});`})}),`\n`]})})})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Webhooks","description":"Receive APIPod image and video task completion callbacks.","icon":"webhook","href":"/webhooks"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Callback request","slug":"callback-request","depth":2,"children":[]},{"title":"Usage and cost","slug":"usage-and-cost","depth":2,"children":[]},{"title":"Image metadata","slug":"image-metadata","depth":2,"children":[]},{"title":"Delivery behavior","slug":"delivery-behavior","depth":2,"children":[]},{"title":"Secure the receiver","slug":"secure-the-receiver","depth":2,"children":[]},{"title":"Minimal receiver","slug":"minimal-receiver","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":[],"subdomain":"apipod","siteName":"APIPod Docs","title":"Webhooks - APIPod Docs","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{"en":{"href":"/webhooks","matchLevel":0},"zh-CN":{"href":"/zh-CN/webhooks","matchLevel":1}}},"lastModified":"2026-11-18T00:19:28.268Z","originalFileLocation":"webhooks.mdx","locale":"en"},"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=\"Receive APIPod image and video task completion callbacks.\">\u003cmeta data-mint-head name=\"application-name\" content=\"APIPod Docs\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/apipod/vxS4fP5ezbC3ZtwJ/_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/apipod/vxS4fP5ezbC3ZtwJ/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/apipod/vxS4fP5ezbC3ZtwJ/_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/apipod/vxS4fP5ezbC3ZtwJ/_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/apipod/vxS4fP5ezbC3ZtwJ/_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/apipod/vxS4fP5ezbC3ZtwJ/_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/apipod/vxS4fP5ezbC3ZtwJ/_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/apipod/vxS4fP5ezbC3ZtwJ/_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/apipod/vxS4fP5ezbC3ZtwJ/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Webhooks - APIPod Docs\">\u003cmeta data-mint-head property=\"og:description\" content=\"Receive APIPod image and video task completion callbacks.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"APIPod Docs\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.apipod.ai/webhooks\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://apipod.mintlify.site/_mintlify/api/og/v2?division=Core+concepts\u0026amp;title=Webhooks\u0026amp;description=Receive+APIPod+image+and+video+task+completion+callbacks.\u0026amp;theme=5aea6f2132a648cb0995271a\u0026amp;signature=03d2f43b3dbae883bfc47d76c02e0b1b0ab74585fd8da3447c6531b0b3783b5d\">\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=\"Webhooks - APIPod Docs\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Receive APIPod image and video task completion callbacks.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://apipod.mintlify.site/_mintlify/api/og/v2?division=Core+concepts\u0026amp;title=Webhooks\u0026amp;description=Receive+APIPod+image+and+video+task+completion+callbacks.\u0026amp;theme=5aea6f2132a648cb0995271a\u0026amp;signature=03d2f43b3dbae883bfc47d76c02e0b1b0ab74585fd8da3447c6531b0b3783b5d\">\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/apipod/vxS4fP5ezbC3ZtwJ/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"APIPod Docs\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#7F22FE\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.apipod.ai/webhooks\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/webhooks.md\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"en\" href=\"https://docs.apipod.ai/webhooks\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"zh-CN\" href=\"https://docs.apipod.ai/zh-CN/webhooks\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"x-default\" href=\"https://docs.apipod.ai/webhooks\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.apipod.ai/#organization\",\"name\":\"APIPod Docs\",\"url\":\"https://docs.apipod.ai\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/apipod/eQooMSJ0T7lbhJsR/logo.svg?fit=max\u0026auto=format\u0026n=eQooMSJ0T7lbhJsR\u0026q=85\u0026s=8c3136fb3cec60f625ec4693d5313b42\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.apipod.ai#website\",\"name\":\"APIPod Docs\",\"url\":\"https://docs.apipod.ai\",\"publisher\":{\"@id\":\"https://docs.apipod.ai/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.apipod.ai/webhooks#webpage\",\"url\":\"https://docs.apipod.ai/webhooks\",\"name\":\"Webhooks\",\"description\":\"Receive APIPod image and video task completion callbacks.\",\"dateModified\":\"2026-11-18T00:19:28.268Z\",\"isPartOf\":{\"@id\":\"https://docs.apipod.ai#website\"},\"breadcrumb\":{\"@id\":\"https://docs.apipod.ai/webhooks#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.apipod.ai/webhooks#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Core concepts\",\"item\":\"https://docs.apipod.ai/asynchronous-tasks\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Webhooks\",\"item\":\"https://docs.apipod.ai/webhooks\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://docs.apipod.ai/webhooks#article\",\"headline\":\"Webhooks\",\"name\":\"Webhooks\",\"description\":\"Receive APIPod image and video task completion callbacks.\",\"url\":\"https://docs.apipod.ai/webhooks\",\"mainEntityOfPage\":{\"@id\":\"https://docs.apipod.ai/webhooks#webpage\"},\"dateModified\":\"2026-11-18T00:19:28.268Z\",\"publisher\":{\"@id\":\"https://docs.apipod.ai/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.apipod.ai#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"APIPod Docs\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"APIPod Docs\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/webhooks.md","siteName":"APIPod Docs","nav":{"global":null,"languages":[{"language":"en","default":true,"tabs":[{"tab":"Get Started","groups":[{"group":"Overview","icon":"compass","pages":[{"title":"Welcome to APIPod","icon":"house","href":"/introduction"},{"title":"Quickstart","icon":"rocket","href":"/quickstart"},{"title":"Authentication","icon":"key-round","href":"/authentication"},{"title":"Endpoint conventions","icon":"route","href":"/endpoint-conventions"}]},{"group":"Core concepts","icon":"blocks","pages":[{"title":"Asynchronous tasks","description":"Create, poll, and complete APIPod image and video tasks.","icon":"clock-3","href":"/asynchronous-tasks"},{"title":"Webhooks","icon":"webhook","href":"/webhooks"},{"title":"Error codes","description":"Handle APIPod HTTP, synchronous, and asynchronous errors.","icon":"circle-alert","href":"/error-codes"}]}]},{"tab":"API Reference","pages":[{"title":"API Reference","href":"/gpt-image-2/gpt-image-2"}]}]},{"language":"zh-CN","pages":[{"title":"zh-CN","href":"/zh-CN/webhooks"}]}]},"basePath":"","title":"Webhooks - APIPod Docs","deploymentId":"dpl_DyXGnKeCjZyA3sUdfMJ7FjkdBefg","buildId":"dpl_DyXGnKeCjZyA3sUdfMJ7FjkdBefg","dynamics":[],"chunks":[]}