One model, three modalities
Gemini 2.5 Flash and Pro accept text, images, video, and audio in the same conversation. You don't switch models or endpoints — you just include the right Part type in your contents.
Two ways to attach media
- Inline bytes — base64-encode the file, send it in the request. Best for small files (≤ 20MB total request size).
- File API — upload first via
client.files.upload, then reference the resulting file URI. Required for anything large; required for video.
Files uploaded via the File API live for 48 hours. Plenty of time to make the actual generation call.
Token costs are fixed-per-shape, not character-based
- Images: ≤ 384px = 258 tokens. Larger = 258 per 768×768 tile.
- Video: ~300 tokens/second. Max 1 hour. YouTube URLs supported directly.
- Audio: 32 tokens/second. Max 9.5 hours.
Supported formats
- Image: PNG, JPEG, WEBP, HEIC.
- Video: MP4, MOV, AVI, FLV, MPG, WMV, 3GPP, WEBM.
- Audio: WAV, MP3, AIFF, AAC, OGG, FLAC.