Menu

1 / 2

"My Team Had GCP Credits. Claude Code Wanted an Anthropic Key."

DEV Community·CodeKing·6 months ago
#9pDboNbC
#tutorial#webdev#vertex#claude#code
Reading 0:00
15s threshold

I already had Google Cloud billing.

I did not want another API key, another quota surface, and another place to explain to my team why the coding tool bill was showing up somewhere else.

The annoying part was that Claude Code speaks Anthropic's Messages API, while the budget I wanted to use was sitting in Vertex AI .

So I wired the two together through a local gateway.

The mismatch

If you try to connect Claude Code to Vertex AI directly, the shapes do not line up cleanly.

Claude Code expects this kind of world:

POST /v1/messages

Anthropic headers

Anthropic content blocks

Anthropic streaming semantics

Vertex AI is a different world.

For Claude models on Vertex, the request goes to a publisher endpoint like:

.../publishers/anthropic/models/claude-sonnet-4-6:rawPredict

Enter fullscreen mode

Exit fullscreen mode

For Gemini models on Vertex, it goes to:

.../publishers/google/models/gemini-2.5-pro:generateContent

Enter fullscreen mode

Exit fullscreen mode

That meant I needed something in the…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.