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.


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.

status

string

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

video

object

Generated video.


Did you find this page helpful?