Create transcription
Upload an audio file and create a transcription.
POST /v1/audio/transcriptions
OpenAI-style audio transcription. Requests use multipart/form-data and must specify a provider.
Back to Audio endpoint listRequest parameters
| Field | Type | Required | Description |
|---|---|---|---|
file | file | Yes | Audio to transcribe: WAV, MP3, or M4A, up to 25 MiB. |
model | string | Yes | Transcription model ID, such as qwen3-asr-flash-filetrans. |
provider | string | Yes | Provider ID; use ali for Qwen models. |
language | string | No | Audio language hint, such as zh or en. |
response_format | string | No | Response format: json (default) or verbose_json. |
temperature | number | No | Sampling temperature. |
Request examples
curl -X POST "https://api.globalrouter.com/v1/audio/transcriptions" \ -H "Authorization: Bearer $GR_API_KEY" \ -F "file=@./meeting.mp3;type=audio/mpeg" \ -F "model=qwen3-asr-flash-filetrans" \ -F "provider=ali" \ -F "language=zh" \ -F "response_format=verbose_json" \ -F "temperature=0"
Response fields
| Field | Type | Required | Description |
|---|---|---|---|
text | string | Yes | Transcribed text. |
duration | number | No | Audio duration. |
usage | object | No | Usage and billing information. |
Response example
{
"text": "这是一段音频转写结果。",
"duration": 12.4
}Errors
| HTTP | Code | Description |
|---|---|---|
| 401 | UNAUTHORIZED | Missing or invalid Authorization Bearer token. |
| 403 | FORBIDDEN | The current API key is not allowed to call this scope or model. |
| 429 | RATE_LIMITED | Requests are too frequent or the asynchronous task queue is full; reduce concurrency or retry later. |
Notes
- qwen3-asr-flash-filetrans currently supports only json and verbose_json; prompt is not supported.
- Upload file using multipart/form-data, not file_url or Base64 text.