Skip to contentПерейти к содержимому
ARCMUX
PricingЦеныHow it worksКак это работаетFeaturesВозможностиFAQВопросы
Sign inВойтиDashboardКабинетGet API keyПолучить ключ

ARCMUX / DocsARCMUX / Документация

DocumentationДокументация

ARCMUX speaks the OpenAI and Anthropic APIs. Point the SDK or tool you already use at ARCMUX with a new base URL and key; the rest of your code stays the same.ARCMUX понимает API OpenAI и Anthropic. Направьте свой SDK или инструмент на ARCMUX: смените base URL и ключ, остальной код останется прежним.

Model endpoints open at launchЭндпоинты моделей откроются к запуску

You can already sign in and create keys. Until launch, requests to /v1/* answer 503 with Retry-After, and top-ups are not open yet. This page describes the API as it works once they open.Войти и создать ключи можно уже сейчас. До запуска запросы к /v1/* получают ответ 503 с Retry-After, а пополнение баланса пока недоступно. Ниже описано, как API работает после открытия.

On this pageНа этой странице

  1. Quick startБыстрый старт
  2. Endpoints and authenticationЭндпоинты и аутентификация
  3. Code examplesПримеры кода
  4. Models and pricingМодели и цены
  5. Billing and balanceОплата и баланс
  6. Keys and limitsКлючи и лимиты
  7. ErrorsОшибки
  8. HeadersЗаголовки
  9. SupportПоддержка

01 / Quick startБыстрый старт

  1. Sign in. Open app.arcmux.net and continue with Discord. Your account is created on first sign-in.
  2. Create a key. On the Keys page, create a key and copy it right away: the full key is shown only once.
  3. Top up. Add credits from $1. A request your balance cannot cover is refused with 402.
  4. Set the base URL. Use https://api.arcmux.net/v1 with the OpenAI SDKs and Codex CLI, or https://api.arcmux.net with the Anthropic SDK, and send your key as a Bearer token.
  1. Войдите. Откройте app.arcmux.net и войдите через Discord. Аккаунт создаётся при первом входе.
  2. Создайте ключ. На странице «Ключи» создайте ключ и сразу скопируйте его: полный ключ показывается только один раз.
  3. Пополните баланс. От 1 $. Запрос, который баланс не покрывает, отклоняется с кодом 402.
  4. Смените base URL. Укажите https://api.arcmux.net/v1 для OpenAI SDK и Codex CLI или https://api.arcmux.net для Anthropic SDK и передавайте ключ как Bearer-токен.

02 / Endpoints and authenticationЭндпоинты и аутентификация

Base URL: https://api.arcmux.net. Every inference call is a POST with a JSON body:

  • /v1/chat/completions: OpenAI Chat Completions;
  • /v1/responses: OpenAI Responses, used by Codex CLI;
  • /v1/messages: Anthropic Messages.

You can call a model through any of the three endpoints: ARCMUX converts the request to the provider’s format and the response back. A feature that cannot be carried over for that model is refused with 501. Set "stream": true to receive the response as server-sent events. GET /v1/models, with the same Authorization: Bearer <key>, returns the ids of the models you can call; each entry has context_length (in tokens) when the model has a known limit. With a client_version query parameter, as Codex sends it for model_catalog_url, the endpoint returns the Codex model catalog of the models you can call over Responses.

Authenticate every request with the header Authorization: Bearer <key>. POST /v1/messages and GET /v1/models also accept the key in the x-api-key header, where the Anthropic SDK and Claude Code put api_key; when both headers are sent, the Bearer key is used. /v1/chat/completions and /v1/responses accept only the Bearer header. The /v1/ API can be called directly from browser pages: CORS is open to any origin, authentication is the API key header only, and cookies are not used.

Base URL: https://api.arcmux.net. Все вызовы инференса выполняются методом POST с телом в JSON:

  • /v1/chat/completions: OpenAI Chat Completions;
  • /v1/responses: OpenAI Responses, его использует Codex CLI;
  • /v1/messages: Anthropic Messages.

Модель можно вызвать через любой из трёх эндпоинтов: ARCMUX переводит запрос в формат провайдера, а ответ обратно. Если какую-то возможность нельзя перенести для этой модели, запрос отклоняется с кодом 501. Чтобы получать ответ потоком server-sent events, передайте "stream": true. Запрос GET /v1/models с тем же заголовком Authorization: Bearer <ключ> возвращает идентификаторы моделей, которые можно вызывать; у каждой записи есть поле context_length (в токенах), когда у модели известен лимит. С параметром запроса client_version, который Codex добавляет для model_catalog_url, эндпоинт отдаёт каталог моделей в формате Codex — модели, доступные вам через Responses.

Каждый запрос аутентифицируется заголовком Authorization: Bearer <ключ>. POST /v1/messages и GET /v1/models принимают ключ и в заголовке x-api-key, куда Anthropic SDK и Claude Code кладут api_key; если отправлены оба заголовка, используется ключ из Bearer. /v1/chat/completions и /v1/responses принимают только Bearer. API /v1/ можно вызывать прямо из браузерных страниц: CORS открыт для любого источника, аутентификация — только заголовок с API-ключом, cookies не используются.

03 / Code examplesПримеры кода

Each example reads the key from the ARCMUX_KEY environment variable.

Во всех примерах ключ берётся из переменной окружения ARCMUX_KEY.

OpenAI SDK, PythonOpenAI SDK, Python

app.py
import os
from openai import OpenAI

client = OpenAI(base_url="https://api.arcmux.net/v1", api_key=os.environ["ARCMUX_KEY"])

reply = client.chat.completions.create(
    model="gpt-6-sol",
    messages=[{"role": "user", "content": "Summarize this incident.Кратко опиши инцидент."}],
)

OpenAI SDK, JavaScriptOpenAI SDK, JavaScript

app.ts
import OpenAI from "openai";

const client = new OpenAI({
  baseURL: "https://api.arcmux.net/v1",
  apiKey: process.env.ARCMUX_KEY,
});

const reply = await client.chat.completions.create({
  model: "gpt-6-sol",
  messages: [{ role: "user", content: "Summarize this incident.Кратко опиши инцидент." }],
});

Anthropic SDK, PythonAnthropic SDK, Python

app.py
import os
from anthropic import Anthropic

client = Anthropic(
    base_url="https://api.arcmux.net",
    auth_token=os.environ["ARCMUX_KEY"],
)

reply = client.messages.create(
    model="claude-sonnet-5-5",
    max_tokens=256,
    messages=[{"role": "user", "content": "ping"}],
)

cURLcURL

terminal
curl https://api.arcmux.net/v1/chat/completions \
  -H "Authorization: Bearer $ARCMUX_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "gpt-6-sol",
    "messages": [
      {"role": "user", "content": "Summarize this incident.Кратко опиши инцидент."}
    ]
  }'

Codex CLICodex CLI

~/.codex/config.toml
model = "gpt-6-sol"
model_provider = "arcmux"

[model_providers.arcmux]
name = "ARCMUX"
base_url = "https://api.arcmux.net/v1"
env_key = "ARCMUX_KEY"
wire_api = "responses"

04 / Models and pricingМодели и цены

ARCMUX rates next to each provider's API list price — the same prices you see in the dashboard. Per 1M tokens, in USD. You pay only for the tokens the model actually used. Send the model name exactly as it appears in the table.

Тарифы ARCMUX рядом с прайсом провайдера — те же цены, что в личном кабинете. За 1M токенов, в долларах. Вы платите только за токены, которые модель реально использовала. Передавайте название модели точно так, как оно указано в таблице.

Price per 1M tokens in USD, input and output, at provider list price and through ARCMUXЦена за 1 млн токенов в долларах США, ввод и вывод, по прайсу провайдера и через ARCMUX
ModelМодельProvider list priceПрайс провайдераARCMUX
OpenAI
gpt-6-astra$10.00 input, / $50.00 output10,00 $ ввод, / 50,00 $ вывод$0.30 input, / $1.50 output0,30 $ ввод, / 1,50 $ вывод97% off−97%
gpt-6.1-sol$2.00 input, / $10.00 output2,00 $ ввод, / 10,00 $ вывод$0.07 input, / $0.50 output0,07 $ ввод, / 0,50 $ вывод95% off−95%
gpt-6-luna$0.10 input, / $0.50 output0,10 $ ввод, / 0,50 $ вывод$0.01 input, / $0.05 output0,01 $ ввод, / 0,05 $ вывод90% off−90%
Anthropic
claude-opus-5-5$4.00 input, / $20.00 output4,00 $ ввод, / 20,00 $ вывод$0.10 input, / $0.60 output0,10 $ ввод, / 0,60 $ вывод97% off−97%
claude-sonnet-5-5$2.00 input, / $10.00 output2,00 $ ввод, / 10,00 $ вывод$0.05 input, / $0.50 output0,05 $ ввод, / 0,50 $ вывод95% off−95%
claude-haiku-5-5$0.10 input, / $0.50 output0,10 $ ввод, / 0,50 $ вывод$0.01 input, / $0.05 output0,01 $ ввод, / 0,05 $ вывод90% off−90%

Input / output per 1M tokens. Cached-token and long-context rates are on the Models page of the dashboard.Вход / выход за 1M токенов. Цены кэшированных токенов и длинного контекста — на странице «Модели» в личном кабинете.

05 / Billing and balanceОплата и баланс

ARCMUX is prepaid. You top up a balance in US dollars, from $1; payment methods are shown when you top up. The balance does not expire.

Before a request is sent to a provider, its expected cost is reserved. When the request finishes, you are charged for the input, cached and output tokens actually used, at the prices in effect when the request was accepted. A request that fails before the provider produces a billable result is not charged.

The charge history in the dashboard lists each charged request with its time, model, endpoint, key, tokens and amount.

You can request a refund of your unused remaining balance by writing to support@arcmux.net. Support reviews each request against your balance and payment records, and unused balance is refunded after support approves the request. Spent credits are not refundable. The full terms are in the Terms of Service.

ARCMUX работает по предоплате. Вы пополняете баланс в долларах США, от 1 $; способы оплаты показываются при пополнении. Срок действия баланса не ограничен.

Перед отправкой запроса провайдеру его ожидаемая стоимость резервируется. После завершения запроса списывается стоимость фактически использованных входных, кэшированных и выходных токенов по ценам, действовавшим в момент приёма запроса. Запрос, завершившийся ошибкой до того, как провайдер выдал оплачиваемый результат, не оплачивается.

В истории списаний в личном кабинете для каждого оплаченного запроса указаны время, модель, эндпоинт, ключ, токены и сумма.

Чтобы запросить возврат неиспользованного остатка баланса, напишите на support@arcmux.net. Поддержка рассматривает каждое обращение, сверяясь с данными о балансе и платежах, и неиспользованный остаток возвращается после того, как поддержка одобрит обращение. Израсходованные средства не возвращаются. Полные условия приведены в Условиях использования.

06 / Keys and limitsКлючи и лимиты

Create and revoke keys on the Keys page of the dashboard. A key starts with sk-arcmux-. The full key is shown once; we store only its hash. An account can have up to 20 active keys. Give each app or teammate its own key: the dashboard shows spend per key, and a revoked key stops working at once.

Current limits:

  • per key: 200 requests per minute, in bursts of up to 10, and up to 4 requests in progress at once;
  • per account: 200 requests per minute across all keys, and up to 8 requests in progress at once.

A request over a limit gets 429 with Retry-After. Need higher limits? Write to support.

Ключи создаются и отзываются на странице «Ключи» в личном кабинете. Ключ начинается с sk-arcmux-. Полный ключ показывается один раз, мы храним только его хеш. У аккаунта может быть до 20 активных ключей. Выдайте отдельный ключ каждому приложению и коллеге: кабинет показывает расходы по каждому ключу, а отозванный ключ сразу перестаёт работать.

Текущие лимиты:

  • на ключ: 200 запросов в минуту, всплесками до 10, и не больше 4 запросов одновременно;
  • на аккаунт: 200 запросов в минуту по всем ключам, и не больше 8 запросов одновременно.

Запрос сверх лимита получает 429 с Retry-After. Нужны лимиты выше? Напишите в поддержку.

07 / ErrorsОшибки

Errors come in the format of the endpoint you called: OpenAI style on /v1/chat/completions and /v1/responses, Anthropic style on /v1/messages. A rejected key (401, 403) gets the same short format on every endpoint.

Ошибки приходят в формате того эндпоинта, который вы вызвали: в стиле OpenAI на /v1/chat/completions и /v1/responses, в стиле Anthropic на /v1/messages. Отклонённый ключ (401, 403) на всех эндпоинтах получает один и тот же короткий формат.

400
The request is malformed: invalid JSON, no model or an invalid field.Некорректный запрос: невалидный JSON, не указана модель или неверное поле.
401
The key is missing, malformed, unknown or revoked. Comes with WWW-Authenticate: Bearer.Ключ не передан, имеет неверный формат, неизвестен или отозван. Приходит с заголовком WWW-Authenticate: Bearer.
402
Your balance cannot cover the request. Nothing is sent to a provider.Баланса не хватает, чтобы покрыть запрос. Провайдеру ничего не отправляется.
403
The account is suspended.Аккаунт заблокирован.
409
This Idempotency-Key was already used for a different request.Этот Idempotency-Key уже использовался для другого запроса.
413
The request body is too large: over 8 MiB on /v1/chat/completions and /v1/responses, over 32 MiB on /v1/messages.Тело запроса слишком большое: больше 8 МиБ на /v1/chat/completions и /v1/responses, больше 32 МиБ на /v1/messages.
429
A rate or concurrency limit was reached, or a request with the same Idempotency-Key is still in progress. Wait the number of seconds in Retry-After, then retry.Достигнут лимит частоты или числа одновременных запросов либо запрос с тем же Idempotency-Key ещё выполняется. Подождите столько секунд, сколько указано в Retry-After, и повторите.
501
The request uses a feature that this endpoint cannot carry over for the chosen model.Запрос использует возможность, которую этот эндпоинт не может перенести для выбранной модели.
502
The provider failed and no other provider could serve the request. You are not charged.Провайдер не ответил, и другой провайдер не смог обслужить запрос. Списания нет.
503
The model or the service is temporarily unavailable. Retry later; Retry-After is set when the wait is known.Модель или сервис временно недоступны. Повторите позже; если срок известен, он указан в Retry-After.
errors.http
# /v1/chat/completions, /v1/responses
HTTP/1.1 402 Payment Required
{"error": {"message": "client quota is insufficient", "type": "invalid_request_error", "code": "gateway_error"}}

# /v1/messages
HTTP/1.1 402 Payment Required
{"type": "error", "error": {"type": "invalid_request_error", "message": "client quota is insufficient"}}

# any endpoint, rejected key
HTTP/1.1 401 Unauthorized
WWW-Authenticate: Bearer
{"error": {"type": "Unauthorized", "message": "invalid or missing API key"}}

08 / HeadersЗаголовки

X-Arcmux-Request-Id
Response. Present on every response. For a model request it identifies that request in our records: include it when you ask support about a request or a charge.Ответ. Есть в каждом ответе. Для запроса к модели он указывает на этот запрос в наших записях: сообщайте его поддержке, если вопрос касается запроса или списания.
Idempotency-Key
Request, optional. Send a unique value, such as a UUID, for each logical request. A retry with the same key and the same body returns the stored result of the first attempt without a second charge. The same key with a different body gets 409; a retry while the first attempt is still running gets 429. Keys are scoped to your account and the endpoint.Запрос, необязательный. Передавайте уникальное значение, например UUID, для каждого логического запроса. Повтор с тем же ключом и тем же телом возвращает сохранённый результат первой попытки без повторного списания. Тот же ключ с другим телом получает 409, повтор, пока первая попытка ещё выполняется, получает 429. Ключ действует в пределах вашего аккаунта и эндпоинта.
Retry-After
Response. On 429 and 503: how many seconds to wait before retrying.Ответ. При 429 и 503: сколько секунд подождать перед повтором.
X-RateLimit-Remaining
Response. How many requests are left in the current rate-limit window, when known.Ответ. Сколько запросов осталось в текущем окне лимита, если это известно.
terminal
curl https://api.arcmux.net/v1/messages \
  -H "Authorization: Bearer $ARCMUX_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "claude-sonnet-5-5",
    "max_tokens": 256,
    "messages": [{"role": "user", "content": "ping"}]
  }'

09 / SupportПоддержка

Write to support@arcmux.net from the email linked to your account, or include your Discord username. For a question about a request or a charge, include its X-Arcmux-Request-Id. Never send a full API key. For volume pricing, write to sales@arcmux.net.

Пишите на support@arcmux.net с адреса почты, привязанного к аккаунту, или укажите имя пользователя Discord. Если вопрос касается запроса или списания, приложите его X-Arcmux-Request-Id. Никогда не отправляйте полный API-ключ. По ценам для больших объёмов пишите на sales@arcmux.net.

ARCMUX

Pay-as-you-go API router for GPT, Claude, Gemini and GLM models.API-роутер с оплатой по факту для моделей GPT, Claude, Gemini и GLM.

PricingЦеныHow it worksКак это работаетFeaturesВозможностиFAQВопросыDocsДокументацияPrivacyКонфиденциальностьTermsУсловияSupportПоддержкаSalesОтдел продаж

© 2026 ARCMUX