> ## Documentation Index
> Fetch the complete documentation index at: https://docs.baseten.co/llms.txt
> Use this file to discover all available pages before exploring further.

# Audio

> Send audio recordings alongside text prompts to audio-capable models on Model APIs

Model APIs support audio input on audio-capable models. These models accept audio alongside text in the same request, using the `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

| Model   | Slug                       |
| ------- | -------------------------- |
| Inkling | `thinkingmachines/inkling` |

## Send an audio request

Use the `audio_url` content type to include audio in your messages. The request shape matches [vision requests](/inference/model-apis/vision) 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:

<Tabs>
  <Tab title="Python">
    ```python audio.py theme={"system"}
    from openai import OpenAI
    import os

    client = OpenAI(
        base_url="https://inference.baseten.co/v1",
        api_key=os.environ["BASETEN_API_KEY"],
    )

    response = client.chat.completions.create(
        model="thinkingmachines/inkling",
        messages=[
            {
                "role": "user",
                "content": [
                    {
                        "type": "text",
                        "text": "Summarize what is said in this recording.",
                    },
                    {
                        "type": "audio_url",
                        "audio_url": {
                            "url": "https://huggingface.co/datasets/Xenova/transformers.js-docs/resolve/main/jfk.wav",
                        },
                    },
                ],
            }
        ],
    )

    print(response.choices[0].message.content)
    ```
  </Tab>

  <Tab title="JavaScript">
    ```javascript audio.js theme={"system"}
    import OpenAI from "openai";

    const client = new OpenAI({
        baseURL: "https://inference.baseten.co/v1",
        apiKey: process.env.BASETEN_API_KEY,
    });

    const response = await client.chat.completions.create({
        model: "thinkingmachines/inkling",
        messages: [
            {
                role: "user",
                content: [
                    {
                        type: "text",
                        text: "Summarize what is said in this recording.",
                    },
                    {
                        type: "audio_url",
                        audio_url: {
                            url: "https://huggingface.co/datasets/Xenova/transformers.js-docs/resolve/main/jfk.wav",
                        },
                    },
                ],
            },
        ],
    });

    console.log(response.choices[0].message.content);
    ```
  </Tab>

  <Tab title="cURL">
    ```bash Request theme={"system"}
    curl https://inference.baseten.co/v1/chat/completions \
      -H "Content-Type: application/json" \
      -H "Authorization: Bearer $BASETEN_API_KEY" \
      -d '{
        "model": "thinkingmachines/inkling",
        "messages": [
          {
            "role": "user",
            "content": [
              {
                "type": "text",
                "text": "Summarize what is said in this recording."
              },
              {
                "type": "audio_url",
                "audio_url": {
                  "url": "https://huggingface.co/datasets/Xenova/transformers.js-docs/resolve/main/jfk.wav"
                }
              }
            ]
          }
        ]
      }'
    ```
  </Tab>
</Tabs>

## 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](https://www.baseten.co/pricing) for per-model rates.

## Next steps

<CardGroup cols={2}>
  <Card title="Vision" icon="image" href="/inference/model-apis/vision">
    Send images and videos alongside text
  </Card>

  <Card title="Chat Completions reference" icon="code" href="/reference/inference-api/chat-completions">
    Full request and response schema for the `audio_url` content type
  </Card>
</CardGroup>
