POST
/v1/videosStart a video generation job
Start an asynchronous video generation job from a text prompt. Poll GET /v1/videos/{video_id} until the job reaches a terminal status, then download the MP4 with GET /v1/videos/{video_id}/content or from output.url when present.
- IdempotentThe SDK sends
Idempotency-Key, so a retried request is only applied once.
modelstringrequired
The video generation model to use.
promptstringrequired
A text description of the desired video.
sizestringoptional
The output resolution, for example `1280x720`.
fpsintegeroptional
Frames per second for the generated video.
200Video generation job accepted.
idstringrequired
The video generation job identifier.
objectstringoptional
Object type returned by the API.
created_atintegeroptional
Unix timestamp (in seconds) of when the job was created.
modelstringoptional
The model used for generation.
statusstringrequired
Job status. Poll until the value is a terminal state such as `completed` or `failed`.
outputobjectoptional
errorobjectoptional
Error details when status is `failed`.
x_request_idstringoptional
Request correlation identifier when provided by the API.
401Authentication failed due to invalid credentials.
idstringrequired
A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
messagestringrequired
A message providing additional information about the error, including details to help resolve it when possible.
request_idstringoptional
Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
429The API rate limit has been exceeded.
idstringrequired
A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
messagestringrequired
A message providing additional information about the error, including details to help resolve it when possible.
request_idstringoptional
Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
500There was a server error.
idstringrequired
A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
messagestringrequired
A message providing additional information about the error, including details to help resolve it when possible.
request_idstringoptional
Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
defaultThere was an unexpected error.
idstringrequired
A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found."
messagestringrequired
A message providing additional information about the error, including details to help resolve it when possible.
request_idstringoptional
Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue.
Error handling
A 401 is returned: Authentication failed due to invalid credentials. A 429 is returned: The API rate limit has been exceeded. A 500 is returned: There was a server error. Any other status is an error: There was an unexpected error.