Get task
Queries async task status and artifacts.
GET /v1/tasks/{task_id}
Used to poll async video, audio, or 3D tasks. Task ownership is determined by the tenant of the API key.
Back to Task endpoint listRequest parameters
| Field | Type | Required | Description |
|---|---|---|---|
task_id | path | Yes | Task ID. |
wait | query | No | Optional wait seconds for short polling until task status changes. |
Request examples
curl "https://api.globalrouter.com/v1/tasks/task_01HV...?wait=10" \ -H "Authorization: Bearer $GR_API_KEY"
Response fields
| Field | Type | Required | Description |
|---|---|---|---|
id | string | Yes | Task ID. |
object | string | Yes | Always task. |
status | string | Yes | Task status. |
progress | number | Yes | Task progress, from 0 to 1. |
progress_detail | object | No | Detailed progress information. |
type | string | Yes | Task type. |
capability | string | No | Task capability tag. |
model | string | Yes | Model ID used by the task. |
input | object | Yes | Task input snapshot. |
output | array | No | Artifact list after task success. |
result | object | No | Provider result summary. |
error | object | No | Error information when the task fails. |
usage | object | No | Usage and billing details. |
attempt | object | Yes | Retry count summary, including current and max. |
links | object | No | Query, cancellation, or event subscription URL. |
provider | string | No | Provider that executed the task. |
cost_usd | number | No | Task cost. |
billing_model_key | string | No | Billing model key. |
discount_id | string | No | Discount ID. |
discount_factor | number | Yes | Discount factor. |
list_cost | number | Yes | List-price cost before discounts. |
discount_amount | number | Yes | Discount amount. |
actual_cost | number | Yes | Actual charge. |
webhook_url | string | No | Task callback URL. |
metadata | object | No | Application metadata. |
priority | integer | Yes | Task priority. |
started_at | string | No | Task start time. |
finished_at | string | No | Task end time. |
completed_at | string | No | Task completion time. |
canceled_at | string | No | Task cancellation time. |
created_at | string | Yes | Task creation time. |
updated_at | string | Yes | Task update time. |
Response example
{
"id": "task_01HV...",
"object": "task",
"type": "video_generation",
"status": "succeeded",
"progress": 1,
"progress_detail": {},
"model": "seedance-video",
"input": { "prompt": "城市天台日落", "duration": 5 },
"output": [
{
"kind": "video",
"url": "https://assets.example.test/video.mp4",
"mime_type": "video/mp4",
"duration_ms": 5000
}
],
"result": null,
"error": null,
"usage": { "total_cost": 0.12 },
"attempt": { "current": 1, "max": 3 },
"links": { "self": "/v1/tasks/task_01HV..." },
"provider": "doubao",
"metadata": { "project": "docs-demo" },
"priority": 5,
"started_at": "2026-06-26T10:00:05Z",
"finished_at": "2026-06-26T10:02:00Z",
"completed_at": "2026-06-26T10:02:00Z",
"created_at": "2026-06-26T10:00:00Z",
"updated_at": "2026-06-26T10:02:00Z"
}Errors
| HTTP | Code | Description |
|---|---|---|
| 401 | UNAUTHORIZED | Missing or invalid Authorization Bearer token. |
| 403 | FORBIDDEN | The current API key is not allowed to call this scope or model. |
| 429 | RATE_LIMITED | Requests are too frequent or the asynchronous task queue is full; reduce concurrency or retry later. |