官方文档:https://platform.vidu.cn/docs/text-to-video
POST
/ent/v2/text2video创建文生视频任务
API Key application/json
请求示例
curl -X POST https://top.qingyuntop.ai/ent/v2/text2video \
-H "Authorization: Bearer ${QINGYUN_TOP_API_KEY}" \
-H "Content-Type: application/json" \
-d '{
"model": "viduq2",
"prompt": "一只可爱的小猫在花园里玩耍,阳光明媚,画面温馨"
}'请求参数
| 参数 | 位置 | 类型 | 必填 | 说明 | 示例 |
|---|---|---|---|---|---|
Authorization | Header | string | 否 | - | Bearer {{YOUR_API_KEY}} |
Content-Type | Header | string | 否 | - | application/json |
model | JSON body | string | 是 | 模型名称 可选值:viduq3-turbo 、viduq3-pro 、viduq2 、viduq1 - viduq3-turbo:对比viduq3-pro,生成速度更快 - viduq3-pro:高效生成优质音视频内容,让视频内容更生动、更形象、更立体,效果更好 - viduq2:最新模型 - viduq1:画面清晰,平滑转场,运镜稳定 | - |
style | JSON body | string | 否 | 风格 默认 general,可选值:general、anime general:通用风格,可以通过提示词来控制风格 anime:动漫风格,仅在动漫风格表现突出,可以通过不同的动漫风格提示词来控制 注:使用q2模型时该参数不生效 | - |
prompt | JSON body | string | 是 | 文本提示词 生成视频的文本描述。 注:字符长度不能超过 2000 个字符 | - |
duration | JSON body | number | 否 | 视频时长参数,默认值依据模型而定: - viduq3-pro、viduq3-turbo: 默认5秒,可选:1-16 - viduq2 : 默认5秒,可选:1-10 - viduq1 : 默认5秒,可选:5 | - |
seed | JSON body | string | 否 | 随机种子 当默认不传或者传0时,会使用随机数替代 手动设置则使用设置的种子 | - |
aspect_ratio | JSON body | string | 否 | 比例 默认 16:9,可选值:16:9、9:16、3:4、4:3、1:1 注:3:4、4:3仅支持q2模型 | - |
resolution | JSON body | string | 否 | 分辨率参数,默认值依据模型和视频时长而定: - viduq3-pro、viduq3-turbo(1-16秒):默认 720p,可选:540p、720p、1080p - viduq2(1-10秒):默认 720p,可选:540p、720p、1080p - viduq1(5秒):默认 1080p,可选:1080p | - |
movement_amplitude | JSON body | string | 否 | 运动幅度 默认 auto,可选值:auto、small、medium、large 注:使用q2模型时该参数不生效 | - |
bgm | JSON body | string | 否 | 是否为生成的视频添加背景音乐。 默认:false,可选值 true 、false 传 true 时系统将从预设 BGM 库中自动挑选合适的音乐并添加;不传或为 false 则不添加 BGM。 - BGM不限制时长,系统根据视频时长自动适配 | - |
payload | JSON body | string | 否 | 透传参数 不做任何处理,仅数据传输 注:最多 1048576个字符 | - |
watermark | JSON body | string | 否 | 是否添加水印 - true:添加水印; - false:不添加水印; 注1:目前水印内容为固定,内容由AI生成,默认不加 注2:您可以通过watermarked_url参数查询获取带水印的视频内容,详情见查询任务接口 | - |
wm_position | JSON body | string | 否 | 水印位置,表示水印出现在图片的位置,可选项为: 1:左上角 2:右上角 3:右下角 4:左下角 默认为:3 | - |
wm_url | JSON body | string | 否 | 水印内容,此处为图片URL 不传时,使用默认水印:内容由AI生成 | - |
meta_data | JSON body | string | 否 | 元数据标识,json格式字符串,透传字段,您可以 自定义格式 或使用 示例格式 ,示例如下: { "Label": "your_label","ContentProducer": "yourcontentproducer","ContentPropagator": "your_content_propagator","ProduceID": "yourproductid", "PropagateID": "your_propagate_id","ReservedCode1": "yourreservedcode1", "ReservedCode2": "your_reserved_code2" } 该参数为空时,默认使用vidu生成的元数据标识 | - |
callback_url | JSON body | string | 否 | Callback 协议 需要您在创建任务时主动设置 callback_url,请求方法为 POST,当视频生成任务有状态变化时,Vidu 将向此地址发送包含任务最新状态的回调请求。回调请求内容结构与查询任务API的返回体一致 回调返回的"status"包括以下状态: - processing 任务处理中 - success 任务完成(如发送失败,回调三次) - failed 任务失败(如发送失败,回调三次) Vidu采用回调签名算法进行认证,详情见:回调签名算法 | - |
返回响应 (200)
| 参数 | 位置 | 类型 | 必填 | 说明 | 示例 |
|---|---|---|---|---|---|
task_id | 响应 JSON | string | 是 | - | - |
type | 响应 JSON | string | 是 | - | - |
state | 响应 JSON | string | 是 | - | - |
model | 响应 JSON | string | 是 | - | - |
style | 响应 JSON | string | 是 | - | - |
prompt | 响应 JSON | string | 是 | - | - |
images | 响应 JSON | array<string> | 是 | - | - |
duration | 响应 JSON | integer | 是 | - | - |
seed | 响应 JSON | integer | 是 | - | - |
aspect_ratio | 响应 JSON | string | 是 | - | - |
resolution | 响应 JSON | string | 是 | - | - |
movement_amplitude | 响应 JSON | string | 是 | - | - |
created_at | 响应 JSON | string | 是 | - | - |
credits | 响应 JSON | integer | 是 | - | - |
payload | 响应 JSON | string | 是 | - | - |
cus_priority | 响应 JSON | integer | 是 | - | - |
off_peak | 响应 JSON | boolean | 是 | - | - |
watermark | 响应 JSON | boolean | 是 | - | - |
is_rec | 响应 JSON | boolean | 是 | - | - |
wm_position | 响应 JSON | string | 是 | - | - |
wm_url | 响应 JSON | string | 是 | - | - |
meta_data | 响应 JSON | string | 是 | - | - |
client_request_id | 响应 JSON | string | 是 | - | - |
响应示例
{
"task_id": "911026047460327424",
"type": "text2video",
"state": "created",
"model": "viduq2",
"style": "general",
"prompt": "一只可爱的小猫在花园里玩耍,阳光明媚,画面温馨",
"images": [],
"duration": 5,
"seed": 426802853,
"aspect_ratio": "16:9",
"resolution": "720p",
"movement_amplitude": "auto",
"created_at": "2026-01-20T02:44:10.910316439Z",
"credits": 35,
"payload": "",
"cus_priority": 0,
"off_peak": false,
"watermark": false,
"is_rec": false,
"wm_position": "unspecified",
"wm_url": "",
"meta_data": "",
"client_request_id": ""
}来源原始接口定义(用于追溯)
以下内容来自 Apifox 快照,可能包含兼容层字段或旧示例;公开调用请以本页的协议说明和当前模型列表为准。
{
"id": 495899876,
"name": "创建文生视频任务",
"type": "http",
"serverId": "",
"preProcessors": [],
"postProcessors": [],
"inheritPreProcessors": {},
"inheritPostProcessors": {},
"description": "官方文档:https://platform.vidu.cn/docs/text-to-video",
"operationId": "",
"sourceUrl": "",
"method": "post",
"path": "/ent/v2/text2video",
"tags": [],
"status": 1,
"requestBody": {
"type": "application/json",
"parameters": [],
"jsonSchema": {
"type": "object",
"properties": {
"prompt": {
"type": "string",
"description": "文本提示词\n生成视频的文本描述。\n注:字符长度不能超过 2000 个字符"
},
"model": {
"type": "string",
"description": "模型名称\n可选值:viduq3-turbo 、viduq3-pro 、viduq2 、viduq1\n- viduq3-turbo:对比viduq3-pro,生成速度更快\n- viduq3-pro:高效生成优质音视频内容,让视频内容更生动、更形象、更立体,效果更好\n- viduq2:最新模型\n- viduq1:画面清晰,平滑转场,运镜稳定"
},
"style": {
"type": "string",
"description": "风格\n默认 general,可选值:general、anime\ngeneral:通用风格,可以通过提示词来控制风格\nanime:动漫风格,仅在动漫风格表现突出,可以通过不同的动漫风格提示词来控制\n注:使用q2模型时该参数不生效"
},
"duration": {
"type": "number",
"description": "视频时长参数,默认值依据模型而定:\n- viduq3-pro、viduq3-turbo: 默认5秒,可选:1-16\n- viduq2 : 默认5秒,可选:1-10\n- viduq1 : 默认5秒,可选:5"
},
"seed": {
"type": "string",
"description": "随机种子\n当默认不传或者传0时,会使用随机数替代\n手动设置则使用设置的种子"
},
"aspect_ratio": {
"type": "string",
"description": "比例\n默认 16:9,可选值:16:9、9:16、3:4、4:3、1:1\n注:3:4、4:3仅支持q2模型"
},
"resolution": {
"type": "string",
"description": "分辨率参数,默认值依据模型和视频时长而定:\n- viduq3-pro、viduq3-turbo(1-16秒):默认 720p,可选:540p、720p、1080p\n- viduq2(1-10秒):默认 720p,可选:540p、720p、1080p\n- viduq1(5秒):默认 1080p,可选:1080p"
},
"movement_amplitude": {
"type": "string",
"description": "运动幅度\n默认 auto,可选值:auto、small、medium、large\n注:使用q2模型时该参数不生效"
},
"bgm": {
"type": "string",
"description": "是否为生成的视频添加背景音乐。\n默认:false,可选值 true 、false\n传 true 时系统将从预设 BGM 库中自动挑选合适的音乐并添加;不传或为 false 则不添加 BGM。\n- BGM不限制时长,系统根据视频时长自动适配"
},
"payload": {
"type": "string",
"description": "透传参数\n不做任何处理,仅数据传输\n注:最多 1048576个字符"
},
"watermark": {
"type": "string",
"description": "是否添加水印\n- true:添加水印;\n- false:不添加水印;\n注1:目前水印内容为固定,内容由AI生成,默认不加\n注2:您可以通过watermarked_url参数查询获取带水印的视频内容,详情见查询任务接口"
},
"wm_position": {
"type": "string",
"description": "水印位置,表示水印出现在图片的位置,可选项为:\n1:左上角\n2:右上角\n3:右下角\n4:左下角\n默认为:3"
},
"wm_url": {
"type": "string",
"description": "水印内容,此处为图片URL\n不传时,使用默认水印:内容由AI生成"
},
"meta_data": {
"type": "string",
"description": "元数据标识,json格式字符串,透传字段,您可以 自定义格式 或使用 示例格式 ,示例如下:\n{\n\"Label\": \"your_label\",\"ContentProducer\": \"yourcontentproducer\",\"ContentPropagator\": \"your_content_propagator\",\"ProduceID\": \"yourproductid\", \"PropagateID\": \"your_propagate_id\",\"ReservedCode1\": \"yourreservedcode1\", \"ReservedCode2\": \"your_reserved_code2\"\n}\n该参数为空时,默认使用vidu生成的元数据标识"
},
"callback_url": {
"type": "string",
"description": "Callback 协议\n需要您在创建任务时主动设置 callback_url,请求方法为 POST,当视频生成任务有状态变化时,Vidu 将向此地址发送包含任务最新状态的回调请求。回调请求内容结构与查询任务API的返回体一致\n回调返回的\"status\"包括以下状态:\n- processing 任务处理中\n- success 任务完成(如发送失败,回调三次)\n- failed 任务失败(如发送失败,回调三次)\nVidu采用回调签名算法进行认证,详情见:回调签名算法"
}
},
"required": [
"model",
"prompt"
],
"x-apifox-orders": [
"model",
"style",
"prompt",
"duration",
"seed",
"aspect_ratio",
"resolution",
"movement_amplitude",
"bgm",
"payload",
"watermark",
"wm_position",
"wm_url",
"meta_data",
"callback_url"
]
},
"examples": [
{
"mediaType": "application/json",
"value": "{\r\n \"model\": \"viduq2\",\r\n \"prompt\": \"一只可爱的小猫在花园里玩耍,阳光明媚,画面温馨\"\r\n}"
}
],
"mediaType": "",
"oasExtensions": "",
"required": false,
"additionalContentTypes": []
},
"parameters": {
"path": [],
"query": [],
"cookie": [],
"header": [
{
"id": "Jsj23RwEo1",
"name": "Authorization",
"required": false,
"enable": true,
"description": "",
"type": "string",
"sampleValue": "Bearer {{YOUR_API_KEY}}"
},
{
"id": "jjYSOg2NrR",
"name": "Content-Type",
"required": false,
"enable": true,
"description": "",
"type": "string",
"sampleValue": "application/json"
}
]
},
"commonParameters": {
"query": [],
"body": [],
"cookie": [],
"header": []
},
"auth": {
"type": "inherit",
"inherit": {}
},
"responses": [
{
"id": 179829325,
"name": "成功",
"code": 200,
"contentType": "json",
"jsonSchema": {
"type": "object",
"properties": {
"task_id": {
"type": "string"
},
"type": {
"type": "string"
},
"state": {
"type": "string"
},
"model": {
"type": "string"
},
"style": {
"type": "string"
},
"prompt": {
"type": "string"
},
"images": {
"type": "array",
"items": {
"type": "string"
}
},
"duration": {
"type": "integer"
},
"seed": {
"type": "integer"
},
"aspect_ratio": {
"type": "string"
},
"resolution": {
"type": "string"
},
"movement_amplitude": {
"type": "string"
},
"created_at": {
"type": "string"
},
"credits": {
"type": "integer"
},
"payload": {
"type": "string"
},
"cus_priority": {
"type": "integer"
},
"off_peak": {
"type": "boolean"
},
"watermark": {
"type": "boolean"
},
"is_rec": {
"type": "boolean"
},
"wm_position": {
"type": "string"
},
"wm_url": {
"type": "string"
},
"meta_data": {
"type": "string"
},
"client_request_id": {
"type": "string"
}
},
"required": [
"task_id",
"type",
"state",
"model",
"style",
"prompt",
"images",
"duration",
"seed",
"aspect_ratio",
"resolution",
"movement_amplitude",
"created_at",
"credits",
"payload",
"cus_priority",
"off_peak",
"watermark",
"is_rec",
"wm_position",
"wm_url",
"meta_data",
"client_request_id"
],
"x-apifox-orders": [
"task_id",
"type",
"state",
"model",
"style",
"prompt",
"images",
"duration",
"seed",
"aspect_ratio",
"resolution",
"movement_amplitude",
"created_at",
"credits",
"payload",
"cus_priority",
"off_peak",
"watermark",
"is_rec",
"wm_position",
"wm_url",
"meta_data",
"client_request_id"
]
},
"itemSchema": {},
"description": "",
"mediaType": "",
"headers": [],
"oasExtensions": ""
}
],
"responseExamples": [
{
"name": "成功示例",
"responseId": 179829325,
"data": "{\r\n \"task_id\": \"911026047460327424\",\r\n \"type\": \"text2video\",\r\n \"state\": \"created\",\r\n \"model\": \"viduq2\",\r\n \"style\": \"general\",\r\n \"prompt\": \"一只可爱的小猫在花园里玩耍,阳光明媚,画面温馨\",\r\n \"images\": [],\r\n \"duration\": 5,\r\n \"seed\": 426802853,\r\n \"aspect_ratio\": \"16:9\",\r\n \"resolution\": \"720p\",\r\n \"movement_amplitude\": \"auto\",\r\n \"created_at\": \"2026-01-20T02:44:10.910316439Z\",\r\n \"credits\": 35,\r\n \"payload\": \"\",\r\n \"cus_priority\": 0,\r\n \"off_peak\": false,\r\n \"watermark\": false,\r\n \"is_rec\": false,\r\n \"wm_position\": \"unspecified\",\r\n \"wm_url\": \"\",\r\n \"meta_data\": \"\",\r\n \"client_request_id\": \"\"\r\n}",
"description": "",
"oasKey": "",
"oasExtensions": "",
"id": "019fc09b-0b30-7549-bf4d-6361fc39422a"
}
],
"codeSamples": [],
"projectId": 8662722,
"moduleId": 8310462,
"folderId": 92436088,
"ordering": 0,
"responsibleId": 0,
"commonResponseStatus": {},
"advancedSettings": {
"disabledSystemHeaders": {}
},
"customApiFields": {},
"oasExtensions": "",
"mockScript": {},
"createdAt": "2026-08-02T03:53:34.000Z",
"updatedAt": "2026-08-06T12:15:55.000Z",
"creatorId": 2863449,
"editorId": 2863449,
"creatorUserId": 2863449,
"editorUserId": 2863449,
"responseChildren": [],
"visibility": "INHERITED",
"securityScheme": {},
"callbacks": ""
}