luma-video
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseLuma Video Generation
Luma视频生成
Generate AI videos through AceDataCloud's Luma Dream Machine API.
Setup: See authentication for token setup.
通过AceDataCloud的Luma Dream Machine API生成AI视频。
设置: 查看身份验证了解令牌设置方法。
Quick Start
快速开始
bash
curl -X POST https://api.acedata.cloud/luma/videos \
-H "Authorization: Bearer $ACEDATACLOUD_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{"prompt": "a drone flying over a mountain lake at sunrise", "action": "generate", "callback_url": "https://api.acedata.cloud/health"}'Async: See async task polling. Poll viawithPOST /luma/tasks.{"id": "..."}
bash
curl -X POST https://api.acedata.cloud/luma/videos \
-H "Authorization: Bearer $ACEDATACLOUD_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{"prompt": "a drone flying over a mountain lake at sunrise", "action": "generate", "callback_url": "https://api.acedata.cloud/health"}'异步处理: 查看异步任务轮询。通过接口传入POST /luma/tasks进行轮询。{"id": "..."}
Workflows
工作流
1. Text-to-Video
1. 文本转视频
Generate video purely from a text description.
json
POST /luma/videos
{
"prompt": "a timelapse of flowers blooming in a garden",
"action": "generate",
"aspect_ratio": "16:9",
"loop": false,
"enhancement": true
}完全根据文本描述生成视频。
json
POST /luma/videos
{
"prompt": "a timelapse of flowers blooming in a garden",
"action": "generate",
"aspect_ratio": "16:9",
"loop": false,
"enhancement": true
}2. Image-to-Video
2. 图像转视频
Use start and/or end reference images to guide generation.
json
POST /luma/videos
{
"prompt": "the scene comes alive with gentle wind",
"action": "generate",
"start_image_url": "https://example.com/scene.jpg",
"end_image_url": "https://example.com/scene-end.jpg",
"aspect_ratio": "16:9"
}使用起始和/或结束参考图像引导视频生成。
json
POST /luma/videos
{
"prompt": "the scene comes alive with gentle wind",
"action": "generate",
"start_image_url": "https://example.com/scene.jpg",
"end_image_url": "https://example.com/scene-end.jpg",
"aspect_ratio": "16:9"
}3. Extend a Video
3. 视频扩展
Continue an existing video with a new prompt.
json
POST /luma/videos
{
"action": "extend",
"video_id": "existing-video-id",
"prompt": "the camera continues forward through the forest"
}根据新提示延续现有视频内容。
json
POST /luma/videos
{
"action": "extend",
"video_id": "existing-video-id",
"prompt": "the camera continues forward through the forest"
}Aspect Ratios
宽高比
| Ratio | Use Case |
|---|---|
| Landscape (default) — YouTube, TV |
| Portrait — TikTok, Instagram Stories |
| Square — Social media |
| Classic — Presentations |
| Ultra-wide — Cinematic |
| 比例 | 使用场景 |
|---|---|
| 横屏(默认)—— YouTube、电视 |
| 竖屏—— TikTok、Instagram Stories |
| 正方形—— 社交媒体 |
| 经典比例—— 演示文稿 |
| 超宽屏—— 电影级内容 |
Parameters
参数
| Parameter | Type | Default | Description |
|---|---|---|---|
| string | — | Text description of the video (required) |
| string | | |
| string | | Video aspect ratio |
| bool | | Create seamless loop |
| bool | | Enhance prompt for better results |
| string | — | Reference image for first frame |
| string | — | Reference image for last frame |
| string | — | ID of video to extend (alternative to |
| string | — | URL of video to extend (alternative to |
| number | — | Timeout in seconds for the API to return data |
| string | — | Webhook URL for async notifications |
| 参数 | 类型 | 默认值 | 描述 |
|---|---|---|---|
| string | — | 视频的文本描述(必填) |
| string | | 取值为 |
| string | | 视频宽高比 |
| bool | | 创建无缝循环视频 |
| bool | | 优化提示词以获得更好效果 |
| string | — | 第一帧的参考图片URL |
| string | — | 最后一帧的参考图片URL |
| string | — | 待扩展视频的ID( |
| string | — | 待扩展视频的URL( |
| number | — | API返回数据的超时时间(秒) |
| string | — | 用于异步通知的Webhook URL |
Gotchas
注意事项
- (default) improves prompt quality but may alter your intent — set to
enhancement: truefor literal promptsfalse - Start/end image URLs must be publicly accessible
- creates seamless looping video — good for backgrounds and social media
loop: true - Extend requires either or
video_idfrom a previously completed generationvideo_url - Video generation takes 1–5 minutes depending on complexity
- Both start and end images are optional — you can use just one for partial guidance
MCP:| Hosted:pip install mcp-luma| See all MCP servershttps://luma.mcp.acedata.cloud/mcp
- 默认开启,可提升提示词质量,但可能改变你的原始意图——若需要严格遵循字面提示词,请设置为
enhancement: truefalse - 起始/结束图片URL必须是公开可访问的
- 可创建无缝循环视频——适合用作背景或社交媒体内容
loop: true - 视频扩展功能需要提供之前生成完成的视频的或
video_idvideo_url - 视频生成时间根据复杂度不同,需要1–5分钟
- 起始和结束图片均为可选——你可以只使用其中一张来提供部分引导
MCP:| 托管地址:pip install mcp-luma| 查看所有MCP服务器https://luma.mcp.acedata.cloud/mcp