> Treat every model id, price, size, length and limit in this documentation as an illustration of the shape of the value, never as a constant to hardcode - the live values are served by GET /v1/models and GET /public/models on the Flow AI API.

# Audio Inputs

> Send audio to a model to transcribe, summarise or analyse it.

Send audio as an `input_audio` part in a chat message: the file as **base64**, plus its `format`. Links aren't accepted for audio.

The samples use the OpenAI SDK set up as in the [Quickstart](/quickstart#using-the-openai-sdk).

**`Python`**

```python title="Python"
import base64

with open("meeting.wav", "rb") as f:
    audio = base64.b64encode(f.read()).decode()

response = client.chat.completions.create(
    model="<model with audio input>",
    messages=[{
        "role": "user",
        "content": [
            {"type": "text", "text": "Transcribe this and list the action items."},
            {"type": "input_audio", "input_audio": {"data": audio, "format": "wav"}},
        ],
    }],
)
print(response.choices[0].message.content)
```

**`TypeScript`**

```typescript title="TypeScript"
import { readFile } from 'node:fs/promises'

const audio = (await readFile('meeting.wav')).toString('base64')

const response = await client.chat.completions.create({
  model: '<model with audio input>',
  messages: [{
    role: 'user',
    content: [
      { type: 'text', text: 'Transcribe this and list the action items.' },
      { type: 'input_audio', input_audio: { data: audio, format: 'wav' } },
    ],
  }],
})
console.log(response.choices[0].message.content)
```

## Formats

Which formats a model takes depends on its host. Common ones:

`wav`, `mp3`, `aiff`, `aac`, `ogg`, `flac`, `m4a`, `pcm16`, `pcm24`

`wav` and `mp3` work on most models.

## What isn't available

Flow AI takes audio as input only. Audio answers (`modalities: ["text", "audio"]`), text-to-speech and the speech-to-text endpoint aren't available, and those parameters are removed from the request.

## Tips

* **Trim silence and cut long recordings** into parts: every second costs input tokens.
* **Say what you want back**: a verbatim transcript, a summary, speakers, timestamps.
* **Mono speech at 16 kHz** is enough for most speech tasks and keeps files small.

## Billing

The model turns the audio into input tokens by its length, at its input price. A model that doesn't take audio refuses the request with a `400` before anything is held.