- 介绍
- 项目说明
- 身份验证
- 发出请求
- 支持模型(模型及费率一览表)
- openai api
- Claude
- 视频接口
- kling(官方格式)
- luma
- CogVideoX(官方格式)
- runway(开发中)
- sora
- 音乐接口
- 图片接口
生成视频
POST
https://api.openai-core.com/luma/v1/generations
请求参数
Header 参数
Content-Type
string
必需
示例值:
application/json
Accept
string
必需
示例值:
application/json
Authorization
string
必需
示例值:
Bearer {{YOUR_API_KEY}}
Body 参数application/json
custom_mode
boolean
必需
input
object
必需
prompt
string
必需
title
string
必需
tags
string
必需
continue_at
integer
必需
continue_clip_id
string
必需
示例
{
"user_prompt": "cat dance",
"aspect_ratio": "16:9",
"expand_prompt": true
}
示例代码
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/luma/v1/generations' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer {{YOUR_API_KEY}}' \
--header 'Content-Type: application/json' \
--data-raw '{
"user_prompt": "cat dance",
"aspect_ratio": "16:9",
"expand_prompt": true
}'
返回响应
🟢200OK
application/json
Body
batch_id
string
必需
created_at
string
必需
estimate_wait_seconds
null
必需
id
string
必需
last_frame
null
必需
liked
null
必需
pipeline_id
string
必需
prompt
string
必需
queue_state
null
必需
server_id
string
必需
state
string
必需
thumbnail
null
必需
user_id
string
必需
video
null
必需
video_raw
null
必需
示例
{
"batch_id": "3f86837d-69c4-43c4-8e7d-e0772346f420",
"created_at": "2024-10-20T06:41:46.293298Z",
"estimate_wait_seconds": null,
"id": "656f64c3-6903-4171-a2c6-34c6cd6119f7",
"last_frame": null,
"liked": null,
"pipeline_id": "V1.5",
"prompt": "cat dance",
"queue_state": null,
"server_id": "123",
"state": "pending",
"thumbnail": null,
"user_id": "1e75ee66-c774-4ec1-a93b-4bd376cec575",
"video": null,
"video_raw": null
}
修改于 2024-10-25 06:56:26