Kimi Code
Configure Kimi Code (CLI, web and desktop) to use Inferway as an OpenAI provider.
Use Inferway as a custom provider in Kimi Code. Your account must have model access enabled before connecting.
Current Inferway catalog
No verification record exists for minimax/minimax-m3.1-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, 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
Add the Inferway provider
Merge this into ~/.kimi-code/config.toml, the one file shared by the Kimi Code CLI, kimi web and the desktop app.
default_model = "minimax/minimax-m3.1-flash" [providers.inferway] type = "openai" base_url = "https://api.inferway.ai/v1" api_key_env = "INFERWAY_API_KEY" [models."minimax/minimax-m3.1-flash"] provider = "inferway" model = "minimax/minimax-m3.1-flash" max_context_size = 1048576 display_name = "minimax/minimax-m3.1-flash" capabilities = ["thinking", "image_in", "tool_use"] support_efforts = ["high"] default_effort = "high" off_effort = "none"
Where the key is read from, and thinking
Kimi Code reads the key from the environment variable named by api_key_env: export INFERWAY_API_KEY in the shell you start kimi from. Exporting the variable alone is not enough — without api_key_env pointing at that variable name the config is never read.
off_effort = "none" cannot be omitted: when you turn thinking off, the client has to send "none" as the effort. Without the field the client falls back to another effort level once the conversation already contains thinking text.
On the wire the requests carry reasoning_effort: "high" and the replies return reasoning_content, captured on the 2026-09-25 run against the model below.
Start Kimi Code
Run kimi inside your project directory. For a one-shot run pass the prompt with -p; --output-format stream-json streams structured events. -p cannot be combined with --auto.
kimi # one-shot, non-interactive; -p cannot be combined with --auto: kimi -p 'Reply with exactly: connected' --output-format stream-json
Confirm the connection
- Start a fresh conversation with the configured provider and model. Ask: "Reply with exactly: connected". Confirm that text arrives without an API error.
- Open Console → Requests to see the request status and token usage.
- For coding tasks, ask the client to read a non-sensitive file. Review any proposed edits before applying them.
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.
Verification status
There is no verification record for this model in this client: the recipe below is a configuration reference, not a tested integration for that model.
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.