IntegrationsПодключение
Connect Claude Code, Codex, OpenCode, Kimi Code and other tools to ARCMUX: one copied configuration gives the tool every model your account can call.Подключите Claude Code, Codex, OpenCode, Kimi Code и другие инструменты к ARCMUX: одна скопированная настройка открывает инструменту все модели вашего аккаунта.
Before you startПеред началом
Paste your API key: it goes into every example below. The key stays on this page and is never sent or saved. By default the examples carry the key itself; switch to the environment variable if you prefer to keep it out of the files.Вставьте API-ключ: он подставится во все примеры ниже. Ключ остаётся только на этой странице, никуда не отправляется и не сохраняется. По умолчанию ключ вписан прямо в конфиги; если не хотите хранить его в файлах, переключитесь на переменную окружения.
Save the key in the ARCMUX_KEY variable: on Linux and macOS add this line to your shell profile, on Windows run it once and open a new terminal.Сохраните ключ в переменной ARCMUX_KEY: в Linux и macOS добавьте эту строку в профиль оболочки, в Windows выполните команду один раз и откройте новый терминал.
export ARCMUX_KEY='YOUR_ARCMUX_KEY'
The examples list every model your account can call over each tool's API and start on the most expensive one. When new models appear, copy the configuration again.В примерах перечислены все модели, доступные вашему аккаунту через API инструмента; стартовая — самая дорогая из них. Когда появятся новые модели, скопируйте настройки заново.
Pick your system and tool below and copy the configuration. If your tool is not listed, use the API settings at the end of the page.Выберите систему и инструмент ниже и скопируйте настройки. Если вашего инструмента нет в списке, возьмите параметры API в конце страницы.
GuidesИнструкции
Codex CLI
ResponsesCodex CLI uses the Responses API. Save this to the file named above the example (create it if it does not exist), then run codex: /model lists every ARCMUX model available over Responses, loaded from model_catalog_url.Codex CLI работает через Responses API. Сохраните это в файл, указанный над примером (создайте его, если его нет), и запустите codex: в /model появятся все модели ARCMUX с Responses API — Codex загружает их по model_catalog_url.
model = "<model-id>" model_provider = "arcmux" [model_providers.arcmux] name = "ARCMUX" base_url = "https://api.arcmux.net/v1" wire_api = "responses" model_catalog_url = "https://api.arcmux.net/v1/models" experimental_bearer_token = "YOUR_ARCMUX_KEY"
Claude Code
MessagesClaude Code uses the Messages API. Save this to the file named above the example (or merge it into the one you have), then run claude; it needs Claude Code 2.1.288 or later. /model lists every ARCMUX model, and the Opus, Sonnet and Haiku roles point to ARCMUX models of the same family, or to the default model.Claude Code работает через Messages API. Сохраните это в файл, указанный над примером (или добавьте в существующий), и запустите claude; нужен Claude Code 2.1.288 или новее. В /model будут все модели ARCMUX, а роли Opus, Sonnet и Haiku ведут на модели ARCMUX того же семейства или на модель по умолчанию.
apiKeyHelper reads the key from ARCMUX_KEY. If ANTHROPIC_API_KEY or ANTHROPIC_AUTH_TOKEN is set in your environment, unset it: Claude Code prefers those.Ключ берёт apiKeyHelper из ARCMUX_KEY. Если в окружении заданы ANTHROPIC_API_KEY или ANTHROPIC_AUTH_TOKEN, уберите их: Claude Code берёт их в первую очередь.
{
"env": {
"ANTHROPIC_BASE_URL": "https://api.arcmux.net",
"ANTHROPIC_AUTH_TOKEN": "YOUR_ARCMUX_KEY",
"ANTHROPIC_MODEL": "<model-id>",
"ANTHROPIC_DEFAULT_OPUS_MODEL": "<model-id>",
"ANTHROPIC_DEFAULT_SONNET_MODEL": "<model-id>",
"ANTHROPIC_DEFAULT_HAIKU_MODEL": "<model-id>",
"ANTHROPIC_DEFAULT_FABLE_MODEL": "<model-id>"
},
"modelPicker": {
"replaceBuiltInOptions": true,
"options": [
{ "model": "<model-id>" }
]
}
}OpenCode
ResponsesOpenCode connects GPT models through the Responses API, Claude models through the Anthropic API and models such as DeepSeek, GLM and Kimi through Chat Completions, so the example has a provider for each. Save it to the file named above the example or as opencode.json in your project folder, then run opencode and switch models with /models.OpenCode подключает модели GPT через Responses API, модели Claude — через Anthropic API, а такие модели, как DeepSeek, GLM и Kimi, — через Chat Completions, поэтому в примере по провайдеру на каждый. Сохраните его в файл, указанный над примером, или как opencode.json в папке проекта, запустите opencode и переключайте модели командой /models.
{
"$schema": "https://opencode.ai/config.json",
"model": "arcmux/<model-id>",
"provider": {
"arcmux": {
"npm": "@ai-sdk/openai",
"name": "ARCMUX",
"options": {
"baseURL": "https://api.arcmux.net/v1",
"apiKey": "YOUR_ARCMUX_KEY"
},
"models": {
"<model-id>": {
"name": "<model-id>",
"limit": { "context": 128000, "output": 128000 },
"modalities": {
"input": ["text"],
"output": ["text"]
}
}
}
}
}
}- options sets the default reasoning effort; variants are the levels OpenCode switches between with ctrl+t.options задаёт уровень рассуждений по умолчанию, variants — уровни, между которыми OpenCode переключается по ctrl+t.
- modalities with image lets you attach images; limit sets the context and reply size.modalities с image разрешает прикладывать картинки, limit задаёт размер контекста и ответа.
- For Claude models the key is repeated in the Authorization header: the Anthropic SDK sends it as x-api-key, and when both headers are present ARCMUX uses the Bearer key.Для моделей Claude ключ повторяется в заголовке Authorization: Anthropic SDK шлёт его в x-api-key, а когда есть оба заголовка, ARCMUX использует ключ из Bearer.
- ARCMUX does not report model capabilities yet. For models such as DeepSeek, GLM and Kimi the example declares images, reasoning levels and the reply limit as their providers publish them; for the rest they follow the model family (Claude, GPT, others). If your model lacks one of them, remove it from the config.ARCMUX пока не сообщает возможности моделей. Для таких моделей, как DeepSeek, GLM и Kimi, картинки, уровни рассуждений и лимит ответа в примере указаны так, как их публикуют провайдеры; для остальных они заданы по семейству модели (Claude, GPT, остальные). Если ваша модель чего-то не умеет, уберите это из конфига.
Kimi Code
ResponsesKimi Code connects GPT models through the Responses API, Claude models through the Anthropic API and models such as DeepSeek, GLM and Kimi through Chat Completions. Add the example to the file named above it, then switch models with /model.Kimi Code подключает модели GPT через Responses API, модели Claude — через Anthropic API, а такие модели, как DeepSeek, GLM и Kimi, — через Chat Completions. Добавьте пример в файл, указанный над ним, и переключайте модели командой /model.
For Claude models the key stays in custom_headers: Kimi Code cannot take a Bearer token from the environment.Для моделей Claude ключ остаётся в custom_headers: Kimi Code не умеет брать Bearer-токен из окружения.
default_model = "arcmux/<model-id>" [providers.arcmux] type = "openai_responses" base_url = "https://api.arcmux.net/v1" api_key = "YOUR_ARCMUX_KEY" [models."arcmux/<model-id>"] provider = "arcmux" model = "<model-id>" max_context_size = 128000 capabilities = [ "tool_use" ]
- capabilities turns on reasoning (thinking), tools (tool_use) and images (image_in); support_efforts lists the reasoning levels and default_effort picks the default one.capabilities включает рассуждения (thinking), инструменты (tool_use) и картинки (image_in), support_efforts перечисляет уровни рассуждений, default_effort выбирает уровень по умолчанию.
- default_model picks the model Kimi Code starts on; if your file already has a default_model, keep only one.default_model задаёт модель, с которой открывается Kimi Code; если в файле уже есть default_model, оставьте только один.
- For Claude models the key is also in custom_headers: over the Anthropic API Kimi Code sends it as x-api-key, and when both headers are present ARCMUX uses the Bearer key.Для моделей Claude ключ указан ещё и в custom_headers: через Anthropic API Kimi Code шлёт его в x-api-key, а когда есть оба заголовка, ARCMUX использует ключ из Bearer.
- ARCMUX does not report model capabilities yet. For models such as DeepSeek, GLM and Kimi the example declares images, reasoning levels and the reply limit as their providers publish them; for the rest they follow the model family (Claude, GPT, others). If your model lacks one of them, remove it from the config.ARCMUX пока не сообщает возможности моделей. Для таких моделей, как DeepSeek, GLM и Kimi, картинки, уровни рассуждений и лимит ответа в примере указаны так, как их публикуют провайдеры; для остальных они заданы по семейству модели (Claude, GPT, остальные). Если ваша модель чего-то не умеет, уберите это из конфига.
Aider
Chat CompletionsAider uses Chat Completions through its openai/ model prefix. Save this to the file named above the example or as .aider.conf.yml in your project folder, then run aider; switch models with /model and the model ID.Aider работает через Chat Completions с префиксом модели openai/. Сохраните это в файл, указанный над примером, или как .aider.conf.yml в папке проекта и запустите aider; модель переключается командой /model с ID модели.
Aider does not know ARCMUX_KEY: put the key in OPENAI_API_KEY the same way as in step 01.Aider не знает ARCMUX_KEY: положите ключ в переменную OPENAI_API_KEY так же, как в шаге 01.
model: "openai/<model-id>" alias: - "<model-id>:openai/<model-id>" openai-api-base: https://api.arcmux.net/v1 openai-api-key: "YOUR_ARCMUX_KEY"
Cline / Roo Code / Kilo Code
Chat CompletionsIn Cline, Roo Code or Kilo Code, open the provider settings, choose OpenAI Compatible and fill in these fields.В Cline, Roo Code или Kilo Code откройте настройки провайдера, выберите OpenAI Compatible и заполните эти поля.
API Provider OpenAI Compatible Base URL https://api.arcmux.net/v1 API Key YOUR_ARCMUX_KEY Model ID <model-id>
Continue
Chat CompletionsContinue uses Chat Completions. Add the models to the file named above the example; the first one is the default.Continue работает через Chat Completions. Добавьте модели в файл, указанный над примером; первая из них — модель по умолчанию.
Continue reads ARCMUX_KEY from your environment or from the .env file in its folder.Continue берёт ARCMUX_KEY из окружения или из файла .env в своей папке.
name: ARCMUX
version: 1.0.0
schema: v1
models:
- name: "<model-id>"
provider: openai
model: "<model-id>"
apiBase: https://api.arcmux.net/v1
apiKey: "YOUR_ARCMUX_KEY"
roles: [chat, edit, apply]
capabilities: [tool_use]cURL
Chat Completions · MessagesTwo plain requests: OpenAI Chat Completions and Anthropic Messages. On Windows they are written for PowerShell.Два простых запроса: OpenAI Chat Completions и Anthropic Messages. Для Windows они написаны для PowerShell.
curl https://api.arcmux.net/v1/chat/completions \
-H 'Authorization: Bearer YOUR_ARCMUX_KEY' \
-H "Content-Type: application/json" \
-d '{
"model": "<model-id>",
"messages": [{"role": "user", "content": "Hello"}]
}'curl https://api.arcmux.net/v1/messages \
-H 'Authorization: Bearer YOUR_ARCMUX_KEY' \
-H "anthropic-version: 2023-06-01" \
-H "Content-Type: application/json" \
-d '{
"model": "<model-id>",
"max_tokens": 1024,
"messages": [{"role": "user", "content": "Hello"}]
}'OpenAI SDK (Python)
Chat CompletionsInstall the SDK with pip install openai.Установите SDK: pip install openai.
from openai import OpenAI
client = OpenAI(
base_url="https://api.arcmux.net/v1",
api_key="YOUR_ARCMUX_KEY",
)
reply = client.chat.completions.create(
model="<model-id>",
messages=[{"role": "user", "content": "Hello"}],
)
print(reply.choices[0].message.content)OpenAI SDK (JavaScript)
Chat CompletionsInstall the SDK with npm install openai.Установите SDK: npm install openai.
import OpenAI from "openai";
const client = new OpenAI({
baseURL: "https://api.arcmux.net/v1",
apiKey: "YOUR_ARCMUX_KEY",
});
const reply = await client.chat.completions.create({
model: "<model-id>",
messages: [{ role: "user", content: "Hello" }],
});
console.log(reply.choices[0].message.content);Anthropic SDK (Python)
MessagesInstall the SDK with pip install anthropic. The key goes in auth_token, which is sent as a Bearer token and works on every endpoint; api_key is sent as x-api-key and works only with Messages and the model list.Установите SDK: pip install anthropic. Ключ передаётся в auth_token и уходит как Bearer-токен, который работает на всех эндпоинтах; api_key уходит в x-api-key и подходит только для Messages и списка моделей.
from anthropic import Anthropic
client = Anthropic(
base_url="https://api.arcmux.net",
auth_token="YOUR_ARCMUX_KEY",
)
message = client.messages.create(
model="<model-id>",
max_tokens=1024,
messages=[{"role": "user", "content": "Hello"}],
)
print(message.content[0].text)Anthropic SDK (JavaScript)
MessagesInstall the SDK with npm install @anthropic-ai/sdk. The key goes in authToken; apiKey: null keeps an ANTHROPIC_API_KEY from your environment from replacing it.Установите SDK: npm install @anthropic-ai/sdk. Ключ передаётся в authToken; apiKey: null не даёт переменной ANTHROPIC_API_KEY из окружения подменить его.
import Anthropic from "@anthropic-ai/sdk";
const client = new Anthropic({
baseURL: "https://api.arcmux.net",
authToken: "YOUR_ARCMUX_KEY",
apiKey: null,
});
const message = await client.messages.create({
model: "<model-id>",
max_tokens: 1024,
messages: [{ role: "user", content: "Hello" }],
});
console.log(message.content[0].text);Your own clientСвой клиент
Send the key as a Bearer token. Anthropic Messages (/v1/messages) and the model list (/v1/models) also accept it in the x-api-key header; when both are sent, the Bearer key is used.Ключ передаётся как Bearer-токен. Anthropic Messages (/v1/messages) и список моделей (/v1/models) принимают его и в заголовке x-api-key; если отправлены оба, используется ключ из Bearer.
- OpenAI-compatible clientsOpenAI-совместимые клиенты
https://api.arcmux.net/v1- Anthropic-compatible clientsAnthropic-совместимые клиенты
https://api.arcmux.net- HeaderЗаголовок
Authorization: Bearer YOUR_ARCMUX_KEY