API One Doc

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

ParameterLocationTypeRequiredDescription
idQuerystringYesTask ID returned after task submission
AuthorizationHeaderstringYesBearer <API Key>

Response Fields

FieldTypeDescription
idstringTask ID
statusstringTask status, see table below
progressintegerGeneration progress 0~100 (only returned when running or succeeded)
resultsarrayResult array, elements are { "url": "result link" } (only returned when succeeded)
errorstringFailure reason (only returned when failed or violation)

Status Values

ValueMeaningHTTP Status
runningTask in progress, retry later200
succeededGeneration succeeded, get result from results200
failedTask failed, see error400
violationContent violation, see error400

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 status is running; stop and retrieve results when succeeded; stop and read error when failed / violation.
  • Set a reasonable total timeout for polling (video tasks may take several minutes).

Common Errors

ScenarioHTTPResponse Example
Missing id400{"status":"failed","error":"id is required"}
Task not found or not owned by current API Key400{"id":"...","status":"failed","error":"task not found"}
Invalid or missing API Key401Authentication error

On this page