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/tasks
Luma 官方 API · 批量查询任务(POST /luma/tasks)。
根据 ID 列表批量查询多个任务状态。
"state": "completed" 枚举值: "pending", "processing", "completed", "failed"

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

批量获取任务#

"state": "completed" 枚举值: "pending", "processing", "completed", "failed"

请求参数#

{
  "contentType": "application/json",
  "properties": {
    "aspect_ratio": {
      "description": "生成图片的纵横比,可选,可选值:16:9, 9:16, 1:1, 4:3, 3:4, 3:2, 2:3",
      "type": "string",
      "x-i18n": {
        "en-US": {
          "description": "The aspect ratio of the generated image, optional, available values: 16:9, 9:16, 1:1, 4:3, 3:4, 3:2, 2:3"
        }
      }
    },
    "callback_url": {
      "description": "回调通知地址,可选,当任务状态发生变化时,系统会向这个地址发送通知",
      "type": "string",
      "x-i18n": {
        "en-US": {
          "description": "Callback notification address, optional. When the task status changes, the system will send a notification to this address."
        }
      }
    },
    "image": {
      "description": "参考图片,可选,支持 Base64 编码或图片 URL,支持 .jpg/.jpeg/.png 格式,大小不能超过 10MB",
      "type": "string",
      "x-i18n": {
        "en-US": {
          "description": "Reference image, optional, supports Base64 encoding or image URL, supports .jpg/.jpeg/.png format, size cannot exceed 10MB"
        }
      }
    },
    "image_fidelity": {
      "description": "参考图片的影响强度,可选,取值范围:0-1,值越大,生成的图像越接近参考图片",
      "type": "number",
      "x-i18n": {
        "en-US": {
          "description": "The influence strength of the reference image, optional, value range: 0-1, the larger the value, the closer the generated image is to the reference image"
        }
      }
    },
    "model": {
      "description": "使用的模型,可选,默认为 kling-image",
      "type": "string",
      "x-i18n": {
        "en-US": {
          "description": "Model to use, optional, defaults to kling-image"
        }
      }
    },
    "n": {
      "description": "生成图片的数量,可选,取值范围:1-9",
      "type": "integer",
      "x-i18n": {
        "en-US": {
          "description": "The number of generated images, optional, value range: 1-9"
        }
      }
    },
    "negative_prompt": {
      "description": "负向提示词,可选,描述你不想在图像中出现的元素,不能超过200个字符",
      "type": "string",
      "x-i18n": {
        "en-US": {
          "description": "Negative prompt word, optional, describes the elements you do not want to appear in the image, cannot exceed 200 characters"
        }
      }
    },
    "prompt": {
      "description": "正向提示词,必需,描述你想要生成的图像内容,不能超过500个字符",
      "type": "string",
      "x-i18n": {
        "en-US": {
          "description": "Positive prompt word, required, describes the image content you want to generate, cannot exceed 500 characters"
        }
      }
    }
  },
  "required": [
    "model",
    "prompt",
    "negative_prompt",
    "image",
    "image_fidelity",
    "n",
    "aspect_ratio",
    "callback_url"
  ]
}

请求示例 · 示例 1#

{
  "ids": [
    "4665a07c-7641-4809-a133-10786201bb56"
  ]
}

响应示例 · 成功示例#

