转写音频
将音频转写为文本。
/model/v1/audio/transcriptions● 支持请求体
modelstring必填Transcription model id, for example `whisper-large-v3-turbo` or `qwen3-asr-flash`; list candidates with listModels?type=transcription. Router support (supported): Verified to take effect.
已验证生效。
temperaturenumber可选○ 未支持whisper-large-v3-turbo、qwen3-asr-flash 均返回 400。
response_formatstring可选◐ 部分支持Format of the response body. `json` and `text` are the commonly supported formats. Router support (partial): json/text work on both; verbose_json works only on whisper-large-v3-turbo. srt/vtt return 400.
json/text 均生效;verbose_json 仅 whisper-large-v3-turbo 支持。srt/vtt 均返回 400。
promptstring可选◐ 部分支持Text that primes the model with vocabulary or context. Router support (partial): Vocabulary hints work on whisper-large-v3-turbo only; qwen3-asr-flash returns 400.
仅 whisper-large-v3-turbo 的词表提示已验证生效;qwen3-asr-flash 返回 400。
filestring必填Audio file to transcribe, uploaded as multipart/form-data. Router support (supported): Verified to take effect.
已验证生效。
languagestring可选◐ 部分支持Language of the audio as an ISO-639-1 code such as `en` or `zh`. Router support (partial): Both models accept ISO language codes. qwen3-asr-flash may translate output to that language; whisper-large-v3-turbo treats it as an input hint. Non-ISO names may return 502.
两模型接受 ISO 语言码;qwen3-asr-flash 可能按指定语言翻译输出,whisper-large-v3-turbo 用作输入语言提示。非 ISO 名称可能报 502。
timestamp_granularities[]array可选◐ 部分支持Timestamp levels to include with `verbose_json`; only `segment` exists in this schema. Router support (partial): Only whisper-large-v3-turbo supports segment with verbose_json. word returns 400; qwen3-asr-flash does not support timestamps.
仅 whisper-large-v3-turbo 在 verbose_json 下支持 segment;word 返回 400;qwen3-asr-flash 不支持时间戳。
返回
200
标准请求字段;不能表达的参数返回 input_not_representable。
鉴权、限流、参数校验等平台错误按 problem+json 返回;OCR 的错误也为 problem+json,其它模型调用的错误按该端点所属格式(OpenAI 或 Anthropic)返回,参见 错误码
响应
HTTP 200
Transcription in the requested format.
text/plain
| 名称 | 类型 | 说明 |
|---|---|---|
| $ | string |
application/json
| 名称 | 类型 | 说明 |
|---|---|---|
| text | string | The transcribed text. |
| task | string | Task performed; always `transcribe`. |
| language | string | Language of the audio as detected or as requested. |
| duration | number | Duration of the audio in seconds. |
| segments | array<object> | Segments with timestamps, returned with `verbose_json` on models that support it. |
| segments[].id | integer | Zero-based index of the segment. |
| segments[].start | number | Start time of the segment in seconds. |
| segments[].end | number | End time of the segment in seconds. |
| segments[].text | string | The transcribed text. |
| segments[].temperature | number | Sampling temperature used for the segment. |
| segments[].avg_logprob | number | Average log probability of the tokens of the segment; low values mean low confidence. |
| segments[].compression_ratio | number | Gzip compression ratio of the segment text; high values indicate repetitive output. |
| segments[].no_speech_prob | number | Probability that the segment contains no speech. |