AIAI Club
← Back to articles
ENGLISH GUIDE

Uploading Images or Audio/Video Returns 400 Unsupported MIME type: File Format Alignment Guide

Getting an unsupported format error when uploading images or audio? Here is a comprehensive list of multimodal file formats officially supported by Gemini (JPEG, PNG, WEBP, MP4, MP3, etc.) along with guidelines for local automated transcoding.

1. Supported vs. Unsupported Media Format Limits

Gemini's vision and audio APIs enforce strict enumerated restrictions on file formats:
- Supported images: image/png, image/jpeg, image/webp, image/heic; BMP and TIF are not supported;
- Supported audio: audio/wav, audio/mp3, audio/aac; certain proprietary encoding formats are not supported;
- Supported video: video/mp4, video/mov.

2. Practical Code Self-Check

When uploading with the Files API, always explicitly declare the standard mime_type string. Never omit it or pass application/octet-stream; otherwise the gateway will refuse to parse it.

This English translation is based on a Chinese source article. Prices are approximate where stated and conditions should be confirmed with the official provider or seller.