google-gemini / google-gemini/gemini-api-quickstart

404 NOT_FOUND

Open
#20 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
CSS
Stars
493
Forks
99
PR merge metrics
No merged PRs in 30d

Description

### Description of the bug:

When calling the Gemini API (models/gemini-2.0-flash-exp-image-generation) from a server environment, a 404 NOT_FOUND error is returned. However, the same API call works successfully when executed from a local environment, generating the expected content without errors.

{
"isSuccess": false,
"error": "404 NOT_FOUND. {'error': {'code': 404, 'message': 'models\/gemini-2.0-flash-exp-image-generation is not found for API version v1beta, or is not supported for generateContent. Call ListModels to see the list of available models and their supported methods.', 'status': 'NOT_FOUND'}}"
}

### Actual vs expected behavior:

_No response_

### Any other information you'd like to share?

_No response_

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.