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.
Luma
Luma Dream Machine 提供高质量的视频生成能力。官方文档:docs.lumalabs.ai
创建视频
请求参数
| 参数 | 类型 | 必填 | 说明 |
|---|
user_prompt | string | 是 | 视频描述提示词 |
model_name | string | 否 | 模型名称:ray-v1、ray-v2 |
duration | string | 否 | 视频时长(秒) |
resolution | string | 否 | 分辨率:540p、720p、1080p |
expand_prompt | boolean | 否 | 是否自动扩展提示词 |
image_url | string | 否 | 首帧参考图片 URL |
image_end_url | string | 否 | 尾帧参考图片 URL |
请求示例
curl -X POST https://crazyrouter.com/luma/generations \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_KEY" \
-d '{
"user_prompt": "A drone shot flying over a tropical island with crystal clear water",
"model_name": "ray-v2",
"duration": "5",
"resolution": "720p",
"expand_prompt": true
}'
响应示例
{
"id": "luma_gen_abc123",
"state": "queued",
"created_at": "2024-03-01T12:00:00Z"
}
图生视频
传入 image_url 作为首帧:
{
"user_prompt": "The person in the image starts walking forward",
"model_name": "ray-v2",
"image_url": "https://example.com/portrait.jpg"
}
首尾帧模式:
{
"user_prompt": "Smooth transition between two scenes",
"model_name": "ray-v2",
"image_url": "https://example.com/start.jpg",
"image_end_url": "https://example.com/end.jpg"
}
查询任务
GET /luma/generations/{task_id}
curl https://crazyrouter.com/luma/generations/luma_gen_abc123 \
-H "Authorization: Bearer YOUR_API_KEY"
响应示例
{
"id": "luma_gen_abc123",
"state": "completed",
"created_at": "2024-03-01T12:00:00Z",
"video": {
"url": "https://storage.cdn-luma.com/...",
"download_url": "https://storage.cdn-luma.com/..."
}
}
延长视频
POST /luma/generations/{task_id}/extend
延长已完成的视频。
curl -X POST https://crazyrouter.com/luma/generations/luma_gen_abc123/extend \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_KEY" \
-d '{
"user_prompt": "Continue the drone shot, camera pans to reveal a beach resort"
}'
任务状态
| 状态 | 说明 |
|---|
queued | 排队中 |
dreaming | 生成中 |
completed | 已完成 |
failed | 失败 |