Get Task
Query the latest status and results of a general audio asynchronous task. Use the task_id returned by the server when the asynchronous task was created (async=true). When a task succeeds, the result fields are expanded at the top level rather than wrapped in a result field. All audio asynchronous tasks — including Create Transcription — are queried uniformly through this endpoint.
Authentication
Add Authorization: Bearer <API_KEY> to the request header to authenticate. You can generate a key on the console "API Keys" page.
curl https://api.mosi.cn/v1/audio/tasks/$TASK_ID \
-H "Authorization: Bearer $MOSS_API_KEY"
Path parameters
| Field | Type | Required | Description |
|---|---|---|---|
| task_id | string | Yes | The task ID returned by the server when the asynchronous task was created, e.g. |
Request example
curl https://api.mosi.cn/v1/audio/tasks/$TASK_ID \
-H "Authorization: Bearer $MOSS_API_KEY"
Response fields
| Field | Type | Always returned | Description |
|---|---|---|---|
| id | string | Yes | Task ID. |
| object | string | Yes | Task object type, for example |
| status | string | Yes | Task status, for example |
| created_at | integer | Yes | Creation time, a Unix timestamp in seconds. |
| updated_at | integer | Yes | Last update time, a Unix timestamp in seconds. |
| retry_after | integer | No | Suggested polling interval in seconds, returned while the task has not reached a terminal state. |
Response example
{
"id": "task_abc123",
"object": "audio.speech",
"status": "PROCESSING",
"created_at": 1710000000,
"updated_at": 1710000000,
"retry_after": 3
}
A task may stay in PROCESSING for an extended period, and completion time depends on actual processing; start polling at the returned retry_after interval (in seconds).