[
  {
    "artifact": {
      "created_at": "0001-01-01T00:00:00Z",
      "last_frame": {
        "height": 752,
        "media_type": "image",
        "palette": null,
        "url": "https://storage.cdn-luma.com/dream-machine/b0d67582-c6f0-4973-a89c-3fea9d46d5e9/606108d9-9daf-4265-84fb-595f18240ac5/video_0_last_frame.jpg",
        "width": 1360
      },
      "thumbnail": {
        "height": 752,
        "media_type": "image",
        "palette": {
          "grid": "em9csKqXYUgqdHVmmqeZLB8YaFpLjVw2bmFTTElBHhMNTzgodD8eVzUeTDorRSkYYEQymV80e1M0ck0ugWVRwKCApWk0hF1BgmVP"
        },
        "url": "https://imagedelivery.net/1KomXrSWiTojGGip43n0SQ/e4268de5-4a74-45ff-67b8-dc46df12de00/public",
        "width": 1360
      },
      "video": {
        "download_url": "https://storage.cdn-luma.com/dream-machine/b0d67582-c6f0-4973-a89c-3fea9d46d5e9/35049450-c008-4607-b1d0-0b025599f15d/video0b6619468da8e409da860706bbf26bbad.mp4",
        "height": 752,
        "url": "https://storage.cdn-luma.com/dream-machine/b0d67582-c6f0-4973-a89c-3fea9d46d5e9/35049450-c008-4607-b1d0-0b025599f15d/video0b6619468da8e409da860706bbf26bbad.mp4",
        "width": 1360
      },
      "video_raw": {
        "duration": 5.041667,
        "height": 752,
        "media_type": "video",
        "url": "https://storage.cdn-luma.com/dream-machine/b0d67582-c6f0-4973-a89c-3fea9d46d5e9/35049450-c008-4607-b1d0-0b025599f15d/video0b6619468da8e409da860706bbf26bbad.mp4",
        "width": 1360
      }
    },
    "created_at": "2024-12-22T13:38:40.139Z",
    "id": "4665a07c-7641-4809-a133-10786201bb56",
    "last_frame": {
      "height": 752,
      "media_type": "image",
      "palette": null,
      "url": "https://storage.cdn-luma.com/dream-machine/b0d67582-c6f0-4973-a89c-3fea9d46d5e9/606108d9-9daf-4265-84fb-595f18240ac5/video_0_last_frame.jpg",
      "width": 1360
    },
    "request": {
      "aspect_ratio": "16:9",
      "prompt": "cat dance"
    },
    "state": "completed",
    "thumbnail": {
      "height": 752,
      "media_type": "image",
      "palette": {
        "grid": "em9csKqXYUgqdHVmmqeZLB8YaFpLjVw2bmFTTElBHhMNTzgodD8eVzUeTDorRSkYYEQymV80e1M0ck0ugWVRwKCApWk0hF1BgmVP"
      },
      "url": "https://imagedelivery.net/1KomXrSWiTojGGip43n0SQ/e4268de5-4a74-45ff-67b8-dc46df12de00/public",
      "width": 1360
    },
    "video": {
      "download_url": "https://storage.cdn-luma.com/dream-machine/b0d67582-c6f0-4973-a89c-3fea9d46d5e9/35049450-c008-4607-b1d0-0b025599f15d/video0b6619468da8e409da860706bbf26bbad.mp4",
      "height": 752,
      "url": "https://storage.cdn-luma.com/dream-machine/b0d67582-c6f0-4973-a89c-3fea9d46d5e9/35049450-c008-4607-b1d0-0b025599f15d/video0b6619468da8e409da860706bbf26bbad.mp4",
      "width": 1360
    },
    "video_raw": {
      "duration": 5.041667,
      "height": 752,
      "media_type": "video",
      "url": "https://storage.cdn-luma.com/dream-machine/b0d67582-c6f0-4973-a89c-3fea9d46d5e9/35049450-c008-4607-b1d0-0b025599f15d/video0b6619468da8e409da860706bbf26bbad.mp4",
      "width": 1360
    }
  }
]

请求参数

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

示例
{
    "ids": [
        "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
        "b2c3d4e5-f6a7-8901-bcde-f12345678901"
    ]
}

请求示例代码

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
请求示例请求示例
Shell
JavaScript
Java
Swift
cURL
curl --location '/luma/tasks' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
    "ids": [
        "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
        "b2c3d4e5-f6a7-8901-bcde-f12345678901"
    ]
}'

返回响应

🟢200成功
application/json
成功
Bodyapplication/json

示例
{
    "id": "string",
    "prompt": "string",
    "state": "queued",
    "queue_state": "string",
    "created_at": "string",
    "batch_id": "string",
    "video": {
        "url": "string",
        "width": 0,
        "height": 0
    },
    "thumbnail": {
        "url": "string"
    },
    "last_frame": {
        "url": "string"
    },
    "estimate_wait_seconds": 0
}
🟠400请求有误
🟠401没有权限
修改于 2026-10-24 18:33:11
上一页
延长视频
下一页
LumaGenerationResponse
Built with