Claude Code
Prepare a Claude Code environment for Inferway.
Claude Code speaks the Anthropic Messages API, which Inferway serves at /v1/messages. The live service still refuses current Claude Code requests; support ships with the next service update. Redirect it with the environment variables below: a settings file's env block does not reach the client before it authenticates.
Current Inferway catalog
inferway/mimo-v2.6-flash393,216131,072No verification record exists for inferway/mimo-v2.6-flash in this client; the configuration below is a reference.
Before you start
Install the named client using its official instructions. Pi here means the pi-mono coding agent; Hermes means Nous Research's Hermes Agent.
Once your Inferway account is activated, get an API key from Console → API keys. Use a dedicated key for this client and review its model access and spending limits. Both live and test prefixes use the same inference and billing path; test is an environment label, not a free or simulated inference mode.
Use an Inferway key for Inferway's endpoint. An OpenRouter key belongs to OpenRouter and cannot authenticate to this address.
Keep the key in the client's credential store or your local environment. Do not paste it into a prompt, screenshot, or committed configuration. These examples use bash/zsh on macOS or Linux.
Make the key available to this terminal
The prompt below hides your input and keeps the key out of shell history. Start the client from this same terminal; a separately opened app may not inherit this variable.
printf 'Inferway API key: ' IFS= read -r -s INFERWAY_API_KEY printf '\n' export INFERWAY_API_KEY
Point Claude Code at Inferway
Export these variables in the terminal you start Claude Code from. ANTHROPIC_BASE_URL is the origin without /v1: the client appends /v1/messages itself. ANTHROPIC_AUTH_TOKEN sends the Inferway key as a bearer token; the key stays in the environment and never enters a file.
Use the environment rather than a settings file. An env block inside a settings file does not redirect the endpoint before the session authenticates, so the client still contacts Anthropic and reports an invalid bearer token — a failure that looks like a bad key but is a wrong address.
This model ID is not in Claude Code's built-in catalog, so the client warns and assumes a smaller context window. CLAUDE_CODE_MAX_CONTEXT_TOKENS states the published window for this model.
export ANTHROPIC_BASE_URL='https://api.inferway.ai' export ANTHROPIC_AUTH_TOKEN="$INFERWAY_API_KEY" export ANTHROPIC_MODEL='inferway/mimo-v2.6-flash' export CLAUDE_CODE_MAX_CONTEXT_TOKENS=393216 claude
Thinking
Claude Code asks for thinking by default, and Inferway turns the model's thinking on for those requests: answers take longer and reasoning tokens are billed. To keep thinking off, also export CLAUDE_CODE_DISABLE_THINKING=1 before starting claude.
Verify the connection
Send a short message, then test one read-only tool. Console → Requests shows whether the request was recorded.
Cost and usage
Actual consumption is recorded by Inferway: open Console → Requests to see each request's status and token usage, and Console → Usage for totals. Numbers a client shows locally are its own estimates, not billing amounts; rely on the Console.
If a request fails
Authentication: check that an API key is present, active, and allowed to use the model. Reopen the client from the terminal containing the variable. Never print the full key when debugging.
Wrong endpoint or model: check for a duplicate /v1, use the exact published model ID, and confirm the client is using Chat Completions. A request to /responses or /completions cannot be repaired by changing the key.
Limits or timeout: check wallet balance and key limits, respect Retry-After, and reduce the prompt or output budget. Keep streaming enabled for long outputs. Avoid repeated agent retries while diagnosing.
When contacting support, share the client version, model ID, timestamp, and request ID if available. Redact credentials and source code.