- 指南
- 通知设置-WebHook参数介绍
- 聊天(Chat)
- 所有对话模型均兼容 OpenAI 格式
- Realtime (实时语音、对话
- 聊天完成对象
- 聊天完成块对象
- GPTs
- 多模态聊天(读图\读视频\生图
- Claude 官方格式
- 对话聊天(OpenAI 格式POST
- gpt-3.5-turbo-instructPOST
- 对话 Claude ThinkingPOST
- RAG(嵌入、重排序
- 视频模型
- 视频生成模型简介
- pixverse
- 快手可灵(官方格式)
- Luma 文生视频
- 智谱清影 文生视频
- Runway
- Pika
- Sora
- 数字人
- 绘图模型
- 音频接口
- 文件上传(Files)
- PPT接口
- 帮助中心
- 平台API
- 废弃、未开放
创建视频(tasks)
开发中
POST
/vidu/v1/tasks
最后修改时间:2024-09-25 01:31:02
请求参数
Query 参数
string
可选
Header 参数
string
可选
Body 参数application/json
input
object
必需
prompts
array [object {3}]
必需
type
string
必需
settings
object
必需
style
string
必需
aspect_ratio
string
必需
duration
integer
必需
model
string
必需
示例
{
"input": {
"prompts": [
{
"type": "text",
"content": "fly over sky",
"enhance": true
},
{
"type": "image",
"content": "https://filesystem.site/cdn/20240801/oh03MErsxjEvX2iBdvnw57rkfgEtE2.png",
"enhance": true
}
]
},
"type": "img2video",
"settings": {
"style": "general",
"aspect_ratio": "16:9",
"duration": 4,
"model": "vidu-1"
}
}
示例代码
Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location --request POST '/vidu/v1/tasks' \
--header 'Content-Type: application/json' \
--data-raw '{
"input": {
"prompts": [
{
"type": "text",
"content": "fly over sky",
"enhance": true
},
{
"type": "image",
"content": "https://filesystem.site/cdn/20240801/oh03MErsxjEvX2iBdvnw57rkfgEtE2.png",
"enhance": true
}
]
},
"type": "img2video",
"settings": {
"style": "general",
"aspect_ratio": "16:9",
"duration": 4,
"model": "vidu-1"
}
}'
返回响应
🟢200成功
application/json
Body
id
string
必需
input
object
必需
creation_id
string
必需
prompts
array [object {5}]
必需
lang
string
必需
settings
object
必需
style
string
必需
duration
integer
必需
aspect_ratio
string
必需
model
string
必需
type
string
必需
state
string
必需
creations
array[string]
必需
err_code
string
必需
created_at
string
必需
示例
{
"id": "2369218477629212",
"input": {
"creation_id": "0",
"prompts": [
{
"type": "text",
"content": "fly",
"negative": false,
"enhance": true,
"recaption": ""
},
{
"type": "image",
"content": "https://vidu.cf.vidu.studio/infer/tasks24/0731/162369218477629212/input/prompt-02.jpeg?Expires=1722528820&Signature=Cf7HE4SuETNaDEAoBkWyX7RgizytsxZsKpvKpzrI1-FOlGcsX5m13xQfnkWtJWL76Zynzgnwe-H8AFRW-h8jz2QIujv0Pu9ke7S7FTJlmavv~sdVpqW4IeKP1uZsU5wRuIF5xpCbzF8CJdbfQRK5T~b6t88hTApCJk0FOcCsgRB2n2YPohJbOq2a3tdptkOwpyQzlR~ImDlypC2y~c1DSQXUaucffebzJAMEKAH67WA3ijZYR-6luBlhFlt2Rxe2OX5nVF2j1Fo9y6bQ08I~3ES6~P~JeCNXD5a6WqUIkNDUWOAr6hjMgqiadJFdKuMM4WYZUe0J3RDh2udwLAZZ8Q__&Key-Pair-Id=KNW0SL0E7LV4E",
"negative": false,
"enhance": true,
"recaption": ""
}
],
"lang": "en"
},
"settings": {
"style": "general",
"duration": 4,
"aspect_ratio": "16:9",
"model": "vidu-1"
},
"type": "character2video",
"state": "queueing",
"creations": [],
"err_code": "",
"created_at": "2024-07-31T16:13:39.972262Z"
}
修改于 2024-09-25 01:31:02