GRGlobalRouter Docs
Console

Task / GET

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 list

Request parameters

FieldTypeRequiredDescription
task_idpathYesTask ID.
waitqueryNoOptional wait seconds for short polling until task status changes.

Request examples

Get task request examples
curl "https://api.globalrouter.com/v1/tasks/task_01HV...?wait=10" \
  -H "Authorization: Bearer $GR_API_KEY"

Response fields

FieldTypeRequiredDescription
idstringYesTask ID.
objectstringYesAlways task.
statusstringYesTask status.
progressnumberYesTask progress, from 0 to 1.
progress_detailobjectNoDetailed progress information.
typestringYesTask type.
capabilitystringNoTask capability tag.
modelstringYesModel ID used by the task.
inputobjectYesTask input snapshot.
outputarrayNoArtifact list after task success.
resultobjectNoProvider result summary.
errorobjectNoError information when the task fails.
usageobjectNoUsage and billing details.
attemptobjectYesRetry count summary, including current and max.
linksobjectNoQuery, cancellation, or event subscription URL.
providerstringNoProvider that executed the task.
cost_usdnumberNoTask cost.
billing_model_keystringNoBilling model key.
discount_idstringNoDiscount ID.
discount_factornumberYesDiscount factor.
list_costnumberYesList-price cost before discounts.
discount_amountnumberYesDiscount amount.
actual_costnumberYesActual charge.
webhook_urlstringNoTask callback URL.
metadataobjectNoApplication metadata.
priorityintegerYesTask priority.
started_atstringNoTask start time.
finished_atstringNoTask end time.
completed_atstringNoTask completion time.
canceled_atstringNoTask cancellation time.
created_atstringYesTask creation time.
updated_atstringYesTask update time.

Response example

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

HTTPCodeDescription
401UNAUTHORIZEDMissing or invalid Authorization Bearer token.
403FORBIDDENThe current API key is not allowed to call this scope or model.
429RATE_LIMITEDRequests are too frequent or the asynchronous task queue is full; reduce concurrency or retry later.