跳转到主要内容
POST
/
generate
/
k
/
sora2-text-to-video
Sora2 文本转视频
curl --request POST \
  --url https://api.sinancode.com/v1/generate/k/sora2-text-to-video \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "aspect_ratio": "landscape",
  "n_frames": 10,
  "prompt": "a cat playing with a ball",
  "remove_watermark": false
}'
{
  "task_id": "01234567-89ab-cdef-0123-456789abcdef"
}
OpenAI Sora 2 模型,从文本描述生成高质量视频,支持 10-15 秒时长。

Authorizations

Authorization
string
header
required

请使用您的 API Token 进行认证

Body

application/json

任务参数

prompt
string
required

提示词(必填)

Example:

"a cat playing with a ball"

aspect_ratio
enum<string>
default:landscape

宽高比(可选,默认 landscape)

可用选项:
portrait,
landscape
Example:

"landscape"

n_frames
enum<integer>
default:10

视频时长(可选,10或15秒,默认10)

可用选项:
10,
15
Example:

10

remove_watermark
boolean

移除水印(可选)

Example:

false

Response

OK

task_id
string
required

Task ID

Example:

"01234567-89ab-cdef-0123-456789abcdef"