◉ TOKNADO

Integrations / Claude Code

Claude Code + TOKNADO

How to use Claude Code with TOKNADO (via a LiteLLM gateway)

Claude Code talks to its backend using the Anthropic Messages API. Anthropic's gateway documentation says an LLM gateway must expose an Anthropic-format endpoint for Claude Code to use it. TOKNADO is an OpenAI-compatible endpoint, so the two don't connect directly.

The standard bridge is a small translation proxy. LiteLLM exposes an Anthropic-format endpoint and forwards the calls to any OpenAI-compatible backend. Put it between Claude Code and TOKNADO and you get Claude Code's interface on top of TOKNADO's pool.

Start free trial Jump to setup

What you need

Setup: Claude Code with TOKNADO

  1. Install LiteLLM's proxy

    This runs locally and translates Anthropic-format requests into OpenAI-format requests for TOKNADO.

    pip install 'litellm[proxy]'
  2. Create a LiteLLM config

    Give the model an alias that Claude Code will request, and map it to your TOKNADO model through the openai/ route.

    model_list:
      - model_name: toknado-main
        litellm_params:
          model: openai/toknado/auto
          api_base: https://toknado.up.railway.app/v1
          api_key: os.environ/TOKNADO_API_KEY
    
    general_settings:
      master_key: sk-local-change-me
  3. Start the proxy

    Keep it running in its own terminal.

    export TOKNADO_API_KEY=YOUR_TOKNADO_API_KEY
    litellm --config litellm-config.yaml --host 127.0.0.1 --port 4000
  4. Point Claude Code at the proxy

    Set the base URL to the LiteLLM address and use the master key as the token, then request your alias.

    export ANTHROPIC_BASE_URL=http://localhost:4000
    export ANTHROPIC_AUTH_TOKEN=sk-local-change-me
    claude --model toknado-main

Notes for real-world use

Troubleshooting Claude Code + TOKNADO

SymptomWhat to check
Claude Code ignores the proxyANTHROPIC_BASE_URL must be set in the same shell that launches claude.
401 from the proxyANTHROPIC_AUTH_TOKEN must equal LiteLLM's master_key.
Proxy errors reaching TOKNADOConfirm api_base and TOKNADO_API_KEY in the LiteLLM terminal, and test the endpoint with curl directly.
Model not foundThe alias passed to --model must match model_name in the LiteLLM config.
Tool calls fail or loopNot every model handles Claude Code's tool use well. Try another model from your TOKNADO pool.

FAQ

Can Claude Code connect straight to an OpenAI-compatible endpoint?

No. Claude Code needs an Anthropic Messages-compatible endpoint. A proxy such as LiteLLM translates between the two formats.

Is this an official Anthropic or TOKNADO feature?

It uses Claude Code's documented gateway support (ANTHROPIC_BASE_URL) with the open-source LiteLLM proxy. TOKNADO is not affiliated with Anthropic.

Will I get Claude models?

That depends on the models your TOKNADO pool serves. The proxy only translates the request format.

Where do I run LiteLLM?

On your own machine for personal use, or on a small server for a team. Keep the master key private.

Point Claude Code at TOKNADO

One OpenAI-compatible endpoint, a managed model pool behind it, and usage you can see in the Storm Console. 3-day trial, up to 250 requests per rolling hour.

Start free trial See pricing Setup guide

Hourly limits apply over the previous 60 minutes. Service is best effort; upstream availability can reduce throughput.

More tools that work with TOKNADO