404 NOT_FOUND

Open
#20 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
25/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Stale
Tech stack
python
Domain
api, backend

Research direction

Start by comparing the server and local environments and the Gemini API request for models/gemini-2.0-flash-exp-image-generation. Use the error's suggested ListModels check to determine whether the model is available for v1beta and generateContent in each environment; done means the server request works or the environment-specific limitation is documented.

Written by the indexing model from the issue text.

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

Dominant language
CSS
Stars
493
Forks
99
PR merge metrics
No merged PRs in 30d

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from google-gemini/gemini-api-quickstart

All issues in google-gemini/gemini-api-quickstart

Similar issues

More Backend & API Design issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.