VanaAPI

← Writing

Notes from one Claude Code endpoint

Agents at the terminalEN2026-10-26

Claude Code normally connects to a hosted model service using its standard API settings. A custom endpoint changes only the destination: Claude Code still provides the terminal experience, while another service receives the request and returns the model response.

Vana API gives you one endpoint for this arrangement. It is available at https://api.vanaapi.com and supports the Anthropic Messages protocol used by Claude Code. The same service also supports OpenAI-compatible requests and Gemini's native protocol, but you do not need to understand those interfaces for this setup.

§ Before you begin

Create a Vana API account and add credit or another available payment method. Vana API bills real tokens used by your requests and does not require a monthly fee. Your account dashboard provides an API key. Treat that key like a password: keep it out of source control, screenshots, and shared shell history.

You also need Claude Code installed and working locally. First run it with your normal configuration if you have one. This gives you a useful baseline before changing the endpoint.

§ Point Claude Code at Vana API

Claude Code reads environment variables for a custom Anthropic-compatible service. In a macOS or Linux terminal, set the endpoint and authentication token for the current shell session:

 1  export ANTHROPIC_BASE_URL=https://api.vanaapi.com
 2  export ANTHROPIC_AUTH_TOKEN=your_vana_api_key

Replace your_vana_api_key with the key from Vana API. Keep the URL exactly as shown unless the Vana API dashboard gives your account a different base URL. Claude Code will build the Messages API request beneath that base URL.

On Windows PowerShell, the equivalent commands are:

$env:ANTHROPIC_BASE_URL="https://api.vanaapi.com"

$env:ANTHROPIC_AUTH_TOKEN="your_vana_api_key"

These settings last only for the current terminal session. That is useful for testing because closing the terminal removes them. Once the connection works, you can place them in your shell profile or use a local environment manager. A profile is convenient, but it also means the key is loaded whenever that shell starts, so use the approach that matches your machine's security needs.

§ Start a small session

With the variables set, start Claude Code from the same terminal. Ask it to inspect a small, non-sensitive project and perform a simple read-only task, such as summarizing the directory structure. This first request confirms three separate things: Claude Code can reach the endpoint, the API key is accepted, and the returned model response is usable.

If you want to choose a model, use a model name supported by your Vana API account and Claude Code's model setting. For example, Claude Sonnet 5.5 is a reasonable starting point for general coding work. The important detail is that the model selection and the endpoint are separate settings: the endpoint controls where the request goes, while the model controls which available model handles it.

§ Check the common failure points

  • Authentication error: confirm that the key is complete, active, and assigned to ANTHROPIC_AUTH_TOKEN. Remove accidental quotation marks or spaces copied from a password manager.
  • Connection error: check the base URL and your network connection. Do not add an extra path unless the service documentation specifically requires it.
  • Unexpected billing: inspect the request and token usage in your Vana API account. Long prompts, large files, and repeated sessions consume more tokens.
  • Old settings still apply: print the environment variables in the same terminal where you launch Claude Code. A separate terminal may not have inherited them.

Once the test works, use the same environment variables whenever you want Claude Code to send requests through Vana API. You can keep the setup limited to one project by using a project-specific environment file, provided that file is excluded from version control.

This arrangement is useful when you want one account and one endpoint for several development tools while keeping usage-based billing. Vana API can also relay other available models, including Gemini 3.1 Pro, through its supported protocols, but Claude Code only needs the Anthropic-compatible configuration described here.

Create an account at Vana API, generate an API key, and begin with one small Claude Code session before making the configuration permanent.