Skip to main content
POST
/
api
/
ai
/
video
/
generations
curl --request POST \
  --url https://aitoearn.cn/api/ai/video/generations \
  --header 'Content-Type: application/json' \
  --header 'X-Api-Key: <api-key>' \
  --data '
{
  "model": "seedance-2-beta-1080p",
  "prompt": "Generate a travel vlog style video, the picture is used as the subject reference, the video is used as the movement reference, the audio is used as the rhythm reference, the picture is natural and real"
}
'
{
  "code": 0,
  "message": "Request succeeded",
  "data": {
    "id": "string",
    "status": "string"
  }
}

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.