Skip to content

Gemini returns "API Error 400" when providing an image (png, jpeg) from disk #995

Description

@mtremsal

Describe the bug

Gemini returns a 400 error when providing an image from disk.

Image

This is consistent with various image types:

Error 400, Message: Unsupported MIME type: png, Status: INVALID_ARGUMENT, Details: []
Error 400, Message: Unsupported MIME type: jpeg, Status: INVALID_ARGUMENT, Details: []

Setup

Please complete the following information along with version numbers, if applicable.

  • macos Sonoma 14.5
  • fish 3.7.1
  • ghostty 968b9d536 (up-to-date) and reproduced on macos Terminal Version 2.14 (453)
  • Gemini 2.5 Pro (via API)

To Reproduce

Steps to reproduce the behavior:

  1. Select Gemini 2.5 Pro
  2. Drag and drop image from disk
  3. Enter any prompt
  4. See error

I've confirmed that this works as expected with OpenAI GPT-5 via OpenRouter, so it appears to be a Gemini-only issue.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions