4Z API

Batch query tasks

Endpoint: POST https://4zapi.com/luma/tasks

Query the status of multiple tasks in batches based on the ID list.

"state": "completed" enumeration values: "pending", "processing", "completed", "failed"

Request body (application/json)

  • ids (array<string>, required): Task ID list
  • aspect_ratio (string): 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 (string): Callback notification address, optional. When the task status changes, the system will send a notification to this address.
  • image (string): Reference image, optional, supports Base64 encoding or image URL, supports .jpg/.jpeg/.png format, size cannot exceed 10MB
  • image_fidelity (number): 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 (string): Model to use, optional, defaults to kling-image
  • n (integer): The number of generated images, optional, value range: 1-9
  • negative_prompt (string): Negative prompt word, optional, describes the elements you do not want to appear in the image, cannot exceed 200 characters
  • prompt (string): Positive prompt word, required, describes the image content you want to generate, cannot exceed 500 characters

Request example

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