POST/videos/extensionsDeprecated

Create a video extension

Creates an extension of a completed video and returns a video generation job. Provide the source video, an updated prompt, and seconds set to an accepted duration. This operation is closing down and will be removed on a date not specified in the API definition.

  • IdempotentThe SDK sends Idempotency-Key, so a retried request is only applied once.

3 body fields

Video extension parameters. Send the body as JSON or multipart form data, including the source video, updated prompt, and extension duration.

videoobjectrequired
Reference to the completed video to extend.
promptstringrequired
Updated text prompt that directs the extension generation.
secondsstringrequired
Length of the newly generated extension segment in seconds (allowed values: 4, 8, 12, 16, 20).
Allowed:4812

6 status codes
200Returns the video generation job, including its identifier, status, progress, prompt, resolution, duration, and timestamps.
idstringrequired
Unique identifier for the video job.
objectstringrequired
The object type, which is always `video`.
Allowed:videoDefault:video
modelstringrequired
The video generation model that produced the job.
statusstringrequired
Current lifecycle status of the video job.
Allowed:queuedin_progresscompletedfailed
progressintegerrequired
Approximate completion percentage for the generation task.
created_atintegerrequired
Unix timestamp (seconds) for when the job was created.
completed_atintegerrequired
Unix timestamp (seconds) for when the job completed, if finished.
expires_atintegerrequired
Unix timestamp (seconds) for when the downloadable assets expire, if set.
promptstringrequired
The prompt that was used to generate the video.
sizestringrequired
The resolution of the generated video.
Allowed:720x12801280x7201024x17921792x1024
secondsstringrequired
Duration of the generated clip in seconds. For extensions, this is the stitched total duration.
remixed_from_video_idstringrequired
Identifier of the source video if this video is a remix.
errorobjectrequired
Error payload that explains why generation failed, if applicable.
400Returned when the extension request or source video is invalid, or the organization does not support video generation.
errorobjectrequired
404Returned when the source video was not found or is not accessible, is not ready, or the Videos API is unavailable.
errorobjectrequired
429Returned when the request exceeds a rate limit. For a `slow_down` error, reduce your request rate and increase it gradually.

One documented failure

  • slow_down

    Your request rate increased too quickly. Please reduce the request rate and gradually increase it again.

    Traffic increased too quickly

errorobjectrequired
500Returned when the source video media is unavailable or the extension task could not be created.
errorobjectrequired
503Returned when the service is temporarily unavailable. For a `server_is_overloaded` error, retry after a brief delay.

One documented failure

  • server_is_overloaded

    The model is temporarily overloaded. Please retry your request after a brief delay.

    The requested model is temporarily overloaded

errorobjectrequired

Error handling

A 400 is returned when the extension request or source video is invalid or video generation is unsupported; a 404 indicates the source video is unavailable, not ready, or the Videos API is unavailable; a 429 indicates a rate limit was exceeded; a 500 means the source media is unavailable or the task could not be created; and a 503 indicates temporary service unavailability. The request must include video, prompt, and seconds; prompt must be 1 to 32,000 characters, and seconds must be 4, 8, or 12.