> [!WARNING]
> **Preview** : Using the Firebase AI Logic SDKs with the Gemini Live API is a feature that's in Preview, which means that it isn't subject to any SLA or deprecation policy and could change in backwards-incompatible ways.

<br />

This page describes various limits and specifications for using the
Live API and its models.

## General specifications and limits

- **Supported input and output** :
  (for details, see [media formats](https://firebase.google.com/docs/ai-logic/live-api/limits-and-specs.md.txt#media-formats) below)

  - Input: text, images (not PDFs), audio, video
  - Output: text (transcription) and audio (streaming)
- **Supported tools** : function calling, Grounding with Google Search,
  Grounding with Google Maps

- **Knowledge cutoff date**: January 2025

The Live API does ***not*** support generating structured output (like JSON)
or the Count Tokens API.

## Session-related limits

For the Live API, a *session* refers to a persistent connection where input
and output are streamed continuously over a connection.

If the session exceeds ***any*** of the following limits, the connection is
terminated. Note, though, the Live API provides some options (see below) to
handle these session-related limits.

- **Session context window** is limited to 128k tokens.

  Due to this context window limit, here are the approximate maximum session
  lengths based on input modalities:
  - Audio-only input sessions are limited to 15 minutes.
  - Video + audio input are limited to 2 minutes.
- **Connection length** is limited to about 10 minutes.

  You'll receive a
  [*going away* notification](https://firebase.google.com/docs/ai-logic/live-api/sessions.md.txt#going-away-notification)
  about 60 seconds before the connection ends.

Here are some options for handling session-related limits:

- [Compress the session context window](https://firebase.google.com/docs/ai-logic/live-api/sessions.md.txt#compress-context)
  so that the server automatically maintains the context size within the limit.

- [Resume a session](https://firebase.google.com/docs/ai-logic/live-api/sessions.md.txt#resume-session)
  to prevent losing conversation context during brief network disconnects or
  after receiving a *going away* notification.

Learn more about
[managing sessions](https://firebase.google.com/docs/ai-logic/live-api/sessions.md.txt).

## Rate limits

The Live API has rate limits for both concurrent sessions per
Firebase project as well as tokens per minute (TPM).

- **Gemini Developer API**:

  - Limits vary based on your project's Gemini Developer API "usage tier" (see their [rate limits documentation](https://ai.google.dev/gemini-api/docs/rate-limits))
- **Agent Platform Gemini API (formerly Vertex AI)**:

  - 1,000 concurrent sessions per Firebase project
  - 4M tokens per minute

## Media formats

The Live API supports the following types of media:

- **Input**: images, audio, video
- **Output**: audio

### Image formats

The Live API supports the following for image input:

- **Maximum images per prompt**: 3,000

- **Maximum file size per file (inline data)**: 7 MB

- **Supported MIME types** :
  `image/png`, `image/jpeg`, `image/webp`, `image/heic`, `image/heif`

### Audio formats

The Live API supports the following audio formats:

- **Input audio format:** Raw 16 bit PCM audio at 16kHz little-endian
- **Output audio format:** Raw 16 bit PCM audio at 24kHz little-endian

- **Supported MIME types** : `audio/x-aac`, `audio/flac`, `audio/mp3`,
  `audio/m4a`, `audio/mpeg`, `audio/mpga`, `audio/mp4`, `audio/ogg`,
  `audio/pcm`, `audio/wav`, `audio/webm`

To convey the sample rate of input audio, set the MIME type of each
audio-containing Blob to a value like `audio/pcm;rate=16000`.

### Video formats

The Live API expects a sequence of discrete image frames and supports video
frames input at 1 frame per second (FPS).

- **Recommended input**: native 768x768 resolution at 1 FPS.

- **Supported MIME types** : `video/x-flv`, `video/quicktime`, `video/mpeg`,
  `video/mpegs`, `video/mpg`, `video/mp4`, `video/webm`, `video/wmv`, `video/3gpp`

Note that this specification makes the Live API unsuitable for use cases
that require analyzing fast-changing video, such as play-by-play in high-speed
sports.

## Response voices

The Live API supports 30 different synthisized HD voices, each with
distinct characteristics. You can
[view a list of response voice options and hear demos of each voice](https://firebase.google.com/docs/ai-logic/live-api/limits-and-specs.md.txt#response-voices-list)
by expanding the section below.

If you don't specify a response voice, the default is `Puck`.

Learn how to
[specify the response voice](https://firebase.google.com/docs/ai-logic/live-api/configuration.md.txt#specify-response-voice).

<br />

**View a list of response voice options and hear demos**

<br />

| Voice name | Description | Gender | Demo |
|---|---|---|---|
| `Achernar` | Soft | Female | Your browser doesn't support the audio element. |
| `Achird` | Friendly | Male | Your browser doesn't support the audio element. |
| `Algenib` | Gravelly | Male | Your browser doesn't support the audio element. |
| `Algieba` | Smooth | Male | Your browser doesn't support the audio element. |
| `Alnilam` | Firm | Male | Your browser doesn't support the audio element. |
| `Aoede` | Breezy | Female | Your browser doesn't support the audio element. |
| `Autonoe` | Bright | Female | Your browser doesn't support the audio element. |
| `Callirrhoe` | Easy-going | Female | Your browser doesn't support the audio element. |
| `Charon` | Informative | Male | Your browser doesn't support the audio element. |
| `Despina` | Smooth | Female | Your browser doesn't support the audio element. |
| `Enceladus` | Breathy | Male | Your browser doesn't support the audio element. |
| `Erinome` | Clear | Female | Your browser doesn't support the audio element. |
| `Fenrir` | Excitable | Male | Your browser doesn't support the audio element. |
| `Gacrux` | Mature | Female | Your browser doesn't support the audio element. |
| `Iapetus` | Clear | Male | Your browser doesn't support the audio element. |
| `Kore` | Firm | Female | Your browser doesn't support the audio element. |
| `Laomedeia` | Upbeat | Female | Your browser doesn't support the audio element. |
| `Leda` | Youthful | Female | Your browser doesn't support the audio element. |
| `Orus` | Firm | Male | Your browser doesn't support the audio element. |
| `Puck` | Upbeat | Male | Your browser doesn't support the audio element. |
| `Pulcherrima` | Forward | Female | Your browser doesn't support the audio element. |
| `Rasalgethi` | Informative | Male | Your browser doesn't support the audio element. |
| `Sadachbia` | Lively | Male | Your browser doesn't support the audio element. |
| `Sadaltager` | Knowledgeable | Male | Your browser doesn't support the audio element. |
| `Schedar` | Even | Male | Your browser doesn't support the audio element. |
| `Sulafat` | Warm | Female | Your browser doesn't support the audio element. |
| `Umbriel` | Easy-going | Male | Your browser doesn't support the audio element. |
| `Vindemiatrix` | Gentle | Female | Your browser doesn't support the audio element. |
| `Zephyr` | Bright | Female | Your browser doesn't support the audio element. |
| `Zubenelgenubi` | Casual | Male | Your browser doesn't support the audio element. |

<br />

<br />

## Languages

The Live API supports the following languages.
Learn how to
[influence the response language](https://firebase.google.com/docs/ai-logic/live-api/configuration.md.txt#influence-response-language).

##### Languages supported by all audio-generating models

| Language | BCP-47 Code | Language | BCP-47 Code |
|---|---|---|---|
| Arabic (Egyptian) | ar-EG | German (Germany) | de-DE |
| English (US) | en-US | Spanish (US) | es-US |
| French (France) | fr-FR | Hindi (India) | hi-IN |
| Indonesian (Indonesia) | id-ID | Italian (Italy) | it-IT |
| Japanese (Japan) | ja-JP | Korean (Korea) | ko-KR |
| Portuguese (Brazil) | pt-BR | Russian (Russia) | ru-RU |
| Dutch (Netherlands) | nl-NL | Polish (Poland) | pl-PL |
| Thai (Thailand) | th-TH | Turkish (Turkey) | tr-TR |
| Vietnamese (Vietnam) | vi-VN | Romanian (Romania) | ro-RO |
| Ukrainian (Ukraine) | uk-UA | Bengali (Bangladesh) | bn-BD |
| English (India) | en-IN \& hi-IN bundle | Marathi (India) | mr-IN |
| Tamil (India) | ta-IN | Telugu (India) | te-IN |

##### Additional languages supported by audio-generating 3.x models

| Language | BCP-47 Code | Language | BCP-47 Code |
|---|---|---|---|
| Afrikaans | af | Filipino | fil |
| Albanian | sq | Finnish | fi |
| Amharic | am | Galician | gl |
| Armenian | hy | Georgian | ka |
| Azerbaijani | az | Greek | el |
| Basque | eu | Gujarati | gu |
| Belarusian | be | Haitian Creole | ht |
| Bulgarian | bg | Hebrew | he |
| Burmese | my | Hungarian | hu |
| Catalan | ca | Icelandic | is |
| Cebuano | ceb | Javanese | jv |
| Chinese, Mandarin | cmn | Kannada | kn |
| Croatian | hr | Konkani | kok |
| Czech | cs | Lao | lo |
| Danish | da | Latin | la |
| Estonian | et | Latvian | lv |
| Lithuanian | lt | Luxembourgish | lb |
| Macedonian | mk | Maithili | mai |
| Malagasy | mg | Malay | ms |
| Malayalam | ml | Mongolian | mn |
| Nepali | ne | Norwegian, Bokmål | nb |
| Norwegian, Nynorsk | nn | Odia | or |
| Pashto | ps | Persian | fa |
| Punjabi | pa | Serbian | sr |
| Sindhi | sd | Sinhala | si |
| Slovak | sk | Slovenian | sl |
| Swahili | sw | Swedish | sv |
| Urdu | ur |   |   |