Guide

Use Claude Code with OpenKodo

Claude Code speaks the Anthropic Messages API. OpenKodo exposes that endpoint natively, so the setup is two environment variables and no proxy.

  1. 1

    Create an API key

    Open Console → API keys and create a key. It is shown once.
  2. 2

    Point Claude Code at OpenKodo

    shell
    export ANTHROPIC_BASE_URL="https://api.openkodo.dev"
    export ANTHROPIC_AUTH_TOKEN="ok_live_..."

    If you keep settings in ~/.claude/settings.json, put the same two values under env:

    shell
    {
      "env": {
        "ANTHROPIC_BASE_URL": "https://api.openkodo.dev",
        "ANTHROPIC_AUTH_TOKEN": "ok_live_..."
      }
    }
  3. 3

    Run it

    shell
    claude

    Claude Code sends Claude model IDs; OpenKodo maps them to the catalog. Use /model inside the session to switch, or claude --model claude-opus-5-5 to pin one.

  4. 4

    Check the meter

    Every request appears in Console → Usage with input, output, cache read, cache write and cost. The 5-hour window is the same number the API enforces.

Common failures

  • 401 — the key was pasted with a trailing space, or the variable is not exported in the shell that launched Claude Code.
  • 402 — the plan allowance or wallet is exhausted; the console shows which balance is empty.
  • 429 — the 5-hour window is full; the error names the limit.

Start with Go or Pro

Create an account with Google or GitHub, pick Go or Pro, and point your client at api.openkodo.dev. Setup takes a minute.