Documentation Index
Fetch the complete documentation index at: https://docs.crazyrouter.com/llms.txt
Use this file to discover all available pages before exploring further.
OpenAI 视频格式
Crazyrouter 支持 OpenAI 官方的视频 API 格式,兼容 OpenAI SDK。
创建视频
请求参数
| 参数 | 类型 | 必填 | 说明 |
|---|
model | string | 是 | 模型名称,如 sora-2、sora-2-pro |
prompt | string | 是 | 视频描述提示词 |
size | string | 否 | 视频尺寸:1920x1080、1080x1920、1080x1080 |
duration | integer | 否 | 视频时长(秒) |
image_url | string | 否 | 参考图片 URL |
storyboard | array | 否 | 分镜脚本 |
private | boolean | 否 | 是否为私密模式 |
请求示例
curl -X POST https://crazyrouter.com/v1/videos \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_KEY" \
-d '{
"model": "sora-2",
"prompt": "A timelapse of a city skyline from day to night, clouds moving quickly",
"size": "1920x1080",
"duration": 10
}'
响应示例
{
"id": "video_abc123",
"object": "video",
"status": "processing",
"created_at": 1709123456
}
查询视频
curl https://crazyrouter.com/v1/videos/video_abc123 \
-H "Authorization: Bearer YOUR_API_KEY"
响应示例(已完成)
{
"id": "video_abc123",
"object": "video",
"status": "completed",
"created_at": 1709123456,
"video": {
"url": "https://crazyrouter.com/files/video_abc123.mp4",
"duration": 10,
"width": 1920,
"height": 1080
}
}
下载视频
GET /v1/videos/{id}/content
直接下载视频文件。
curl -o output.mp4 https://crazyrouter.com/v1/videos/video_abc123/content \
-H "Authorization: Bearer YOUR_API_KEY"
编辑视频
在创建请求中传入 image_url 进行图生视频:
{
"model": "sora-2",
"prompt": "The scene comes to life with gentle movement",
"image_url": "https://example.com/scene.jpg",
"size": "1920x1080",
"duration": 5
}
Storyboard 分镜
{
"model": "sora-2",
"storyboard": [
{"prompt": "Wide shot of a forest at dawn", "duration": 3},
{"prompt": "A deer walks into frame", "duration": 4},
{"prompt": "Close-up of the deer looking at camera", "duration": 3}
],
"size": "1920x1080"
}
私密模式
设置 private: true 使生成的视频不会出现在公开画廊中:
{
"model": "sora-2",
"prompt": "A confidential product demo video",
"size": "1920x1080",
"private": true
}
任务状态
| 状态 | 说明 |
|---|
processing | 处理中 |
completed | 已完成 |
failed | 失败 |