API reference

Batch query tasks

Query the status of multiple tasks in batches based on the ID list. "state": "completed" enumeration values: "pending", "processing", "completed", "failed"

POST/luma/tasks

Body Parametersapplication/json

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.

ids* array

Task ID list

items
string string
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

Responses

200 success application/json
response-200 array
items
LumaGenerationResponse object
400 Bad request or validation failed application/json
response-400 object
properties
error* object
401 Missing or invalid API Key application/json
response-401 object
Request Body Example Batch query tasks
1{
2"ids": [
3"a1b2c3d4-e5f6-7890-abcd-ef1234567890",
4"b2c3d4e5-f6a7-8901-bcde-f12345678901"
5]
6}
Code Sample cURL
1curl -X POST "https://api.digislash.com/luma/tasks" \
2-H "Authorization: Bearer <API Key>" \
3-H "Content-Type: application/json" \
4-d '{
5"ids": [
6"a1b2c3d4-e5f6-7890-abcd-ef1234567890",
7"b2c3d4e5-f6a7-8901-bcde-f12345678901"
8]
9}'
Response
1▼[
2▼{
3"batch_id": "string",
4"created_at": "string",
5"estimate_wait_seconds": 0,
6"id": "string",
7▶"last_frame": { 1 keys },
8"prompt": "string",
9"queue_state": "string",
10"state": "queued",
11▶"thumbnail": { 1 keys },
12▶"video": { 3 keys }
13}
14]