Theme
Batch Get Tasks
POST
https://www.kkiai.com/luma/tasks
"state": "completed" Enum values: "pending", "processing", "completed", "failed"
Request Parameters
Authorization
Add the Authorization parameter to the Header, with the value being the Token concatenated after Bearer
Example: Authorization: Bearer ********************
Header Parameters
| Parameter | Type | Required | Description | Example |
|---|---|---|---|---|
Content-Type | string | Required | application/json | |
Accept | string | Required | application/json | |
Authorization | string | Required | Bearer {{YOUR_API_KEY}} |
Body Parameters (application/json)
| Parameter | Type | Required | Description |
|---|---|---|---|
model | string | Required | Model to use, optional, defaults to kling-image |
prompt | string | Required | Positive prompt, required, describes the image content you want to generate, cannot exceed 500 characters |
negative_prompt | string | Required | Negative prompt, optional, describes elements you don't want to appear in the image, cannot exceed 200 characters |
image | string | Required | Reference image, optional, supports Base64 encoding or image URL, supports .jpg/.jpeg/.png formats, size cannot exceed 10MB |
image_fidelity | number | Required | Impact strength of reference image, optional, value range: 0-1, larger values make the generated image closer to the reference image |
n | integer | Required | Number of images to generate, optional, value range: 1-9 |
aspect_ratio | string | Required | Aspect ratio of generated image, optional, possible values: 16:9, 9:16, 1:1, 4:3, 3:4, 3:2, 2:3 |
callback_url | string | Required | Callback notification URL, optional, the system will send notifications to this address when the task state changes |
Request Example
json
{
"ids": [
"4665a07c-7641-4809-a133-10786201bb56"
]
}cURL Example
bash
curl --location --request POST 'https://www.kkiai.com/luma/tasks' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data-raw '{
"ids": [
"4665a07c-7641-4809-a133-10786201bb56"
]
}'Response
🟢 200 Success
Response Example
json
[
{
"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
}
}
]