Stream task events
Subscribes to SSE events for one async task.
GET /v1/tasks/{task_id}/events
Used to listen for task status changes in the frontend or backend. Mobile shows only the endpoint list; use desktop for event fields.
Back to Task endpoint listRequest parameters
| Field | Type | Required | Description |
|---|---|---|---|
task_id | path | Yes | Task ID. |
Request examples
curl -N "https://api.globalrouter.com/v1/tasks/task_01HV.../events" \ -H "Authorization: Bearer $GR_API_KEY"
Response fields
| Field | Type | Required | Description |
|---|---|---|---|
event | string | No | SSE event name. |
data.status | string | Yes | Task status. |
data.progress | number | No | Task progress. |
Response example
event: task.updated
data: {"id":"task_01HV...","status":"running","progress":40}
event: task.updated
data: {"id":"task_01HV...","status":"succeeded","progress":100}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. |