Veo 3.1 Fast API returns 401 UNAUTHENTICATED while metadata GET returns 200

Hello Gemini API team,

We are experiencing an authentication issue with Veo 3.1 Fast.

  • Model: veo-3.1-fast-generate-preview
  • Endpoint: POST /v1beta/models/veo-3.1-fast-generate-preview:predictLongRunning
  • Response: HTTP 401, UNAUTHENTICATED
  • GET /v1beta/models?pageSize=1 returns HTTP 200.
  • Both requests use x-goog-api-key and the same HTTPS client transport.
  • Gemini API is enabled in our project.
  • Two separately authorized generation requests returned 401 without operation IDs.
  • No automatic retries were performed.
  • Our key was previously verified to have a Gemini API restriction.

Could the Gemini API team clarify why metadata authentication succeeds while Veo generation fails?

Does Veo generation require a different API key type, service-account configuration, or additional model access?

Is there a non-billable way to verify generation access before attempting another paid video request?

Thank you.

Hi @Quang_Huynh, Please try the below steps:

  • Delete the old API key and create a new key in Google AI Studio
  • If the 401 error persists, please share the exact cURL request (with your API key redacted) and the full error response.