跳转到主要内容
POST /v1/audio/translations 发送 multipart,包含支持翻译的 model 和 file。OpenAI 兼容语义为将录音翻译成英语;不是通过 language 指定任意目标语言。 默认按 JSON 的 text 读取。字幕及详细格式需模型支持;不要将转写模型自动视为翻译模型。 完整接入指南与可执行示例 Read in English

授权

Authorization
string
header
必填

模型调用 API Key,不是控制台登录凭据 / Model API key, not console login credentials

请求体

multipart/form-data
model
string
必填

当前密钥可用且支持此接口的模型 ID / Model ID available to the key and supporting this endpoint

示例:

"YOUR_MODEL_ID"

file
file
必填

上传音频文件,保留正确扩展名;不是路径字符串或 URL / Uploaded audio file with correct extension, not a path string or URL

response_format
string

示例使用 json;text、srt、vtt、verbose_json 等需模型支持 / Examples use json; text, srt, vtt, verbose_json and other formats require model support

prompt
string

可选上下文提示,不是翻译目标语言 / Optional context hint, not the target translation language

temperature
number

采样温度,需模型支持 / Sampling temperature when supported

响应

由 response_format 决定;示例为 json / Determined by response_format; example uses json

text
string
必填

转写或翻译文本,静音可能为空 / Transcribed or translated text; silence may yield empty text