Skip to main content
requestId is the UUID sent as idempotencyKey in POST /api/generate/v2. It is different from the returned generationId. This authenticated read-only endpoint never dispatches generation. Any active API key belonging to the same owning account can recover an API-token attempt, including after a host restart or key replacement. It cannot adopt a Web-session free-credit task into API-token billing. Keep the UUID and exact input in durable workflow state before submitting. If the submission response is lost, look up that UUID; do not allocate a fresh one. MCP wraps this endpoint with check_generation(requestId=...) and adds its common structured envelope. The native HTTP body below is a receipt, not the MCP envelope.

Request

Set REQUEST_ID from the saved workflow step and keep the token in private environment/credential settings:

Receipt and recovery states

HTTP 200 can include success, requestId, generationId, deduped, status (processing, completed, failed), modelId, creditsUsed, creditsStatus, aspectRatio, mediaType, imageUrl, imageUrls, videoUrl, error and failureCode. Availability depends on the job state. Only completed media URLs are usable artifacts. Confirm refunds from creditsStatus, not a generic failure message. Other saved pre-charge rejections can retain their original HTTP status. Follow the specific error rather than polling a rejected request indefinitely. Real Retry-After/retry timing remains authoritative. This behavior is for ordinary image/video generation. The five Skills APIs retain their own original-key receipts and check_skill recovery rules, including their different handling of a rejected payment attempt.

Input consistency and legacy requests

New API-token attempts compare caller inputs before defaults: object-key order does not matter, but other values must match. A changed model, prompt, image URL, duration or quality is not a retry of the same inputs. Persist resolved reference URLs so an unchanged source is not re-uploaded under a different URL during recovery. Legacy jobs may not contain the full original input fingerprint. Compatibility lookup can recover them, but cannot retroactively prove every historical parameter match. Use a persistent UUID for each new logical attempt. See N scripts → frames → videos for budget and scheduling boundaries.