Skip to main content

Query the task status

GET
https://api.agora.io/v1/projects/{appId}/rtsc/speech-to-text/tasks/{taskId}

Use this endpoint to query the status of a Real-Time STT task.

Request​

Path parameters​

appId stringrequired

The App ID of the project

taskId stringrequired

The unique identifier of the Real-Time STT task you received in the response body of the start method.

Query parameters​

builderToken stringrequired

The tokenName value you obtained in the response body of the acquire method.

Response​

  • If the returned status code is 200, the request was successful. The response body contains the result of the request.

    OK
    • taskId stringrequired

      The unique identifier of this transcription task.

    • createTs integerrequired

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

    • status stringrequired

      The current status of the transcription task:

      • IDLE: Task not initialized
      • PREPARING: Task has received an initialization request
      • PREPARED: Task initialization completed
      • STARTING: Task is beginning to start
      • CREATED: Task startup partially completed
      • STARTED: Task startup fully completed
      • IN_PROGRESS: Task is currently running
      • STOPPING: Task is in the process of being paused
      • STOPPED: Task has been terminated
      • FAILURE_STOP: Task termination 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.

    Non-200
    • message string

      The reason why the request failed.

Authorization

This endpoint requires Basic Auth.

Request example


_3
curl --request GET \
_3
--url 'https://api.agora.io/v1/projects/:appId/rtsc/speech-to-text/tasks/:taskId?builderToken=your_builder_token' \
_3
--header 'Authorization: Basic <credentials>'

Response example


_5
{
_5
"tokenName": "The value of the builder token you use to call other methods.",
_5
"createTs": null,
_5
"instanceId": "The `instanceId` you specified in the request."
_5
}