Async Result Query
Query the status, progress, and result of a single async task by task ID. Applicable to all async tasks.
Query the status, progress, and result of a single task by task ID. Applicable to all async tasks: images (submitted with async:true), videos (Kling / Seedance / Sora, etc.), music (Suno), etc.
GET https://apione.org/v1/api/result?id={task_id}Request Parameters
| Parameter | Location | Type | Required | Description |
|---|---|---|---|---|
id | Query | string | Yes | Task ID returned after task submission |
Authorization | Header | string | Yes | Bearer <API Key> |
Response Fields
| Field | Type | Description |
|---|---|---|
id | string | Task ID |
status | string | Task status, see table below |
progress | integer | Generation progress 0~100 (only returned when running or succeeded) |
results | array | Result array, elements are { "url": "result link" } (only returned when succeeded) |
error | string | Failure reason (only returned when failed or violation) |
Status Values
| Value | Meaning | HTTP Status |
|---|---|---|
running | Task in progress, retry later | 200 |
succeeded | Generation succeeded, get result from results | 200 |
failed | Task failed, see error | 400 |
violation | Content violation, see error | 400 |
Request Example
curl "https://apione.org/v1/api/result?id=task_abcdef0123456789" \
-H "Authorization: Bearer sk-xxxxxxxxxxxx"Response Examples
Succeeded (HTTP 200)
{
"id": "task_abcdef0123456789",
"status": "succeeded",
"progress": 100,
"results": [
{ "url": "https://file1.example.com/file/xxxx.png" }
]
}Running (HTTP 200)
{
"id": "task_abcdef0123456789",
"status": "running",
"progress": 30
}Failed / Violation (HTTP 400)
{
"id": "task_abcdef0123456789",
"status": "failed",
"error": "generate failed"
}Polling Recommendations
- Poll this interface every 3~5 seconds after submitting a task.
- Continue polling when
statusisrunning; stop and retrieveresultswhensucceeded; stop and readerrorwhenfailed/violation. - Set a reasonable total timeout for polling (video tasks may take several minutes).
Common Errors
| Scenario | HTTP | Response Example |
|---|---|---|
Missing id | 400 | {"status":"failed","error":"id is required"} |
| Task not found or not owned by current API Key | 400 | {"id":"...","status":"failed","error":"task not found"} |
| Invalid or missing API Key | 401 | Authentication error |