Query the task status

Updated

Queries the status of a Real-time STT task.

https://api.agora.io/api/speech-to-text/v1/projects/{appid}/agents/{agentId}

Use this method to query the status of a Real-time STT task.

Path Parameters

appid
*
string

The App ID of the project.

agentId
*
string

The unique identifier of the agent you received in the response body of the join method.

Response

  • If the returned status code is 200, the request was successful. The response body contains the result of the request.

Response Body

application/json

application/json

Response schema

200
application/json

OK

message
optional
string

Details of the request result

agent_id
optional
string

The ID of the agent.

create_ts
optional
integer

The Unix timestamp (in seconds) when the transcription task was created.

status
optional
string

The current status of the agent:

  • IDLE: The agent is not initialized
  • STARTING: The agent is starting
  • RUNNING: The agent is running
  • STOPPING: The agent is exiting
  • STOPPED: The agent exited successfully
  • RECOVERING: The agent is recovering
  • FAILED: Agent exit failed
Allowed
IDLE | STARTING | RUNNING | STOPPING | STOPPED | RECOVERING | FAILED
default
application/json

Error response.

message
optional
string

Details of the failed request.

agent_id
optional
string

The ID of the agent.

create_ts
optional
integer

The Unix timestamp (in seconds) when the transcription task was created.

status
optional
string

The status of the agent. If the returned status code is not 200, the request failed. Troubleshoot according to the details and reason fields.

Allowed
FAILED

Response

Refer to message and code fields to understand the possible reasons for failure.

Authorization

This endpoint requires authentication.

BasicAuth

Request examples

curl --request GET \
  --url https://api.agora.io/api/speech-to-text/v1/projects/:appid/agents/:agentId \
  --header 'Authorization: Basic <credentials>'

Response example

{  "message": "Details of the request result.",  "agent_id": "Agent ID.",  "create_ts": null,  "status": "RUNNING"}