跳转到主要内容
POST
/
sora
/
videos
Sora Videos
curl --request POST \
  --url https://api.acedata.cloud/sora/videos \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "model": "sora-2",
  "prompt": "cat running on the river"
}
'
{
  "success": true,
  "task_id": "b8976e18-32dc-4718-9ed8-1ea090fcb6ea",
  "trace_id": "fb751e1e-4705-49ea-9fd4-5024b7865ea2",
  "data": [
    {
      "id": "sora-2:task_01k777hjrbfrgs2060q5zvf2a5",
      "video_url": "https://cdn.acedata.cloud/sora/example-video.mp4",
      "state": "succeeded"
    }
  ]
}

授权

Authorization
string
header
必填

请求头

accept
enum<string>

Specifies the format of the response from the server. If not specified, the default format is application/json. If application/x-ndjson is specified, the response will be in newline-delimited JSON format, streaming the response chunk by chunk

可用选项:
application/json,
application/x-ndjson

请求体

application/json
model
enum<string>
必填

The model used to generate the videos. sora-2 is the standard model, sora-2-pro is the high-quality model with longer duration support.

可用选项:
sora-2,
sora-2-pro
示例:

"sora-2"

prompt
string
必填

The text prompt describing the video to generate.

示例:

"cat running on the river"

duration
enum<integer>

Video duration in seconds. For version 1.0: 10 or 15 (sora-2), or 10, 15, 25 (sora-2-pro). For version 2.0: 4, 8, or 12. Default: 15 for version 1.0, 4 for version 2.0.

可用选项:
4,
8,
10,
12,
15,
25
orientation
enum<string>

Video orientation. Only applicable when version is 1.0. landscape for horizontal (16:9), portrait for vertical (9:16).

可用选项:
landscape,
portrait
size
enum<string>

Video size/resolution. For version 1.0: small (standard definition) or large (HD, only supported in sora-2-pro). For version 2.0: pixel resolution like 720x1280, 1280x720, 1024x1792, or 1792x1024. Default for version 2.0: 720x1280.

可用选项:
small,
large,
720x1280,
1280x720,
1024x1792,
1792x1024
character_url
string

Video URL containing the character to use. Only applicable when version is 1.0. Real people must not appear in the video, otherwise the task will fail.

示例:

"https://cdn.acedata.cloud/pdidf5.mp4"

character_start
integer

The starting second for the character appearance in the video. Only applicable when version is 1.0. Required when character_url is provided.

character_end
integer

The ending second for the character appearance in the video. Only applicable when version is 1.0. Required when character_url is provided. The range (character_end - character_start) must be between 1 and 3 seconds.

image_urls
string[]

An array of reference image URLs to guide video generation. For version 1.0: supports multiple images. For version 2.0: only the first image is used and its dimensions should match the size parameter. Do not include images of real people or existing US brand logos, as this may cause the task to fail.

callback_url
string

The callback URL which will be called when the video is generated

version
enum<string>
默认值:1.0

The API version to use. Version 1.0 supports duration (10/15/25s), orientation, size (small/large), image_urls, and character parameters. Version 2.0 supports duration (4/8/12s), pixel-based size (e.g. 720x1280), and image_urls (first image used as reference).

可用选项:
1.0,
2.0

响应

OK, the request is successful.

success
boolean

Whether the request was successful

task_id
string

The unique task ID for this video generation request

trace_id
string

The trace ID for this request, used for debugging

data
object[]

The generated video items