When the Gemini API returns models/<id> is not found for API version v1beta, or is not supported for generateContent, the name in the request URL is not one that version and method serve: a retired or misspelled id, an embedding model pointed at generateContent, or a feature that lives on a different API version. The request is well formed, so the key is not the issue; the string is. List the models, copy an id exactly, and call again. At https://api.uplinkswitch.com/v1 the catalog lists every servable id, and gemini-4-argon answers generateContent on the gateway's /v1beta path.
What it means, per Google's docs
The troubleshooting page for the Gemini API files this under checking you have the right model and the right API version. Its guidance is direct: confirm the model id against the list the API actually serves, and remember that newer or preview capabilities are exposed on the /v1beta surface rather than the stable one, so a method or model you reach on one version may not exist on the other. Google reports it with status NOT_FOUND, HTTP 404, and the message names the two possible causes; the model listing tells you which one applies. "is not found for API version v1beta" means the id is unknown on that version. "is not supported for generateContent" means the id exists but does not answer that method, which is the classic symptom of handing an embedding-only model to a text-generation call.
Because this is a 404 on the resource name, nothing about the credential will change it. A revoked key returns an authentication failure, and a key barred from a model returns a permission error; only a name that matches no servable model on that version and method returns this 404. So the fix is always to correct the string, never to rotate the key.
What the gateway changes
On the gateway the same failure is a 404 with the stable code model_not_found, and the list to reconcile against is one you can fetch. GET /v1/catalog enumerates every id the gateway serves, with no credential required, and GET /v1beta/models exists for the Gemini-shaped listing. Per the gateway's OpenAPI, a 404 is not retried and not failed over, because a name that matches nothing cannot be improved by trying another route; the request simply returns, and nothing is billed for it. As with every error here, the response carries a request id in its headers for support.
Pick an id the gateway reports as healthy. Each catalog row carries an availability field; pick an id that reads ok when you look, since the flags move with the hosts. As this page was built, gemini-4-argon read ok. Each row carries an endpoints list, so you can confirm that the id you choose actually lists the /v1beta/models/{model}:generateContent route before you wire it in.
A note on versions. The gateway serves Gemini-format calls on /v1beta, the same version the Gemini SDK targets by default, so a call that failed on the id against Google will fail the same way here until the name is corrected, and will succeed here once it names a servable id. Keep the base at https://api.uplinkswitch.com/v1 and let the SDK supply /v1beta.
How to fix it
- Confirm the status really is 404 on the model name and not 401 or 403. A 404 on
models/<id>is a naming problem; the other two point at the key or its permissions. - Print the exact
modelvalue your code sends, resolved after any config or environment layer, not the literal you think it is. Watch for a straymodels/prefix doubled by the SDK, a version suffix, or a provider namespace copied from a multi-provider router. - Fetch the list. On the gateway,
GET /v1/catalogreturns every servable id without a key, andGET /v1beta/modelsreturns the Gemini-shaped list. Copy an id verbatim. - Match the method to the model. If the message says "is not supported for generateContent", the id is real but answers another method; an embedding model, for instance, belongs on an embedding call, not
generateContent. - Choose a healthy id. Use one whose
availabilityreadsok, such asgemini-4-argon, and skip any that reads degraded or down. - Re-run. With the name corrected and the base at
https://api.uplinkswitch.com/v1, the 404 clears.
If you also run the Anthropic SDK and hit a 404 there, the pattern is the same but the error shape differs; see the Anthropic SDK 404 page for that side.