cantonese.aiAPI Reference

OpenAI Compatible

Cantonese.AI's API is compatible with OpenAI's libraries, making it easy to integrate our specialized Cantonese language models into your existing applications.

To start using Cantonese.AI with OpenAI's client libraries, pass in your Cantonese.AI API key to the api_key option, and change the base_url to https://stt-api.cantonese.ai/v1/ for Speech-to-Text.

Example Request

Here are examples of how to transcribe audio files using different programming languages.

curl -X POST "https://stt-api.cantonese.ai/v1/audio/transcriptions" \
-H "Authorization: Bearer XXXXXXX" \
-F "[email protected]" \
-F "language=zh"

Status Codes

The API returns standard HTTP status codes to indicate the success or failure of requests.

Status CodeDescription
200Success - Audio transcribed successfully
400Bad Request - Invalid parameters or malformed request
401Unauthorized - Invalid or missing API key
403Forbidden - API key doesn't have permission for this endpoint
413Payload Too Large - Audio file exceeds maximum size limit
415Unsupported Media Type - Audio format not supported
422Unprocessable Entity - Audio file corrupted or invalid parameter values
429Too Many Requests - Rate limit exceeded
500Internal Server Error - Server encountered an unexpected condition
503Service Unavailable - Server is temporarily unable to handle the request