Query the task status

Updated

Queries the status of a Real-time STT task.

gethttps://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

200application/json

OK

message#optionalstring

Details of the request result

agent_id#optionalstring

The ID of the agent.

create_ts#optionalinteger

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

status#optionalstring

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
AllowedIDLE | STARTING | RUNNING | STOPPING | STOPPED | RECOVERING | FAILED
defaultapplication/json

Error response.

message#optionalstring

Details of the failed request.

agent_id#optionalstring

The ID of the agent.

create_ts#optionalinteger

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

status#optionalstring

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

AllowedFAILED

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"}
{  "message": "Details of the failed request.",  "agent_id": "Agent ID.",  "create_ts": null,  "status": "FAILED"}