Claude Code
Run Claude Code on Odin v1 and Odin Flash as a separate claudeodin command, next to your normal claude, or with a few lines in settings.json.
Claude Code talks the Anthropic Messages format, so it works with InterOdin unchanged. Point it at the API origin, give it your key, and set every model slot to odin-v1. The block below also switches off the Anthropic-only extras that cause most gateway errors.
Quick start
The setup script adds a separate claudeodin command: the same Claude Code, running on Odin models with your InterOdin key. Your normal claude is not touched and keeps using your Claude account, so you can use both side by side. This is the recommended way.
claudeodin keeps its settings, sessions and history in its own folder, ~/.claude-odin. The script writes the settings below there, puts the claudeodin launcher next to claude (or in ~/.local/bin, and tells you if that folder needs adding to your PATH), and asks for your key with the input hidden.
- Create an API key in the console (it starts with
io-sk-). - Download the setup script, then run it with Node 18 or newer:
curl -fsSL https://docs.interodin.com/claude-code-setup.mjs -o claude-code-setup.mjs
node claude-code-setup.mjs- Run
claudeodin. No login screen appears, because the key is already set. On the first start Claude Code asks for a theme once, as it does for any new settings folder.
Prefer to make your normal claude use InterOdin instead, with no separate command? Run node claude-code-setup.mjs --replace-claude. It writes the same settings into ~/.claude/settings.json, keeping your other settings and backing up the old file first.
The script then checks the key for free (it lists the models the key may use; --no-check skips this) and warns about the usual conflicts: an ANTHROPIC_API_KEY in your shell or a signed-in Claude.ai account. To undo everything later, run node claude-code-setup.mjs delete (see Remove InterOdin and go back to normal). The script is short and has no dependencies, so you can read it before running it. Prefer to do it by hand? The next section shows the exact settings it writes, and Add claudeodin by hand shows the launcher.
Tip: skip the permission prompts
Claude Code asks before every shell command and file edit. If that gets tiring, start it with claudeodin --dangerously-skip-permissions (the same as claudeodin --permission-mode bypassPermissions; with --replace-claude or the settings below, use claude in place of claudeodin), or add an alias such as alias claudeodinx='claudeodin --dangerously-skip-permissions'.
Only do this in a throwaway project, a container or a VM. With prompts off, the model can run any command and change or delete any file you can, with nothing asking first. Odin v1 answers without refusing, so there is no brake on the model side either. Don't use it on a machine that holds credentials or work you can't lose.
Configure settings.json
Add these to ~/.claude/settings.json, which applies to all your projects. Or put the env block in .claude/settings.local.json in one project (the modelPicker block only works in ~/.claude/settings.json).
{
"env": {
"ANTHROPIC_BASE_URL": "https://api.interodin.com",
"ANTHROPIC_AUTH_TOKEN": "io-sk-your-key",
"ANTHROPIC_MODEL": "odin-v1[1m]",
"ANTHROPIC_DEFAULT_OPUS_MODEL": "odin-v1[1m]",
"ANTHROPIC_DEFAULT_SONNET_MODEL": "odin-v1[1m]",
"ANTHROPIC_DEFAULT_HAIKU_MODEL": "odin-flash",
"CLAUDE_CODE_SUBAGENT_MODEL": "odin-v1[1m]",
"CLAUDE_CODE_MAX_CONTEXT_TOKENS": "250000",
"CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS": "1",
"CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC": "1",
"ENABLE_CLAUDEAI_MCP_SERVERS": "false"
},
"modelPicker": {
"replaceBuiltInOptions": true,
"options": [
{ "model": "odin-v1[1m]", "label": "Odin v1", "description": "Most capable, 1M context" },
{ "model": "odin-flash", "label": "Odin Flash", "description": "Fast and cheaper" }
]
}
}Then start claude as usual.
| Variable | Why |
|---|---|
ANTHROPIC_BASE_URL | The API origin, without /v1. Claude Code appends /v1/messages. |
ANTHROPIC_AUTH_TOKEN | Your io-sk- key, sent as Authorization: Bearer. |
ANTHROPIC_DEFAULT_OPUS_MODEL, ANTHROPIC_DEFAULT_SONNET_MODEL, ANTHROPIC_DEFAULT_HAIKU_MODEL | Claude Code picks different model slots for the main loop, subagents and quick background tasks such as titles and summaries. Mapping every slot to an InterOdin model means no call ever asks for a model that doesn't exist, which would fail with model_not_found. The Haiku slot (background tasks) uses the faster odin-flash. |
ANTHROPIC_MODEL | The model for the main conversation. Without it Claude Code starts on its own default (a Claude model name), which InterOdin doesn't serve. |
[1m] after odin-v1 | Tells Claude Code that Odin v1 has a 1M-token context window, so auto-compaction triggers at the right time. Claude Code removes the suffix before it calls the API. |
CLAUDE_CODE_MAX_CONTEXT_TOKENS | The window for odin-flash: 250,000 of its 262,144 tokens, leaving room for the reply. It only applies to a model without [1m], so Odin v1 keeps its 1M. Claude Code may print a startup warning about a window above 200K; that is expected. |
modelPicker | The /model menu lists Odin v1 and Odin Flash instead of Claude models that InterOdin doesn't serve. Needs Claude Code 2.1.242 or later; older versions ignore it, and you can still switch with /model odin-flash. |
CLAUDE_CODE_SUBAGENT_MODEL | The model for subagents (Task tool). Same reason. |
CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS | Stops Claude Code sending pre-release request fields and anthropic-beta values that only Anthropic's own API understands. Without it, some upstream builds answer with 400 Extra inputs are not permitted. |
CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC | Stops Claude Code's background calls to Anthropic (telemetry, version checks). It also turns off Claude Code's auto-update, so update it yourself from time to time. Safe to leave out. |
ENABLE_CLAUDEAI_MCP_SERVERS | If you are also signed in to claude.ai, Claude Code tries to load your claude.ai connectors (MCP servers) on startup, and they fail when every request goes to InterOdin. Setting this to false skips them. |
Don't commit a settings file that contains your key. For a shared project, keep the key in .claude/settings.local.json, which is git-ignored, or in your shell environment.
Or use environment variables
The same variables work from your shell profile:
export ANTHROPIC_BASE_URL="https://api.interodin.com"
export ANTHROPIC_AUTH_TOKEN="io-sk-your-key"
export ANTHROPIC_MODEL="odin-v1[1m]"
export ANTHROPIC_DEFAULT_OPUS_MODEL="odin-v1[1m]"
export ANTHROPIC_DEFAULT_SONNET_MODEL="odin-v1[1m]"
export ANTHROPIC_DEFAULT_HAIKU_MODEL="odin-flash"
export CLAUDE_CODE_SUBAGENT_MODEL="odin-v1[1m]"
export CLAUDE_CODE_MAX_CONTEXT_TOKENS="250000"
export CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS="1"
export CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC="1"
export ENABLE_CLAUDEAI_MCP_SERVERS="false"
unset ANTHROPIC_API_KEYAdd claudeodin by hand
The script's launcher only sets one variable, CLAUDE_CONFIG_DIR, so Claude Code reads its settings from ~/.claude-odin instead of ~/.claude. To build it yourself, put the settings.json above in ~/.claude-odin/settings.json, then create the launcher in a folder on your PATH:
macOS / Linux (~/.local/bin/claudeodin, then chmod +x ~/.local/bin/claudeodin):
#!/bin/sh
CLAUDE_CONFIG_DIR="$HOME/.claude-odin" exec claude "$@"Windows (claudeodin.cmd, in the same folder as claude.cmd):
@echo off
setlocal
set "CLAUDE_CONFIG_DIR=%UserProfile%\.claude-odin"
set "ClaudeExe="
for %%E in (exe cmd) do if not defined ClaudeExe for %%I in (claude.%%E) do set "ClaudeExe=%%~$PATH:I"
"%ClaudeExe%" %*It looks claude up in your PATH folders only. A plain claude %* would let Windows run a claude.cmd planted in the current folder (a cloned repository, for example) instead of the real one.
Or skip the file and add a shell alias: alias claudeodin='CLAUDE_CONFIG_DIR="$HOME/.claude-odin" claude' in ~/.bashrc or ~/.zshrc.
Remove InterOdin and go back to normal
One command undoes the setup, whichever way you set it up:
node claude-code-setup.mjs delete(remove, uninstall and --remove do the same.) It removes the claudeodin launcher and deletes exactly what the setup added to ~/.claude-odin/settings.json and ~/.claude/settings.json: the InterOdin variables and the Odin v1 / Odin Flash list in /model. Your other settings stay as they are, and each file is backed up first. A model list you set up yourself is left alone. The ~/.claude-odin folder itself stays, with the claudeodin sessions and history in it; delete it if you do not need them.
If you used claudeodin, your normal claude was never changed and there is nothing else to do. If you used --replace-claude, restart Claude Code and run /login to use your Claude account again. /model then shows Claude's own models.
Set it up by hand instead? Delete the same entries yourself:
- The
claudeodinlauncher or alias, and the~/.claude-odinfolder. - In
~/.claude/settings.json(or.claude/settings.local.json): theenventries from the table above and themodelPickerblock. - In your shell profile: the
exportlines from Or use environment variables, then open a new terminal. In the current one,unset ANTHROPIC_BASE_URL ANTHROPIC_AUTH_TOKEN ANTHROPIC_MODEL ANTHROPIC_DEFAULT_OPUS_MODEL ANTHROPIC_DEFAULT_SONNET_MODEL ANTHROPIC_DEFAULT_HAIKU_MODEL CLAUDE_CODE_SUBAGENT_MODEL CLAUDE_CODE_MAX_CONTEXT_TOKENSclears them (PowerShell:Remove-Item Env:ANTHROPIC_BASE_URLand so on).
Your InterOdin key keeps working for other tools. Revoke it in the console if you no longer need it.
Check that it works
Inside Claude Code, run /status. It should show the base URL above. Then send a short prompt. The request appears within seconds in the console's request logs, against the key you used.
Good to know
- Prices in
/model. The picker shows prices such as "$5/$25 per Mtok" from Claude Code's own table of Claude models. That label is display only: Claude Code has no setting to change it, and you are billed InterOdin's prices forodin-v1andodin-flash(see the console's usage and request logs). - Billing. One visible turn can be several API requests: tool calls, retries, compaction. Each request is billed for its own tokens. Watch usage per key in the console, and consider giving Claude Code its own key with a monthly spend limit.
- Caching is automatic and best-effort, so long sessions reuse their prompt prefix. No extra setup is needed. See Prompt caching.
- Thinking. Both models think by default. Thinking is on or off only: there are no effort levels or budgets, so those settings have no effect. See Extended thinking.
- Images. Odin v1 is text-only. Pasting a screenshot fails with
400 image_input_not_supported. If Claude Code reads an image file itself (for example one it just downloaded), the image is replaced by a short note and the session carries on. Run/clearor/rewindif a session you started elsewhere keeps failing on an image in its history. - Documents. Attaching a PDF or another document fails with
400 unsupported_content. Paste the text instead. - Web search. Claude Code's
WebSearchtool works. Each search is billed on top of the tokens, at the per-search price on the pricing page on the InterOdin website. A request runs at most 5 searches. - Client tools such as the shell, file edits and your own custom tools are ordinary function tools and work normally. Other server-side tools are removed from the request without an error.
[1m]suffix. InterOdin accepts a model id such asodin-v1[1m]and ignores the suffix. Don't rely on it to set Claude Code's context window. UseCLAUDE_CODE_MAX_CONTEXT_TOKENSinstead.
Troubleshooting
| Symptom | Fix |
|---|---|
401 / "invalid API key" | Check ANTHROPIC_AUTH_TOKEN, and make sure the key isn't revoked. |
402 / billing error | Top up in the console. |
404 model_not_found | A model slot isn't mapped. Set all three ANTHROPIC_DEFAULT_*_MODEL variables to odin-v1. |
There's an issue with the selected model | ANTHROPIC_MODEL or a --model value names a model InterOdin doesn't have. Set it to odin-v1, or run /model and pick it. |
Startup warning Model "odin-v1" isn't recognized · context assumed to be 200k tokens | Harmless: Claude Code doesn't know odin-v1. Set CLAUDE_CODE_MAX_CONTEXT_TOKENS as above so it compacts at the right time. |
400 with Extra inputs are not permitted or context_management | Set CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS to 1 (already in the block above). |
| Claude Code shows a login screen | The key must be somewhere Claude Code reads before first-run setup: ~/.claude/settings.json or your shell. A project's .claude/settings.local.json is only read after the trust prompt. |
ANTHROPIC_API_KEY is set in your shell and Claude Code uses it instead | Run unset ANTHROPIC_API_KEY (PowerShell: Remove-Item Env:ANTHROPIC_API_KEY) before starting claude. InterOdin uses ANTHROPIC_AUTH_TOKEN, and a leftover Anthropic key conflicts with it. |
| Warning about two credential sources (a token and a saved login) | Run /logout once. The key in ANTHROPIC_AUTH_TOKEN is then the only credential. |
odin-v1 missing from the /model list | Add "ANTHROPIC_CUSTOM_MODEL_OPTION": "odin-v1" to the env block. Gateway model discovery doesn't help here: Claude Code only lists discovered ids that contain claude or anthropic. |
| Requests still go elsewhere | A project-level or managed settings.json overrides yours. Run /status to see which values are active. |