Claude Code and Vertex AI integration not working
Resolved 💬 7 comments Opened Mar 3, 2025 by varundhall Closed Mar 4, 2025
I've enabled the APIs in Google Vertex AI studio and I'm able to make the following request:
curl -X POST -H "Authorization: Bearer $(gcloud auth print-access-token)" -H "Content-Type: application/json; charset=utf-8" -d @request.json "https://us-east5-aiplatform.googleapis.com/v1/projects/<my-project-id>/locations/us-east5/publishers/anthropic/models/claude-3-7-sonnet@20250219:streamRawPredict"
and it gives back the appropriate response as per the input in request.json
I was trying to configure the Claude Code using 3rd party APIs
I have set the following env variables:
CLAUDE_CODE_USE_VERTEX=1
CLOUD_ML_REGION=us-east5
ANTHROPIC_VERTEX_PROJECT_ID=<my-project-id>
However, in Claude Code, I keep getting:Credit balance too low · Add funds: https://console.anthropic.com/settings/billing
What can I do to configure Claude Code to use the Vertex API?
Note: I'm on @anthropic-ai/claude-code@0.2.29
This issue has 7 comments on GitHub. Read the full discussion on GitHub ↗