<p>Your client does not have ...
# ask-ai
s
<p>Your client does not have permission to get URL <code>/v1beta/models/gemini-2.5-flash :streamGenerateContent</code> from this server. <ins>That’s all we know.</ins> , Status: 403 Forbidden, Details: []., retryable=True) 095652.628 INFO livekit.agents STT metrics {"mode what the hell is going on here?
t
Thanks for reaching out, Faruk. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
You're seeing a 403 Forbidden because the request to /v1beta/models/gemini-2.5-flash:streamGenerateContent is being rejected for lack of permission. That means the request is reaching Google’s Gemini endpoint but your client credentials or project permissions are not authorized. To resolve this, please check the following: • Authentication: Do you have a valid API key or service account configured? Confirm
GOOGLE_API_KEY
or
GOOGLE_APPLICATION_CREDENTIALS
is set and points to the correct key. • API enabled: Is the Gemini (Generative Language/Vertex AI) API enabled for the Google Cloud project you’re using? • IAM roles: Does the service account or API key have appropriate IAM roles (for example
roles/aiplatform.user
or similar) for using Gemini/Vertex AI? • Billing & org policies: Is billing enabled on the project and are there any org/VPC Service Controls or policy restrictions blocking access? • Test the key directly: Try a simple curl request with your API key to confirm whether Google accepts the credential:
Copy code
curl -X POST \
  -H "Content-Type: application/json" \
  -d '{"contents":[{"parts":[{"text":"Hello"}]}]}' \
  "https://generativelanguage.googleapis.com/v1beta/models/gemini-2.5-flash:streamGenerateContent?key=YOUR_API_KEY"
If you’d like, tell me: • Which auth method you’re using (API key or service account), and • Whether you see this error for all calls or only from LiveKit agents. I can then give targeted next steps for your setup. Sources: Google Gemini LLM plugin guide | LiveKit Docs | Gemini Live API plugin | LiveKit docs | Realtime model plugins | LiveKit Docs | LiveKit
s
I am using livekit inference
t
Thanks — since you’re using LiveKit Inference, that 403 means LiveKit is rejecting the request (not Gemini directly). I’ll help narrow this down. Quick checks for you: 1. Are you generating the JWT token server-side with your LiveKit API key + secret? (You must sign tokens server-side — not in client code.) 2. Which model ID are you using exactly? (It should look like
google/gemini-2.5-flash
or
google/gemini-2.5
per LiveKit model list.) 3. Share the token’s relevant claims (redact secrets): does it include a
video
grant with
roomJoin: true
and the correct
room
name? 4. What plan is your LiveKit project on (Free / Paid)? Some Inference models require paid/eligible projects and rate limits can cause rejections. 5. Are you seeing this 403 for all inference calls or only when invoked from agents/STT? Any full error log lines (no secrets) will help. Tell me answers to 1–4 and paste the redacted token claims/log snippet; I’ll give exact next steps (token example, required grants, and model config) to fix the 403. Sources: Gemini Live API plugin | LiveKit docs | Models | LiveKit Docs | server-sdk-go | livekit/livekit_composite | DeepWiki | SIP troubleshooting guide | LiveKit docs | Authentication | LiveKit docs
s
before I ansewr that, I am getting these logs but the voice agent works
t
Thanks — good to know the voice agent still works. That helps narrow things. Please paste (redact secrets) the logs you’re seeing around the 403 and answer these quick items so I can pinpoint the cause: • Exact model ID you’re using (e.g.,
google/gemini-2.5-flash
). • Are tokens generated server-side with your LiveKit API key + secret? • The redacted token claims (JWT payload only) — hide any keys/secrets. • Your LiveKit plan (Free or Paid). • Does the 403 happen only for specific calls (e.g., text LLM calls) while voice/STT calls succeed? With those details I’ll tell you exactly what to change (token grants, model config, or plan/quotas) to remove the 403.