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
appidstringRequired
The App ID of the project.
agentIdstringRequired
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
messagestringDetails of the request result
agent_idstringThe ID of the agent.
create_tsintegerThe Unix timestamp (in seconds) when the transcription task was created.
statusstringThe current status of the agent:
IDLE: The agent is not initializedSTARTING: The agent is startingRUNNING: The agent is runningSTOPPING: The agent is exitingSTOPPED: The agent exited successfullyRECOVERING: The agent is recoveringFAILED: Agent exit failed
Response
Refer to message and code fields to understand the possible reasons for failure.
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"}