Manage custom vocabularies through HTTP APIs, including creating, listing, getting, updating, and deleting vocabularies.
User guide: Improve recognition accuracy.
Custom vocabulary isn't supported in sub-workspaces of the Singapore region.
Endpoint
China (Beijing)
POST https://{WorkspaceId}.cn-beijing.maas.aliyuncs.com/api/v1/services/audio/asr/customization
Replace {WorkspaceId} with your actual workspace ID.
Singapore
POST https://{WorkspaceId}.ap-southeast-1.maas.aliyuncs.com/api/v1/services/audio/asr/customization
Replace {WorkspaceId} with your actual Workspace ID.
Alibaba Cloud Model Studio has released workspace-specific domains for the China (Beijing) and Singapore regions. The new dedicated domains deliver superior performance and higher stability for inference requests. We recommend migrating to the new domains:
China (Beijing): from
dashscope.aliyuncs.comto{WorkspaceId}.cn-beijing.maas.aliyuncs.comSingapore: from
dashscope-intl.aliyuncs.comto{WorkspaceId}.ap-southeast-1.maas.aliyuncs.com
Replace {WorkspaceId} with your actual Workspace ID. The existing domains remain fully functional.
Request headers
|
Parameter |
Type |
Required |
Description |
|
Authorization |
string |
Yes |
Bearer token. Use the format |
|
Content-Type |
string |
Yes |
Media type of the request body. Set to |
Create a vocabulary
Request body |
The following URL is for the China (Beijing) region. The URLs vary by region. The API keys for the Singapore region and the Beijing region are different. For more information, see Obtain an API key.
|
|
model The custom vocabulary model. Set to |
|
|
input The input parameters. |
Response body |
|
|
request_id The unique identifier of this request. |
|
|
output The response data. |
|
|
usage The usage information of this request. |
List vocabularies
Request body |
The following URL is for the China (Beijing) region. The URLs vary by region. The API keys for the Singapore region and the Beijing region are different. For more information, see Obtain an API key.
|
|
model The custom vocabulary model. Set to |
|
|
input The input parameters. |
Response body |
|
|
request_id The unique identifier of this request. |
|
|
output The response data. |
|
|
usage The usage information of this request. |
Get a vocabulary
Request body |
The following URL is for the China (Beijing) region. The URLs vary by region. The API keys for the Singapore region and the Beijing region are different. For more information, see Obtain an API key.
|
|
model The custom vocabulary model. Set to |
|
|
input The input parameters. |
Response body |
|
|
request_id The unique identifier of this request. |
|
|
output The response data. |
|
|
usage The usage information of this request. |
Update a vocabulary
Request body |
The following URL is for the China (Beijing) region. The URLs vary by region. The API keys for the Singapore region and the Beijing region are different. For more information, see Obtain an API key.
|
|
model The custom vocabulary model. Set to |
|
|
input The input parameters. |
Response body |
|
|
request_id The unique identifier of this request. |
|
|
output The response data. Always empty. |
|
|
usage The usage information of this request. |
Delete a vocabulary
Request body |
The following URL is for the China (Beijing) region. The URLs vary by region. The API keys for the Singapore region and the Beijing region are different. For more information, see Obtain an API key.
|
|
model The custom vocabulary model. Set to |
|
|
input The input parameters. |
Response body |
|
|
request_id The unique identifier of this request. |
|
|
output The response data. Always empty. |
|
|
usage The usage information of this request. |