# Update task configuration (/en/api-reference/api-ref/speech-to-text/update)

> For AI agents: see the complete documentation index at [llms.txt](/llms.txt).

Updates the configuration of a Real-time STT task.

- OpenAPI: /openapi/speech-to-text/v7.en.yaml
- Operation ID: update
- Method: POST
- Path: /api/speech-to-text/v1/projects/{appid}/agents/{agentId}/update

## Servers

- https://api.agora.io

## Parameters

- `appid` (path, required) - The App ID of the project.
- `agentId` (path, required) - The unique identifier of the agent you received in the response body of the `join` method.
- `sequenceId` (query, required) - The sequence number of `update` requests. The integer value must be greater than or equal to 0. Ensure that the `sequenceId` of the next `update` request is greater than the value you specified for the previous request. The parameter ensures that Agora updates the transcription task according to the latest configuration you specified.
- `updateMask` (query, required) - The specified update configuration item. To update multiple fields, use a comma separator. For example: `updateMask=languages,rtcConfig.subscribeAudioUids,translateConfig.enable,translateConfig.languages`.

## Request body

- `languages` (array) - The transcription languages to recognize. You can specify up to 4 languages. Refer to [Supported Languages](/en/realtime-media/speech-to-text/reference/supported-languages#real-time-translation) for details. Choosing multiple transcription languages can affect both quality and cost. For best practices, see [Optimize transcription quality and cost](/en/realtime-media/speech-to-text/build/extend-and-optimize/optimize-quality).
  - `languages.items` (string)
No schema.
- `keywords` (array) - Keyword list. Use it to improve the recognition accuracy of specific words during transcription. Supports up to 500 words.
  - `keywords.items` (string)
No schema.
- `uidLanguagesConfig` (array) - Configure the transcription language for the specified user ID. Supports up to 5 configuration items. If you set this field when calling `join` and now wish to specify no users, set this field to an empty array `[]`.
  - `uidLanguagesConfig.items` (object) - Configure the transcription language for the specified user ID. Supports up to 5 configuration items.
    - `uidLanguagesConfig.items.uid` (string, required) - The ID of the user to be transcribed. You may configure a maximum of 5 uids for language recognition at the uid level.
No schema.
    - `uidLanguagesConfig.items.languages` (array, required) - The transcription languages to recognize. Each uid can support a maximum of 4 languages. Refer to [Supported Languages](/en/realtime-media/speech-to-text/reference/supported-languages) for details.
      - `uidLanguagesConfig.items.languages.items` (string)
No schema.
- `rtcConfig` (object) - Subscription configuration.
  - `rtcConfig.subscribeAudioUids` (array) - The user IDs of the audio streams you want to subscribe to. Specify this parameter only if you need to subscribe to specific users. To subscribe to audio streams of all users, use `["all"]`. Maximum array length: 32.
    - `rtcConfig.subscribeAudioUids.items` (string)
No schema.
- `translateConfig` (object) - Subtitle translation configuration.
  - `translateConfig.enable` (boolean) - Whether to translate the transcribed text:
- `true`: Translate.
- `false`: Do not translate.
If you enabled translation when calling `join`, you can turn it off by setting `enable` to `false`. If you did not enable translation, you can turn it on by setting `enable` to `true` and specifying `languages`.
No schema.
  - `translateConfig.languages` (array) - The translation languages array. You can specify a maximum of 4 different source languages.
    - `translateConfig.languages.items` (object) - Translation language pair configuration.
      - `translateConfig.languages.items.source` (string, required) - The source language for translation. Refer to [Supported Languages](/en/realtime-media/speech-to-text/reference/supported-languages#real-time-translation) for details.
No schema.
      - `translateConfig.languages.items.target` (array, required) - The target languages for translation. You can configure up to 10 target languages for each source language. Refer to [Supported Languages](/en/realtime-media/speech-to-text/reference/supported-languages#real-time-translation) for details.
- **Single-language input**: If you set the source language to a single language, the target language must be different, otherwise an error is returned. For example, if you set the source language to English, you cannot set the target language to English.
- **Mixed-language input**: If you set the source language to mixed-language input, you can set the target language to one of the source languages. For example, if you set the source languages to Chinese and English, setting the target language to English translates both into English.
        - `translateConfig.languages.items.target.items` (string)
No schema.

## Responses

### 200

OK

- `agent_id` (string) - The ID of the agent.
No schema.
- `create_ts` (integer) - The Unix timestamp (in seconds) when the agent was created.
No schema.
- `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
No schema.
### default

Error response.

- `detail` (string) - Details of the request failure.
No schema.
- `reason` (string) - The reason why the request failed.
No schema.
