POST/videos/editsDeprecated

Create a video edit

Create a new video generation job by editing a source video or existing generated video.

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

2 body fields
videoobjectrequired
Reference to the completed video to edit.
promptstringrequired
Text prompt that describes how to edit the source video.

6 status codes
200Success
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.
400The edit request or source video is invalid, or the organization does not support video generation.
errorobjectrequired
404The source video or a referenced character was not found or is not accessible, the source video is not ready, or the Videos API is unavailable.
errorobjectrequired
429The request was rejected because a rate limit was exceeded. A slow_down error means traffic increased too quickly; reduce your request rate, then 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
500The source video media is unavailable or the edit task could not be created.
errorobjectrequired
503The service is temporarily unavailable. A server_is_overloaded error means the requested model is temporarily overloaded; 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: The edit request or source video is invalid, or the organization does not support video generation. A 404 is returned: The source video or a referenced character was not found or is not accessible, the source video is not ready, or the Videos API is unavailable. A 429 is returned: The request was rejected because a rate limit was exceeded. A slow_down error means traffic increased too quickly; reduce your request rate, then increase it gradually. A 500 is returned: The source video media is unavailable or the edit task could not be created. A 503 is returned: The service is temporarily unavailable. A server_is_overloaded error means the requested model is temporarily overloaded; retry after a brief delay.