模型

转写音频

将音频转写为文本。

POST /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可选◐ 部分支持
    默认 "json"

    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。

    取值 jsontextverbose_json
  • 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

名称类型说明
textstringThe transcribed text.
taskstringTask performed; always `transcribe`.
languagestringLanguage of the audio as detected or as requested.
durationnumberDuration of the audio in seconds.
segmentsarray<object>Segments with timestamps, returned with `verbose_json` on models that support it.
segments[].idintegerZero-based index of the segment.
segments[].startnumberStart time of the segment in seconds.
segments[].endnumberEnd time of the segment in seconds.
segments[].textstringThe transcribed text.
segments[].temperaturenumberSampling temperature used for the segment.
segments[].avg_logprobnumberAverage log probability of the tokens of the segment; low values mean low confidence.
segments[].compression_rationumberGzip compression ratio of the segment text; high values indicate repetitive output.
segments[].no_speech_probnumberProbability that the segment contains no speech.