- 引言
- 在线调试说明
- 发出请求
- 中转站基本介绍
- Chat模型
- 文生图模型
- 文生视频模型
- GPTs 相关
- 文生音乐 Suno
- Python配置方式
- nodejs 配置方式
- 各种插件/软件使用教程
- 帮助中心
提交视频生成任务-chat格式
POST
/v1/chat/completions
请求参数
Authorization
在 Header 添加参数
Authorization
,其值为在 Bearer 之后拼接 Token示例:
Authorization: Bearer ********************
Header 参数
Content-Type
string
必需
示例值:
application/json
Accept
string
必需
示例值:
application/json
Authorization
string
必需
示例值:
Bearer {{YOUR_API_KEY}}
Body 参数application/json
user_prompt
string
必需
expand_prompt
boolean
必需
loop
boolean
必需
image_url
string
可选,参考图片来源
image_end_url
string
必需
notify_hook
string
必需
示例
{
"model": "runway-video",
"messages": [
{
"role": "user",
"content": [
{
"type": "text",
"text": "https://upload.wikimedia.org/wikipedia/commons/thumb/d/dd/Gfp-wisconsin-madison-the-nature-boardwalk.jpg/2560px-Gfp-wisconsin-madison-the-nature-boardwalk.jpg 两只狗骑摩托"
}
]
}
]
}
示例代码
Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://zzzzapi.com/v1/chat/completions' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer sk-avDuXGp5mCiNgC35Be79C4Fa72044aDd916e6821F5E40029' \
--header 'Content-Type: application/json' \
--data-raw '{
"model": "runway-video",
"messages": [
{
"role": "user",
"content": [
{
"type": "text",
"text": "https://upload.wikimedia.org/wikipedia/commons/thumb/d/dd/Gfp-wisconsin-madison-the-nature-boardwalk.jpg/2560px-Gfp-wisconsin-madison-the-nature-boardwalk.jpg 两只狗骑摩托"
}
]
}
]
}'
返回响应
🟢200成功
application/json
Body
code
integer
必需
message
string
必需
request_id
string
必需
data
object
必需
task_id
string
必需
task_status
string
必需
created_at
integer
必需
updated_at
integer
必需
示例
{
"id": "4665a07c-7641-4809-a133-10786201bb56",
"prompt": "",
"state": "pending",
"queue_state": null,
"created_at": "2024-12-22T13:38:40.139409Z",
"batch_id": "",
"video": null,
"video_raw": null,
"liked": null,
"estimate_wait_seconds": null,
"thumbnail": null,
"last_frame": null
}
修改于 2025-01-09 15:32:17