Connect Codex, Claude CLI or an API client

Select models and connect a personal tool to the gateway.

Personal API keys use direct routing by default: Router One does not send prompt text through IAM.Secure or masking. To enable those blocks, open Уровень защиты, select IAM.Secure + маскирование, and affirm the warning. A model name, client header, or JSON field cannot enable protection. Selecting Без IAM.Secure immediately synchronizes every account key back to direct routing.

Click path

  1. Open Подключения → Установка в 1 клик and select OS and Claude CLI, Codex CLI or Codex Desktop.
  2. Click Скопировать, review the generated command and run the live account’s command on your computer.
  3. Follow the launcher/restart instruction shown for that tool.
  4. Run curl -sS http://127.0.0.1:4141/healthz in the terminal to inspect the local process.
  5. Send a short tool request, then click Проверить маршрут. This reads server-side account request counts; it is not a browser probe of your loopback port.
  6. For your own client, select Доступ по API, create a key, retain its one-time full value and copy the appropriate endpoint.
Illustrative example: Доступ по API
Illustrative example: Доступ по API
Illustrative data. Available controls depend on your edition and permissions.
  1. Доступ по API
  2. macOS
  3. Codex CLI
  4. Проверить маршрут

Verify and recover

Check local health, tool response and server usage independently. Direct API use needs no local bridge. OpenAI/DeepSeek and Anthropic routes differ. A zero request count requires a first request; inspect local health on the computer and check the key for 401. Capture preparation performed no installation, payment or live model request.

In the normal direct mode, a completed server audit records secure_disabled, classify_ms=0, and the route action. 503 masking_unavailable is expected only after the user explicitly enables IAM.Secure + маскирование. If protection was not enabled, refresh the console, select Без IAM.Secure, and retry with the same key.

Claude Desktop through IAM.Router Desktop Service on macOS

This path requires installed Claude Desktop, IAM.Router Desktop Service and your valid IAM.Router.One key. Configure your own computer; account administrator privileges are not required.

  1. Open IAM.Router Desktop Service and its macOS menu-bar menu.
  2. Select Настройки… and the IAM.Router.One provider. The Endpoint fills automatically; for a normal connection, do not replace it with the local gateway address.
  3. Click Получить ключ. If sign-in is requested, log in to IAM.Router.One with your own account and return to settings. Click Сохранить.
  4. Enable the Claude Desktop switch in the service menu. The service creates its own Claude profile and opens Desktop through the local gateway. Switching on or off restarts Desktop; wait for any current request to finish first.
  5. Verify that Claude uses IAM.Router.One, shows your selected model and completes a short request. Local health alone does not prove a model response.

Configuration may need attention

If Details says Ignoring local configuration value "claudeCodeSettings", update IAM.Router Desktop Service to 0.1.12 or later using a trusted installer. Wait for the current request to finish, then turn the Claude Desktop switch off and on again in the service menu. Version 0.1.12 cleans the unsupported field from its own profile and restore snapshot, then restarts Claude. The warning disappeared in the verified real interface after updating; clicking Dismiss does not repair the configuration.

claudeCodeSettings belongs to another Claude client and the hosted control plane; Claude Desktop never reads it from a local profile. Do not add it manually. IAM passes early DeepSeek compaction through the application environment: an 85% threshold and a separate /compact output budget of up to 8192 tokens. Native token counting checks each request against the selected model’s actual window; oversized text history is summarized in parts. An empty, truncated or repetitive summary produces an explicit error. The original transcript on disk is not rewritten.

If a warning remains, reopen Details: a different error requires separate diagnosis. For 401, check the key using Получить ключ; for a missing model response, check the selected model and route. Never publish keys or user history with diagnostic information.

IAM.Router Desktop Service 0.1.14 automatically negotiates HTTP/2 with the public IAM API, reuses its connection and sends protocol PING every 10 seconds while waiting and between requests. No text, tokens or heartbeat content is added to the model response. Cancelling one request preserves concurrent requests; an idle connection closes after 60 seconds. An HTTP/1-only server receives one request, without a guarantee of bypassing an external idle timeout.

Qwen in Claude Code and Codex

