Query the task status

Updated

Queries the status of a Real-time STT task.

GET
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

appidstring
Required

The App ID of the project.

agentIdstring
Required

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

OK

messagestring

Details of the request result

agent_idstring

The ID of the agent.

create_tsinteger

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

statusstring

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

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"}