List Real-time STT agents

Updated

Retrieves Real-time STT agents that match specified criteria.

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

Use this method to retrieve a list of real-time transcription and translation agents that match specified criteria.

Path Parameters

appid#*string

The App ID of the project.

Query Parameters

channel#?string

Filters the agent list by channel name.

from_time#?integer

The start of the query time range, as a Unix timestamp in seconds. Defaults to 1 day ago.

to_time#?integer

The end of the query time range, as a Unix timestamp in seconds. Defaults to the current time.

state#?string

Filters agents by status. Only one status value can be specified per request:

  • 0 - IDLE: The agent is not initialized.
  • 1 - STARTING: The agent is starting.
  • 2 - RUNNING: The agent is running.
  • 3 - STOPPING: The agent is exiting.
  • 4 - STOPPED: The agent exited successfully.
  • 5 - RECOVERING: The agent is recovering.
  • 6 - FAILED: The agent exited with a failure.
Default2
limit#?integer

The maximum number of agents to return per page.

Default20
cursor#?string

The pagination cursor. Set this to the agent_id of the last item from the previous page to retrieve the next page of results.

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

data#optionalobject
meta#optionalobject

Metadata about the returned list.

status#optionalstring

The request status.

defaultapplication/json

Error response.

detail#optionalstring

Details of the request failure.

reason#optionalstring

The reason why the request failed.

Response

Refer to the detail and reason 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?state=2&limit=20' \  --header 'Authorization: Basic <credentials>'

Response example

{  "data": {    "count": 1,    "list": [      {        "start_ts": 1735035893,        "status": "RUNNING",        "agent_id": "1NT29X11GQSxxxxx80BEIN56XF"      }    ]  },  "meta": {    "cursor": "",    "total": 1  },  "status": "ok"}
{  "detail": "Details of the request failure.",  "reason": "The reason why the request failed."}