We are diagnosing a Gemini API request for a development project using synthetic data only.
A metadata request to GET /v1beta/models succeeds with HTTP 200 and returns a complete model list. The returned resources include:
models/gemini-2.5-flash
with supportedGenerationMethods including:
generateContent
However, a request to:
POST /v1beta/models/gemini-2.5-flash:generateContent
consistently receives:
HTTP 404
Google JSON error code 404
canonical status NOT_FOUND
The request uses x-goog-api-key authentication and Content-Type: application/json.
We have independently verified that the generated URL exactly matches the documented route and the resource returned by the Models API.
Could you clarify:
- What resource or operation can produce
NOT_FOUNDin this situation when the same credential can list the model and the model advertisesgenerateContent? - Are there project-, billing-tier-, region-, model-access-, or API-version-specific conditions that can make
models.listexpose a model whilegenerateContentfor that model returnsNOT_FOUND? - Is
x-goog-api-keysupported equivalently to the documented API-key authentication for thisv1beta generateContentroute? - Is there any account/project-side setting we should verify?
We do not want to provide the API key or raw request dumps. If you need additional non-sensitive fields to identify the issue, please specify exactly which fields are required.