UniterRouter
API ReferenceOpenAI Compatible

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/transcriptions

Request

This endpoint accepts multipart/form-data with the following fields:

FieldTypeRequiredDescription
filefileYesThe audio file to transcribe
modelstringYesModel ID (e.g., whisper-1)
languagestringNoLanguage code (ISO 639-1)
promptstringNoOptional context to guide transcription
response_formatstringNojson, text, srt, vtt, verbose_json
temperaturenumberNoSampling temperature (0-1)

Supported Formats

FormatExtensions
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

ModelProviderLanguagesNotes
whisper-1OpenAI50+Best accuracy
whisper-large-v3Groq50+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?