Stop a Real-time STT task
Updated
Stop a Real-Time STT task and leave the channel.
Real-Time STT API versions v5.x and v6.x are deprecated since June 2025 and will reach end-of-life on June 11, 2026. Use the v7 REST API for new projects.
Endpoint
-
Method:
DELETE -
Endpoint:
https://api.agora.io/v1/projects/{appId}/rtsc/speech-to-text/tasks/{taskId}
Use this method to leave the channel and stop Real-Time STT. To restart transcription, acquire a new one buildToken and call start again.
Request
Path parameters
appId Type: string Required
The App ID of the project
taskId Type: string Required
The unique identifier of the Real-Time STT task you received in the response body of the start method.
Query parameters
builderToken Type: string Required
The tokenName value you obtained in the response body of the acquire method. To stop a task, use the same builderToken you used to start the task.
Response
- If the returned status code is
200, the request was successful. - If the returned status code is not
200, the request failed.
Authorization
This endpoint requires Basic Auth.
Request example
curl --request DELETE \
--url https://api.agora.io/v1/projects/:appId/rtsc/speech-to-text/tasks/:taskId?builderToken=your_builder_token \
--header 'Authorization: Basic <credentials>' \
--header 'Content-Type: <string>' import requests
url = "https://api.agora.io/v1/projects/:appId/rtsc/speech-to-text/tasks/:taskId?builderToken=your_builder_token"
headers = {
"Authorization": "Basic <credentials>",
"Content-Type": "<string>"
}
response = requests.request("DELETE", url, headers=headers)
print(response.text) const url = 'https://api.agora.io/v1/projects/:appId/rtsc/speech-to-text/tasks/:taskId?builderToken=your_builder_token';
const options = {
method: 'DELETE',
headers: {Authorization: 'Basic <credentials>', 'Content-Type': '<string>'}
};
fetch(url, options)
.then(res => res.json())
.then(json => console.log(json))
.catch(err => console.error(err));