Claude Code Setup

Connect a coding agent with one key and https://llm.kinovi.ai, then use any model in the catalog.

Claude Code · Anthropic's terminal coding agent, pointed at the Anthropic-compatible gateway.

Config file
~/.claude/settings.json
Protocol
Anthropic Messages API
Endpoint
/v1/messages

Claude Sonnet 5.5 · Anthropic. Every snippet on this page uses it.

Base URL

https://llm.kinovi.ai

Key: pasted into the config file

Setup steps

  1. Create an API key

    Create a key on the API Keys page. Keep it private; it can spend your balance.

  2. Export KINOVI_API_KEY

    Claude Code keeps the key in its config file. Export it in this shell too, so the check in the next step can use it.

    export KINOVI_API_KEY="YOUR_KINOVI_API_KEY"
  3. Check the key and model

    One request over the same protocol Claude Code uses. A JSON reply means the key, model and URL are right; a 401 means the key, a 404 the URL or model.

    Terminal
    curl https://llm.kinovi.ai/v1/messages \
      -H "Authorization: Bearer $KINOVI_API_KEY" \
      -H "anthropic-version: 2023-06-01" \
      -H "Content-Type: application/json" \
      -d '{"model":"claude-sonnet-5-5","max_tokens":16,"messages":[{"role":"user","content":"Reply with OK"}]}'
  4. Save the config file

    ~/.claude/settings.json
    {
      "env": {
        "ANTHROPIC_AUTH_TOKEN": "YOUR_KINOVI_API_KEY",
        "ANTHROPIC_BASE_URL": "https://llm.kinovi.ai",
        "ANTHROPIC_MODEL": "claude-sonnet-5-5",
        "ANTHROPIC_DEFAULT_OPUS_MODEL": "claude-sonnet-5-5",
        "ANTHROPIC_DEFAULT_SONNET_MODEL": "claude-sonnet-5-5",
        "ANTHROPIC_DEFAULT_HAIKU_MODEL": "claude-sonnet-5-5"
      }
    }

    Replace YOUR_KINOVI_API_KEY with your key before saving. To switch models later, change claude-sonnet-5-5.

  5. Run Claude Code and check Logs

    Start Claude Code and send a prompt. Each request shows up in Logs with its model, tokens and cost.

Troubleshooting

Claude Code ignores the settings file

The settings file only takes effect in new sessions. Quit Claude Code, start it again, and check that the JSON is valid.

The base URL must not end in /v1

Claude Code appends /v1/messages itself. Use the origin only, exactly as shown above.

The key is not picked up

Export KINOVI_API_KEY in the same shell that starts the agent, or reload your shell profile after adding it. Keep the variable name exactly as written.

404 or protocol errors

Check the endpoint above. Each agent speaks one protocol; a base URL with the wrong path, or one that ends in /v1 where the agent adds it itself, is the usual cause.

The model is rejected

Copy the model id from the Models page exactly, for example claude-sonnet-5-5.

No entries appear in Logs

Confirm the base URL and key, send a fresh prompt from the agent, then refresh the Logs page.

FAQ

How do I use Claude Code with Kinovi?

Create an API key, set the key in the config file, and paste the config for Claude Code. It sends requests to /v1/messages using the Anthropic Messages API.

Which models can Claude Code use through Kinovi?

Any model in the Kinovi LLM catalog. Pick one in the setup panel and the config updates with its exact id. Switch models later by changing that one value.

Is the Kinovi LLM API open yet?

Not yet. These configs show the planned setup so you can prepare your tools. The base URL and key work once the API opens.