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 welcome credit is spent or the plan allowance is exhausted; the console shows which window is empty.
  • 429 — the 5-hour window or the per-model cap is full; the error names the limit.

Try it with $10 of usage

Create an account with Google or GitHub, get $10 of welcome usage, and point your client at api.openkodo.dev. No card required.