Skip to main content
POST
Create a video

Authorizations

Authorization
string
header
required

Your one-api.ai API key.

Query Parameters

wait
integer
default:0

Hold the call open until the task finishes, for at most this many seconds. Prefer: wait=<seconds> does the same.

Required range: 0 <= x <= 60

Body

application/json
model
enum<string>
required
Available options:
p-video
prompt
string
required

What to film.

Required string length: 1 - 2500
duration
integer
default:5

Length in seconds.

Required range: 1 <= x <= 20
resolution
enum<string>
default:720p
Available options:
720p,
1080p
aspect_ratio
enum<string>
default:16:9
Available options:
16:9,
9:16,
4:3,
3:4,
3:2,
2:3,
1:1
draft
boolean
default:false

A faster, lower-quality preview at a quarter of the price.

seed
integer

Seed for a reproducible result.

Response

The task was accepted. Without wait, the entry holds the task id and submitted. With wait, it also holds the task as it stood when the wait ended.

code
integer
required
Example:

200

data
object[]
required
Required array length: 1 element