For qwen3.8-27b-am-ws, use IAM.Router Desktop Service 0.1.16 or later. After updating, wait for active requests to finish and reapply the connection for the required client through the service menu. In Claude Code or Codex, select this exact model ID: the selected Qwen must also remain selected after tool execution.

Claude thinking levels map to Qwen parameters as follows:

Claude levelQwen parameter
max, extra, highxhigh
mediummedium
lowlow

This mapping applies to Qwen AM-WS. When thinking is enabled, the service preserves the mode and reasoning history in continuations after tool results; you do not need to enable it again after each tool call. Response usage passes through the model’s input, output and reasoning token counts when available. Protocol PING does not count as model tokens.

To verify, send a short question with thinking enabled, then ask the client to read a synthetic file, calculate a result and write it to another synthetic file. Check the selected ID, actual output file contents and completed response usage. If another model answers instead of Qwen, an error mentions reasoning_effort: high, or a nonempty answer has zero usage, check the service version and reapply the client profile. Do not use high as the direct API effort value: Qwen expects xhigh.

Starting with 0.1.16, the Claude Desktop connection sets Qwen’s window to 262,144 tokens (256 Ki) through the native per-model auto-compaction window setting. Claude’s decimal formatter displays 262.1k, rather than 1M. After a completed response, occupied context uses the model’s native usage; the indicator rounds the numbers. Auto-compaction starts before the window fills. Other models keep their settings; disabling the integration restores the prior window unless you changed it afterward.

For an older session already showing Model context is full, update and reapply the connection, select Qwen, then run /compact. The service summarizes oversized text history in parts, checking every part with Qwen’s native tokenizer. Send a short follow-up and verify that occupied context falls. For tokenizer is unavailable, check the selected model’s availability and retry later: an estimate never authorizes generation, and original history is retained. Do not clear history just to retry.

Illustrative example: 248.6k / 262.1k (95%)
Illustrative example: 248.6k / 262.1k (95%)
Illustrative data. Available controls depend on your edition and permissions.
  1. 248.6k / 262.1k (95%)

DeepSeek: thinking, tools and token counting

For the existing GB10 model, select deepseek-v4-flash-dspark. In a new short conversation, enable thinking and ask the client to read a synthetic file and run a safe calculation with a tool. Verify a separate reasoning block, the actual tool call, its result and the final answer. Protocol <think> and </think> markers must not become ordinary answer text or tool arguments. Tag examples explicitly requested as code remain intact.

The service passes reasoning and answer channels separately and preserves repeated stream fragments. Malformed delimiter sequences return an error instead of a successful reply with corrupted history. Previously saved conversation text is not rewritten: retain the original transcript and compare it with a new short conversation after the service update.

Check nonzero usage for the completed response. Input and output counts come from the model’s native usage; reasoning tokens, when reported, are part of output usage and must not be added to it again. A visible thinking block alone does not prove correct accounting.

API clients can use POST /v1/tokenize and POST /v1/messages/count_tokens with their valid Bearer key and selected model ID. Counting uses the native tokenizer and performs no generation. /v1/tokenize returns the serving backend’s actual context window, which may be smaller than the catalog value. For tokenizer is unavailable, inspect the error details and check the tokenizer route: healthy inference does not prove that this separate path works. Do not replace native counting with an estimate or clear history just to retry.

DeepSeek Search and Fetch

Router One accepts the raw DeepSeek JSON contracts with the same Bearer key used for model requests:

  • POST /v1/tools/search — query, count, ori_question, localization, and need_content;
  • POST /v1/tools/fetch — url, pointing to a public HTTP or HTTPS resource.

The DeepSeek credential remains server-side. Search and Fetch are charged only for a useful HTTP 200: Search must contain a non-empty results array and Fetch must contain non-empty content. Empty search, errors and timeouts do not debit the wallet. Under the official DeepSeek tariff, the supplier price is $0.75 per 1,000 such successful requests; Router One converts it to RUB under the current wallet rule. X-IAM-Billing-Status and X-IAM-Charge-Micro-RUB describe the settlement of the individual request.

Fetch rejects localhost, private IPs, internal mesh/Kubernetes names, and URLs containing credentials before contacting the supplier. A 429 response is DeepSeek’s rate limit and may be retried later by the client. Router One does not automatically repeat an ambiguous transport failure because DeepSeek does not document an idempotency key for Search/Fetch.