跳转到主要内容
创建视频生成任务
curl --request POST \
  --url https://xxx.wengaocloud.com/v1/videos/generations \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "model": "seedance-2.0",
  "prompt": "一段未来城市夜景的短视频"
}
'
{
  "id": "<string>",
  "object": "task",
  "result": {},
  "error": {
    "error": {
      "type": "invalid_request_error",
      "code": "model_endpoint_mismatch",
      "message": "该模型不支持当前 endpoint。"
    }
  },
  "usage": {}
}

授权

Authorization
string
header
默认值:sk-your-api-key
必填

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

请求体

application/json
model
string
必填
prompt
string
必填
duration
integer
必填范围: x >= 1
size
string
示例:

"1280x720"

响应

任务已受理。

id
string
object
string
示例:

"task"

status
enum<string>
可用选项:
queued,
running,
succeeded,
failed,
cancelled,
expired
result
object
error
object
usage
object