Skip to main content

Query the task status

Query the task status

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.

Request

Path parameters

appId stringrequired

The App ID of the project

agentId stringrequired

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.

    OK
    • message string

      Details of the request result

    • agent_id string

      The ID of the agent.

    • create_ts integer

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

    • status 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

  • If the returned status code is not 200, the request failed. Refer to message and code fields to understand the possible reasons for failure.

    OK
    • message string

      Details of the failed request.

    • agent_id string

      The ID of the agent.

    • create_ts integer

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

    • status 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.

Authorization

This endpoint requires Basic Auth.

Request example


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

Response example


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

vundefined