Inference API

Videos

View as Markdown

Video generation

/v1/videos/generations

Generate a video from a text prompt and optionally an image. This is an asynchronous operation that returns a request_id for polling.

Request Body

prompt

string

required

Prompt for video generation.

Response Body

request_id

string

A unique request ID to poll for the result.


Video edit

/v1/videos/edits

Edit a video based on a prompt. This is an asynchronous operation that returns a request_id for polling.

Request Body

prompt

string

required

Prompt for video editing.

video

object

required

Video URL for video editing input

Response Body

request_id

string

A unique request ID to poll for the result.


Video extension

/v1/videos/extensions

Extend a video by generating continuation content. This is an asynchronous operation that returns a request_id for polling.

Request Body

prompt

string

required

Prompt describing what should happen next in the video.

video

object

required

Video URL for video editing input

Response Body

request_id

string

A unique request ID to poll for the result.


Get video generation results

/v1/videos/{request_id}

Get the result of a deferred video generation request.

Path parameters

request_id

string

required

The deferred request id returned by a previous video generation request.

Response Body

model

string

The model used to generate the video.

progress

integer

min: 0

max: 100

Approximate completion percentage for the video generation task (0-100). - When status is "pending": progress is between 0-99, indicating current completion. - When status is "done": progress is 100. - When status is "failed": progress is 0.

status

string

Status of the video generation: "done" when the video is ready.

video

object

Generated video.


Did you find this page helpful?