Audio Translations
Translate foreign language spoken audio directly into fluent English text across Whisper models with sub-second failover and exact list-price settlement.
The /v1/audio/translations endpoint translates audio from over 90 source languages directly into English text using Whisper models. It delivers multi-provider failover, tenant budget ceilings, and zero-markup provider list pricing via a unified gateway.
POST https://api.nrouter.ai/v1/audio/translationsRequests run preflight as Chat Completions: key validation, rate limits, and container checks (25 MB limit, prompt injection scanning). Duration-based reservations settle on completion.
Request Parameters
The request body must be submitted as multipart/form-data:
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
file | binary | Yes | — | Audio file (flac, mp3, mp4, wav, webm, etc.; max 25 MB). |
model | string | Yes | — | Model ID (e.g. whisper-1). |
prompt | string | No | — | Optional steering text for style or terms. |
response_format | string | No | json | Format: json, text, srt, verbose_json, or vtt. |
temperature | number | No | 0 | Sampling temperature between 0.0 and 1.0. |
Response
{
"text": "Hello, how are you today? We are testing multi-cloud voice routing."
}Examples
curl -X POST https://api.nrouter.ai/v1/audio/translations \
-H "Authorization: Bearer $NROUTER_API_KEY" \
-F file="@japanese_audio.m4a" \
-F model="whisper-1"Headers & Errors
Required request header: Authorization: Bearer sk-nrouter-... with Content-Type: multipart/form-data. Response telemetry includes x-nr-request-id, x-nr-latency-ms, x-nr-request-cost, x-nr-model. See Chat Completions.
| HTTP Status | Error Code | Reason |
|---|---|---|
| 400 Bad Request | invalid_request | Missing file or model, or corrupted container headers. |
| 400 Bad Request | guardrail_blocked | Prompt text violated safety or injection policies. |
| 401 Unauthorized | invalid_api_key | Virtual key missing, expired, or invalid. |
| 402 Payment Required | insufficient_credits | Organization balance insufficient for duration hold. |
| 413 Payload Too Large | payload_too_large | File exceeds 25 MB limit. |
| 429 Too Many Requests | rate_limit_exceeded | Account or key RPM ceiling exceeded; check x-nr-limit-source. |
Authorization
NRouterApiKey Your nRouter virtual key (sk-nrouter-…). Sent as Authorization: Bearer sk-nrouter-….
In: header
Header Parameters
Target MCP server ID when routing MCP tool calls or prompts through the gateway
Caller SDK runtime language identification (e.g. typescript, python, rust, go)
Caller session identifier allowed at edge for grouping related client turns
Inbound trace detail level override for request lifecycle spans
Value in
- "off"
- "stages"
- "verbose"
Inbound stage-level trace emission override
Value in
- "off"
- "stages"
- "verbose"
Accepted so a client sending it is not refused; the value is not recorded and not propagated. Every response carries the gateway's own trace ID in this header, never the one sent.
Request Body
multipart/form-data
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/v1/audio/translations" \ -F model="string" \ -F file="string"{ "text": "Hello, how are you?"}