Create translation
Translate an uploaded audio file into English. Multipart form data.
POST
/v1/audio/translationsmultipart/form-data. Streaming is not supported — the pipeline always runs non-streaming even if a stream field is sent.
Request
bash
curl http://localhost:8080/v1/audio/translations \
-H "Authorization: Bearer $LLM_PROXY_KEY" \
-F file=@recording-fr.mp3 \
-F model=whisper-model \
-F response_format=jsonRequest — OpenAI SDK
python
from openai import OpenAI
client = OpenAI(base_url="http://localhost:8080/v1", api_key="sk-your-proxy-key")
text = client.audio.translations.create(
model="whisper-model",
file=open("recording-fr.mp3", "rb"),
)
print(text.text)Response
json
{"text": "Hello from the proxy!"}Request fields
file (required), model (required), prompt, response_format (json default), temperature. No language and no timestamp_granularities fields.
Response formats
json→{"text"}(default)text/srt/vtt→ plain textverbose_json→ addslanguage,duration,segments
Provider support
openai and the openai-compatible family (except qwen/qwen-intl, which reject the route) — see the capability matrix.
Related
Request
bash
curl http://localhost:8080/v1/audio/translations \
-H "Authorization: Bearer $LLM_PROXY_KEY" \
-F file=@recording-fr.mp3 \
-F model=whisper-model \
-F response_format=jsonRequest — OpenAI SDK
python
from openai import OpenAI
client = OpenAI(base_url="http://localhost:8080/v1", api_key="sk-your-proxy-key")
text = client.audio.translations.create(
model="whisper-model",
file=open("recording-fr.mp3", "rb"),
)
print(text.text)Response
json
{"text": "Hello from the proxy!"}