Sora Pro 创建 - QuickRouter API 中转接口
▼
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
images
array[string]
可选
图片链接 必需
model
string
可选
模型名字 必需
orientation
string
必需
portrait 竖屏 landscape 横屏
prompt
string
可选
提示词 必需
size
string
必需
large 高清1080p
duration
integer
可选
支持 15,25 必需
watermark
boolean
必需
默认为: true 会优先无水印,如果出错,会兜底到有水印 传递 false 的话 会强制让视频无水印,遇到去水印错误的会一直自动重试
private
boolean
必需
是否隐藏视频,true-视频不会发布,同时视频无法进行 remix(二次编辑), 默认为 false { "images": [], "model": "sora-2-pro", "orientation": "portrait", "prompt": "make animate", "size": "large", "duration": 15, "watermark": false, "private": true } 请求
示例
{
"images": [],
"model": "sora-2-pro",
"orientation": "portrait",
"prompt": "make animate",
"size": "large",
"duration": 15,
"watermark": false,
"private": true
}
请求示例代码
curl --location --request POST 'https://api.quickrouter.ai/v1/video/create' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data-raw '{
"images": [],
"model": "sora-2-pro",
"orientation": "portrait",
"prompt": "make animate",
"size": "large",
"duration": 15,
"watermark": false,
"private": true
}'
var myHeaders = new Headers();
myHeaders.append("Accept", "application/json");
myHeaders.append("Authorization", "Bearer YOUR_API_KEY");
myHeaders.append("Content-Type", "application/json");
var raw = JSON.stringify({
"images": [],
"model": "sora-2-pro",
"orientation": "portrait",
"prompt": "make animate",
"size": "large",
"duration": 15,
"watermark": false,
"private": true
});
var requestOptions = {
method: 'POST',
headers: myHeaders,
body: raw,
redirect: 'follow'
};
fetch("https://api.quickrouter.ai/v1/video/create", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));
import http.client
import json
conn = http.client.HTTPSConnection("api.quickrouter.ai")
payload = json.dumps({
"images": [],
"model": "sora-2-pro",
"orientation": "portrait",
"prompt": "make animate",
"size": "large",
"duration": 15,
"watermark": False,
"private": True
})
headers = {
'Accept': 'application/json',
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json'
}
conn.request("POST", "/v1/video/create", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
返回响应
响应参数 🟢 200 OK · application/json
id
string
必需
object
string
必需
created
integer
必需
choices
array [object]
必需
index
integer
可选
message
object
可选
finish_reason
string
可选
usage
object
必需
prompt_tokens
integer
必需
completion_tokens
integer
必需
total_tokens
integer
必需
{ "id": "sora-2:task_01k9009g8ef1esae6388chgcpx", "status": "pending", "status_update_time": 1762010645686 }
示例
{
"id": "sora-2:task_01k9009g8ef1esae6388chgcpx",
"status": "pending",
"status_update_time": 1762010645686
}