Every Kling AI task created through Fhddos is asynchronous. After submitting a task, you receive a task_id and platform_id that you use to poll for progress. Fhddos’s task query endpoints accept any of three identifiers — the upstream Kling task_id, Fhddos’s own platform_id, or your custom external_task_id — so you can integrate with whatever tracking system you prefer.
export TOKEN="oh-xxxxxxxxxxxxxxxx"
Authorization: Bearer <TOKEN>
Task Status Lifecycle
submitted → processing → succeed
→ failed
| Status | Description |
|---|
submitted | Task accepted and queued upstream |
processing | Video or image is actively being generated |
succeed | Generation complete — results available in task_result |
failed | Generation failed — check task_status_msg for the reason |
Task ID Types
| ID Type | Format | Description |
|---|
task_id | Kling-assigned string | Upstream original ID from Kling’s system |
platform_id | video_<ULID> or image_<ULID> | Fhddos’s internal tracking ID |
external_task_id | Your own string | Custom ID you passed at task creation for idempotency |
All three types are accepted interchangeably in query endpoints.
Response Fields
| Field | Description |
|---|
task_id | Upstream original task ID |
platform_id | Fhddos platform tracking ID |
task_status | Current status: submitted / processing / succeed / failed |
task_status_msg | Failure reason — only present when task_status is failed |
task_info.external_task_id | Echo of the custom ID you provided at creation |
task_result | Result payload (videos or images) — only present when succeed |
watermark_info | Watermark echo — present if watermark was enabled at creation |
final_unit_deduction | Credits deducted after successful completion |
created_at | Task creation timestamp (milliseconds) |
updated_at | Last update timestamp (milliseconds) |
Billing Fields
When final_unit_deduction is present in the response, credits are charged:
- Video tasks: 1 credit = ¥1
- Image tasks: 1 credit = ¥0.025
If final_unit_deduction is absent from a completed task, the task is not billed.
Video Task Queries
Text-to-Video
curl "https://aiapi.fhddos.com/kling/v1/videos/text2video/$TASK_ID" \
-H "Authorization: Bearer $TOKEN"
Image-to-Video
curl "https://aiapi.fhddos.com/kling/v1/videos/image2video/$TASK_ID" \
-H "Authorization: Bearer $TOKEN"
Omni Video
curl "https://aiapi.fhddos.com/kling/v1/videos/omni-video/$TASK_ID" \
-H "Authorization: Bearer $TOKEN"
Multi-Image Reference Video
curl "https://aiapi.fhddos.com/kling/v1/videos/multi-image2video/$TASK_ID" \
-H "Authorization: Bearer $TOKEN"
Image Task Queries
Image Generation
curl "https://aiapi.fhddos.com/kling/v1/images/generations/$TASK_ID" \
-H "Authorization: Bearer $TOKEN"
Omni Image
curl "https://aiapi.fhddos.com/kling/v1/images/omni-image/$TASK_ID" \
-H "Authorization: Bearer $TOKEN"
Multi-Image Reference Image
curl "https://aiapi.fhddos.com/kling/v1/images/multi-image2image/$TASK_ID" \
-H "Authorization: Bearer $TOKEN"
Multimodal Editing Task Query
curl "https://aiapi.fhddos.com/kling/v1/videos/multi-elements/$TASK_ID" \
-H "Authorization: Bearer $TOKEN"
| Parameter | Type | Default | Range | Description |
|---|
pageNum | integer | 1 | [1, 1000] | Page number |
pageSize | integer | 30 | [1, 500] | Results per page |
Response Examples
Successful Video Task
{
"code": 0,
"message": "success",
"request_id": "req_...",
"data": {
"task_id": "task_01JGHS...",
"platform_id": "video_01JGHS...",
"task_status": "succeed",
"task_info": {
"external_task_id": "my-custom-id-123"
},
"watermark_info": {
"enabled": true
},
"final_unit_deduction": "7",
"task_result": {
"videos": [
{
"id": "vid_abc123",
"url": "https://cdn.example.com/generated-video.mp4",
"duration": "5"
}
]
},
"created_at": 1735558800000,
"updated_at": 1735559100000
}
}
Successful Image Task
{
"code": 0,
"message": "success",
"request_id": "req_...",
"data": {
"task_id": "task_01JGHT...",
"platform_id": "image_01JGHT...",
"task_status": "succeed",
"watermark_info": {
"enabled": true
},
"final_unit_deduction": "4",
"task_result": {
"images": [
{"index": 0, "url": "https://cdn.example.com/image-0.jpg"},
{"index": 1, "url": "https://cdn.example.com/image-1.jpg"}
]
},
"created_at": 1735558800000,
"updated_at": 1735559000000
}
}
Failed Task
{
"code": 0,
"message": "success",
"data": {
"task_id": "task_01JGHU...",
"platform_id": "video_01JGHU...",
"task_status": "failed",
"task_status_msg": "Content moderation failed",
"created_at": 1735558800000,
"updated_at": 1735558900000
}
}
Polling Pattern
Here is a recommended polling loop in Python:
import time
import requests
def poll_task(task_id: str, endpoint: str, token: str, interval: int = 5, timeout: int = 300):
base_url = f"https://aiapi.fhddos.com/kling/v1/{endpoint}/{task_id}"
headers = {"Authorization": f"Bearer {token}"}
elapsed = 0
while elapsed < timeout:
response = requests.get(base_url, headers=headers)
data = response.json()["data"]
status = data["task_status"]
if status == "succeed":
return data["task_result"]
elif status == "failed":
raise RuntimeError(f"Task failed: {data.get('task_status_msg', 'unknown')}")
time.sleep(interval)
elapsed += interval
raise TimeoutError(f"Task {task_id} did not complete within {timeout}s")
# Example usage
result = poll_task("task_01JGHS...", "videos/text2video", "oh-xxxxxxxx")
print(result["videos"][0]["url"])
Tips
Store the platform_id alongside task_id in your database. The platform_id is consistent across all Fhddos task APIs and appears in the Fhddos task panel, making cross-referencing easy.
A code: 0 at the top level means the API call itself succeeded — it does not indicate that the generation task succeeded. Always check data.task_status to determine the actual generation outcome.