Audio
OpenAI Whisper API - Speech-to-text transcription through UniterRouter. Convert audio to text with GPT-4 level accuracy, supports multiple languages and formats.
Audio
Transcribe audio files to text using state-of-the-art speech recognition models.
Endpoint
POST https://api.uniterouter.ai/v1/audio/transcriptionsRequest
This endpoint accepts multipart/form-data with the following fields:
| Field | Type | Required | Description |
|---|---|---|---|
file | file | Yes | The audio file to transcribe |
model | string | Yes | Model ID (e.g., whisper-1) |
language | string | No | Language code (ISO 639-1) |
prompt | string | No | Optional context to guide transcription |
response_format | string | No | json, text, srt, vtt, verbose_json |
temperature | number | No | Sampling temperature (0-1) |
Supported Formats
| Format | Extensions |
|---|---|
| MP3 | .mp3 |
| MP4 | .mp4, .m4a |
| WAV | .wav |
| WebM | .webm |
| FLAC | .flac |
| OGG | .ogg |
File Size Limit: Maximum file size is 25 MB. For larger files, split them into segments.
Supported Models
| Model | Provider | Languages | Notes |
|---|---|---|---|
whisper-1 | OpenAI | 50+ | Best accuracy |
whisper-large-v3 | Groq | 50+ | Fast inference |
Example Request
curl https://api.uniterouter.ai/v1/audio/transcriptions \
-H "Authorization: Bearer $UNITEROUTER_API_KEY" \
-F file="@audio.mp3" \
-F model="whisper-1"from openai import OpenAI
client = OpenAI(
base_url="https://api.uniterouter.ai/v1",
api_key="your_api_key",
)
with open("audio.mp3", "rb") as audio_file:
response = client.audio.transcriptions.create(
model="whisper-1",
file=audio_file
)
print(response.text)import OpenAI from "openai";
import fs from "fs";
const client = new OpenAI({
baseURL: "https://api.uniterouter.ai/v1",
apiKey: process.env.UNITEROUTER_API_KEY,
});
const response = await client.audio.transcriptions.create({
model: "whisper-1",
file: fs.createReadStream("audio.mp3"),
});
console.log(response.text);Response
JSON Format (default)
{
"text": "Hello, this is a sample transcription of the audio file."
}Verbose JSON Format
{
"task": "transcribe",
"language": "english",
"duration": 12.5,
"text": "Hello, this is a sample transcription.",
"segments": [
{
"id": 0,
"start": 0.0,
"end": 2.5,
"text": "Hello,"
}
]
}Language Support
Whisper supports 50+ languages. Specify language for better accuracy:
response = client.audio.transcriptions.create(
model="whisper-1",
file=audio_file,
language="en" # English
)Common language codes: en, zh, ja, ko, es, fr, de
How is this guide?
Images POST
DALL-E API - Generate images from text prompts through UniterRouter. Access DALL-E 3, Stable Diffusion, Midjourney-style image generation with unified API.
Models GET
List LLM Models API - Discover 200+ available AI models including GPT-4, Claude, Gemini, DeepSeek. Get model capabilities, pricing, and context limits through UniterRouter.