Skip to main content
POST

Authorizations

X-Api-Key
string
header
required

Need to get API Key from AiToEarn. Click to go to "API Key Obtaining Tutorial".

Body

application/json
model
string
required

Video generation model name. First call the "Video Generation Model" interface (GET /api/ai/models/video/generation) and pass in the data[n].name returned by it; the resolution, duration, aspect ratio and price supported by each model are subject to the return of this interface.

Minimum string length: 1
prompt
string
required

Prompt word, length 1-4000 characters

Required string length: 1 - 4000
images
string[]

Reference image URL list. The maximum number and format limits vary from model to model, and are subject to the data[n].maxInputImages and data[n].inputConstraints returned by the "Video Generation Model" interface.

videos
string[]

Reference video URL list. Whether video input is supported, as well as the quantity, format, duration, and size limits vary from model to model, and are subject to the data[n].modes and data[n].inputConstraints returned by the "Video Generation Model" interface.

audios
string[]

Reference audio URL list. Whether audio input is supported, as well as the quantity, format, duration, and size limits vary from model to model, and are subject to the data[n].modes and data[n].inputConstraints returned by the "Video Generation Model" interface.

resolution
enum<string>

Video resolution. The optional values ​​vary from model to model, and are subject to the data[n].resolutions returned by the "Video Generation Model" interface.

Available options:
480p,
720p,
1080p
ratio
string

Video aspect ratio. The optional values ​​vary from model to model, and are subject to the data[n].aspectRatios returned by the "Video Generation Model" interface.

duration
number

Video duration (seconds). The optional range varies with the model, and is subject to the data[n].durations returned by the "Video Generation Model" interface.

Response

200 - application/json

The request has been processed by the service. Business success is determined by whether the response body has code === 0.

code
integer
required

Business status code. 0 means success; non-zero means a business error.

message
string
required

Response message.

data
object
requestId
string

Request ID.

timestamp
integer

Error response timestamp in Unix milliseconds.