4Z API

批量查询任务

接口: POST https://4zapi.com/luma/tasks

Luma 官方 API · 批量查询任务(POST /luma/tasks)。

根据 ID 列表批量查询多个任务状态。

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

请求体 (application/json)

  • ids (array<string>, 必填): 任务 ID 列表
  • aspect_ratio (string): 生成图片的纵横比,可选,可选值:16:9, 9:16, 1:1, 4:3, 3:4, 3:2, 2:3
  • callback_url (string): 回调通知地址,可选,当任务状态发生变化时,系统会向这个地址发送通知
  • image (string): 参考图片,可选,支持 Base64 编码或图片 URL,支持 .jpg/.jpeg/.png 格式,大小不能超过 10MB
  • image_fidelity (number): 参考图片的影响强度,可选,取值范围:0-1,值越大,生成的图像越接近参考图片
  • model (string): 使用的模型,可选,默认为 kling-image
  • n (integer): 生成图片的数量,可选,取值范围:1-9
  • negative_prompt (string): 负向提示词,可选,描述你不想在图像中出现的元素,不能超过200个字符
  • prompt (string): 正向提示词,必需,描述你想要生成的图像内容,不能超过500个字符

请求示例

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