All skills
Skillintermediate

/audio/transcriptions

import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem';

Claude Code Knowledge Pack7/10/2026

Overview

/audio/transcriptions

Overview

FeatureSupportedNotes
Cost TrackingWorks with all supported models
LoggingWorks across all integrations
End-user Tracking
FallbacksWorks between supported models
LoadbalancingWorks between supported models
GuardrailsApplies to output transcribed text (non-streaming only)
Supported Providersopenai, azure, vertex_ai, gemini, deepgram, groq, fireworks_ai, ovhcloud, mistral

Quick Start

LiteLLM Python SDK

from litellm import transcription

# set api keys 
os.environ["OPENAI_API_KEY"] = ""
audio_file = open("/path/to/audio.mp3", "rb")

response = transcription(model="whisper", file=audio_file)

print(f"response: {response}")

LiteLLM Proxy

Add model to config

model_list:
- model_name: whisper
  litellm_params:
    model: whisper-1
    api_key: os.environ/OPENAI_API_KEY
  model_info:
    mode: audio_transcription
    
general_settings:
  master_key: sk-1234
model_list:
- model_name: whisper
  litellm_params:
    model: whisper-1
    api_key: os.environ/OPENAI_API_KEY
  model_info:
    mode: audio_transcription
- model_name: whisper
  litellm_params:
    model: azure/azure-whisper
    api_version: 2024-02-15-preview
    api_base: os.environ/AZURE_EUROPE_API_BASE
    api_key: os.environ/AZURE_EUROPE_API_KEY
  model_info:
    mode: audio_transcription

general_settings:
  master_key: sk-1234

Start proxy

litellm --config /path/to/config.yaml 

# RUNNING on http://0.0.0.0:8000

Test

curl --location 'http://0.0.0.0:8000/v1/audio/transcriptions' \\
--header 'Authorization: Bearer sk-1234' \\
--form 'file=@"/Users/krrishdholakia/Downloads/gettysburg.wav"' \\
--form 'model="whisper"'
from openai import OpenAI
client = openai.OpenAI(
    api_key="sk-1234",
    base_url="http://0.0.0.0:8000"
)

audio_file = open("speech.mp3", "rb")
transcript = client.audio.transcriptions.create(
  model="whisper",
  file=audio_file
)

Supported Providers


Fallbacks

You can configure fallbacks for audio transcription to automatically retry with different models if the primary model fails.

curl --location 'http://0.0.0.0:4000/v1/audio/transcriptions' \\
--header 'Authorization: Bearer sk-1234' \\
--form 'file=@"gettysburg.wav"' \\
--form 'model="groq/whisper-large-v3"' \\
--form 'fallbacks[]="openai/whisper-1"'
from openai import OpenAI
client = OpenAI(
    api_key="sk-1234",
    base_url="http://0.0.0.0:4000"
)

audio_file = open("gettysburg.wav", "rb")
transcript = client.audio.transcriptions.create(
    model="groq/whisper-large-v3",
    file=audio_file,
    extra_body={
        "fallbacks": ["openai/whisper-1"]
    }
)

Testing Fallbacks

You can test your fallback configuration using mock_testing_fallbacks=true to simulate failures:

curl --location 'http://0.0.0.0:4000/v1/audio/transcriptions' \\
--header 'Authorization: Bearer sk-1234' \\
--form 'file=@"gettysburg.wav"' \\
--form 'model="groq/whisper-large-v3"' \\
--form 'fallbacks[]="openai/whisper-1"' \\
--form 'mock_testing_fallbacks=true'
from openai import OpenAI
client = OpenAI(
    api_key="sk-1234",
    base_url="http://0.0.0.0:4000"
)

audio_file = open("gettysburg.wav", "rb")
transcript = client.audio.transcriptions.create(
    model="groq/whisper-large-v3",
    file=audio_file,
    extra_body={
        "fallbacks": ["openai/whisper-1"],
        "mock_testing_fallbacks": True
    }
)