1. Luma
梧柏API使用文档
WHBAI · Luma
  • WHBAI · Google Gemini 原生 (v1alpha)
  • WHBAI · Google Gemini 原生
  • WHBAI · Ideogram
  • WHBAI · Ideogram V3
  • WHBAI · Midjourney
  • WHBAI · Jimeng
  • WHBAI · Kling
  • WHBAI · Luma
  • WHBAI · Luma V1
  • WHBAI · Omni 视频
  • WHBAI · Pixverse
  • WHBAI · Runway
  • WHBAI · Sora2
  • WHBAI · 统一视频 VEO
  • WHBAI · Vidu
  • WHBAI · 豆包 Volc
  • WHBAI · Suno
  • WHBAI · Playground
  • WHBAI · 账号与令牌
  • WHBAI · 阿里 Pix
  • WHBAI · 阿里百炼
  • WHBAI · 私域人像
  • WHBAI · Fal.ai
  • WHBAI · Replicate
  • WHBAI · 腾讯云 VOD
  • WHBAI · MiniMax
  • WHBAI · 支持模型列表
  • WHBAI · Grok Imagine
  • WHBAI · Seedance 2.0
  • WHBAI · TypeSafe
  • WHBAI · OpenAI 兼容
  • Luma
    • 创建视频生成任务
      POST
    • 查询生成任务
      GET
    • 延长视频
      POST
    • 批量查询任务
      POST
  • 数据模型
    • LumaGenerationResponse
    • LumaSampleRequest
    • PostLumaGenerationsIdExtendRequest
    • LumaSampleResponse
    • PostLumaTasksRequest
    • PostLumaGenerationsTaskIdExtendRequest
    • PostLumaGenerationsTaskIdExtendResponse
    • GetLumaGenerationsTaskIdResponse
    • NewApiError
  1. Luma

创建视频生成任务

POST
/luma/generations
Luma 官方 API · 创建视频生成任务(POST /luma/generations)。
文生视频或图生视频。支持两种请求格式:
官方格式:prompt + keyframes
代理格式:user_prompt + image_url
官方文档:https://docs.lumalabs.ai/docs/video-generation

网站中的模型与调用示例#

提交生成视频任务#

官方文档:https://docs.lumalabs.ai/docs/video-generation

请求参数#

{
  "contentType": "application/json",
  "properties": {
    "duration": {
      "description": "时长只支持5s\n",
      "type": "string",
      "x-i18n": {
        "en-US": {
          "description": "The duration only supports 5s"
        }
      }
    },
    "expand_prompt": {
      "description": "可选,提示词优化开关",
      "type": "boolean",
      "x-i18n": {
        "en-US": {
          "description": "Optional, prompt word optimization switch"
        }
      }
    },
    "image_end_url": {
      "description": "可选,目标关键帧图片",
      "type": "string",
      "x-i18n": {
        "en-US": {
          "description": "Optional, target keyframe image"
        }
      }
    },
    "image_url": {
      "description": "可选,参考图片来源",
      "type": "string",
      "x-i18n": {
        "en-US": {
          "description": "Optional, refer to image source"
        }
      }
    },
    "loop": {
      "description": "可选,是否循环使用参考图",
      "type": "boolean",
      "x-i18n": {
        "en-US": {
          "description": "Optional, whether to recycle the reference image"
        }
      }
    },
    "model_name": {
      "description": "ray-v1、 ray-v2 官方显示是 ray1.6 ray2\n",
      "type": "string",
      "x-i18n": {
        "en-US": {
          "description": "The official display of ray-v1 and ray-v2 is ray1.6 ray2"
        }
      }
    },
    "notify_hook": {
      "description": "可选,处理完成后的回调通知地址",
      "type": "string",
      "x-i18n": {
        "en-US": {
          "description": "Optional, callback notification address after processing is completed"
        }
      }
    },
    "resolution": {
      "description": "720p或者1080p默认720p\n",
      "type": "string",
      "x-i18n": {
        "en-US": {
          "description": "720p or 1080p default 720p"
        }
      }
    },
    "user_prompt": {
      "description": "必传,用户输入的提示词/问题描述",
      "type": "string",
      "x-i18n": {
        "en-US": {
          "description": "Required, prompt word/problem description entered by the user"
        }
      }
    }
  },
  "required": [
    "user_prompt",
    "expand_prompt",
    "loop",
    "image_url",
    "image_end_url",
    "notify_hook",
    "resolution",
    "duration",
    "model_name"
  ]
}

请求示例 · 示例 1#

{
  "duration": "5s",
  "model_name": "ray-v2",
  "resolution": "720p",
  "user_prompt": "一阵风吹过树林,使女人的面纱微微飘动。"
}

响应示例 · 成功示例#

{
  "batch_id": "",
  "created_at": "2024-12-22T13:38:40.139409Z",
  "estimate_wait_seconds": null,
  "id": "4665a07c-7641-4809-a133-10786201bb56",
  "last_frame": null,
  "liked": null,
  "prompt": "",
  "queue_state": null,
  "state": "pending",
  "thumbnail": null,
  "video": null,
  "video_raw": null
}

请求参数

Authorization
Bearer Token
在 Header 添加参数
Authorization
,其值为在 Bearer 之后拼接 Token
示例:
Authorization: Bearer ********************
or
Body 参数application/json必填

示例
{
    "user_prompt": "A majestic eagle soaring over snow-capped mountains at sunset",
    "aspect_ratio": "16:9",
    "expand_prompt": true
}

请求示例代码

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
请求示例请求示例
Shell
JavaScript
Java
Swift
cURL
curl --location '/luma/generations' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
    "user_prompt": "A majestic eagle soaring over snow-capped mountains at sunset",
    "aspect_ratio": "16:9",
    "expand_prompt": true
}'

返回响应

🟢200成功
application/json
Bodyapplication/json

示例
{
    "id": "4665a07c-7641-4809-a133-10786201bb56",
    "prompt": "",
    "state": "pending",
    "created_at": "2024-12-22T13:38:40.139Z",
    "batch_id": ""
}
🟠400请求有误
🟠401没有权限
修改于 2026-10-24 18:33:11
下一页
查询生成任务
Built with