audio_url content type, and process both modalities together: they can transcribe speech, answer questions about audio content, or reason over a recording and a text prompt at once.
Not all models support audio. Check the table below before sending audio inputs.
Supported models
Send an audio request
Use theaudio_url content type to include audio in your messages. The request shape matches vision requests with audio_url in place of image_url.
Baseten retrieves audio URLs from the inference service, so the URL must be reachable over HTTPS from Baseten’s environment (for example your own object storage or other hosts that allow server-side fetches). Prefer stable, direct HTTPS links. Base64 data: URLs also work, but the request body is capped at 5 MB, so pass audio by URL when you can.
Send audio as WAV sampled at 16kHz. Recordings under 20 minutes give the best results.
Send a recording alongside a text prompt like this:
- Python
- JavaScript
- cURL
audio.py
Pricing
There is no additional per-request fee for audio. Audio is converted to input tokens and priced at the model’s standard input rate. Longer recordings produce more tokens and cost more to process. See the Model APIs pricing page for per-model rates.Next steps
Vision
Send images and videos alongside text
Chat Completions reference
Full request and response schema for the
audio_url content type