- 介绍
- 项目说明
- 身份验证
- 发出请求
- 支持模型(模型及费率一览表)
- openai api
- Claude
- 视频接口
- kling(官方格式)
- luma
- CogVideoX(官方格式)
- runway(开发中)
- sora
- 音乐接口
- 图片接口
- midjourney
- flux(开发中)
生成(generations)
POST
https://api.openai-core.com/cogvideox/v1/videos/generations
请求参数
Header 参数
Content-Type
string
可选
示例值:
application/json
Accept
string
可选
示例值:
application/json
Authorization
string
可选
示例值:
Bearer {{YOUR_API_KEY}}
Body 参数application/json
model
enum<string>
必需
枚举值:
cogvideox
prompt
string
关键词,描述
image_url
string
可选
示例
{
"model": "cogvideox",
"prompt": "Peter Rabbit drives a small car, wandering on the road, with a face full of happiness and joy.",
"image_url":"https://sfile.chatglm.cn/testpath/video_cover/0e89d8bf-ded0-5b77-b673-fd264fad9c9d_cover_0.png"
}
示例代码
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://api.openai-core.com/cogvideox/v1/videos/generations' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer {{YOUR_API_KEY}}' \
--header 'Content-Type: application/json' \
--data-raw '{
"model": "cogvideox",
"prompt": "Peter Rabbit drives a small car, wandering on the road, with a face full of happiness and joy.",
"image_url":"https://sfile.chatglm.cn/testpath/video_cover/0e89d8bf-ded0-5b77-b673-fd264fad9c9d_cover_0.png"
}'
返回响应
🟢200成功
application/json
Body
id
string
必需
model
string
必需
request_id
string
必需
task_status
string
必需
示例
{
"id": "203317010364678869154806663964154846",
"model": "cogvideox",
"request_id": "9154806663964154845",
"task_status": "PROCESSING"
}
修改于 2024-10-29 08:05:32