内容更新日: 2026-06-09
Luma
Luma Dream Machine は高品質な動画生成機能を提供します。公式ドキュメント:docs.lumalabs.ai動画を作成する
POST /luma/generations
リクエストパラメータ
| パラメータ | 型 | 必須 | 説明 |
|---|---|---|---|
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://api.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
}'
import requests
response = requests.post(
"https://api.crazyrouter.com/luma/generations",
headers={
"Content-Type": "application/json",
"Authorization": "Bearer YOUR_API_KEY"
},
json={
"user_prompt": "A drone shot flying over a tropical island",
"model_name": "ray-v2",
"duration": "5",
"resolution": "720p"
}
)
print(response.json())
レスポンス例
{
"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
curl https://api.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
curl -X POST https://api.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 | 失敗 |