Claude Code
Prepare a Claude Code environment for Inferway.
Claude Code speaks the Anthropic Messages API, which Inferway serves at /v1/messages. Redirect it with the environment variables below: a settings file's env block does not reach the client before it authenticates.
Current Inferway catalog
No verification record exists for z-ai/glm-5.3-flash-uncensored 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, create a key under Console → API Keys. Use a dedicated key for this client; a project's monthly budget caps what it can spend. 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='z-ai/glm-5.3-flash-uncensored' export CLAUDE_CODE_MAX_CONTEXT_TOKENS=1048576 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.
Frequently asked questions
Why does the env block in settings files not take effect? If the env block in your settings file does not take effect, the most reliable approach is to export ANTHROPIC_BASE_URL and ANTHROPIC_AUTH_TOKEN in the terminal before starting claude (see the Environment variables section above).
How do I switch back to the default provider? In the terminal where you set the variables, run unset ANTHROPIC_BASE_URL ANTHROPIC_AUTH_TOKEN ANTHROPIC_MODEL CLAUDE_CODE_MAX_CONTEXT_TOKENS (and unset CLAUDE_CODE_DISABLE_THINKING if you exported it), or open a new terminal window to restore standard settings. A leftover ANTHROPIC_MODEL makes Claude Code ask the default provider for an Inferway model ID, and a leftover CLAUDE_CODE_MAX_CONTEXT_TOKENS makes it size the context window for the wrong model.
What is the status of tool calling and streaming? Unverified. Inferway's /v1/messages endpoint supports SSE streaming and client-defined tool calls at the protocol layer (app/anthropic_compat/constants.py), but end-to-end tool execution and streaming in Claude Code have no published production verification receipt in this repository and remain marked unverified pending promotion.
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.
Available Text Models & Pricing
All models below can be called directly in your client by specifying the model ID. Rates are the prices published for your market; data retention differs by model, see the Data Retention column.
Loading prices
| Model Name | Model ID | Context Window | Data Retention | Input Price | Output Price | Typical Session Cost |
|---|---|---|---|---|---|---|
| DeepSeek V4.1 Flash 1017 | deepseek/deepseek-v4.1-flash-1017 | 1,048,576 | Third-party provider; its retention terms apply | — | — | — |
| DeepSeek V4.1 Flash 1017 ZDR | deepseek/deepseek-v4.1-flash-1017-zdr | 1,000,000 | Provider states zero data retention | — | — | — |
| DeepSeek V4.1 Flash Uncensored | deepseek/deepseek-v4.1-uncensored | 1,048,576 | Third-party provider; its retention terms apply | — | — | — |
| MiniMax M3.1 Flash | minimax/minimax-m3.1-flash | 1,048,576 | Third-party provider; its retention terms apply | — | — | — |
| Kimi K3.1 Pro | moonshotai/kimi-k3.1-pro | 1,048,576 | Third-party provider; its retention terms apply | — | — | — |
| MiMo-V2.6 Flash | xiaomi/mimo-v2.6-flash | 393,216 | Provider states zero data retention | — | — | — |
| GLM-5.3 | z-ai/glm-5.3 | 1,000,000 | Third-party provider; its retention terms apply | — | — | — |
| GLM-5.3 Flash Uncensored | z-ai/glm-5.3-flash-uncensored | 1,048,576 | Third-party provider; its retention terms apply | — | — | — |
| GLM-5.3 Uncensored | z-ai/glm-5.3-uncensored | 1,048,576 | Third-party provider; its retention terms apply | — | — | — |
Typical Coding Session Cost Example
Note: This example assumes a typical multi-turn coding session with 50,000 input tokens and 2,000 output tokens (input covers codebase context and turn history; output covers generated code edits and replies). Token counts are illustrative constants; unit prices are the rates published for your market (in that market's currency), and the total cost is calculated dynamically at render time. Actual charges depend on verified usage recorded in the console.