Skip to contentК содержанию
LLMcode
ModelsМоделиPricingЦеныInstructionsИнструкцииDocsДокументацияNewsНовости
ENRU
EnglishРусский
Sign inВойтиCreate accountСоздать аккаунтAccountАккаунт
MenuМеню
ModelsМоделиPricingЦеныInstructionsИнструкцииDocsДокументацияNewsНовостиCreate accountСоздать аккаунт
LLMcode

Model names in the API are LLMcode profiles with their own routing. They do not mean direct access to the same-named models of OpenAI LLC or Anthropic PBC. Trademarks belong to their owners. The service is independent and is not affiliated with OpenAI or Anthropic.Названия моделей в API — профили LLMcode с собственной маршрутизацией. Они не означают прямой доступ к одноимённым моделям OpenAI LLC или Anthropic PBC. Товарные знаки принадлежат их правообладателям. Сервис независим и не аффилирован с OpenAI/Anthropic.

CatalogКаталог

ModelsМоделиPricingЦеныInstructionsИнструкцииDocsДокументацияKey checkПроверка ключа

LegalДокументы

OfferОфертаPrivacyКонфиденциальностьConsentСогласиеAcceptable useДопустимое использованиеRefundВозврат

LearnМатериалы

GuidesГайдыComparisonsСравненияAlternativesАльтернативыIntegrationsИнтеграцииUse casesСценарииGlossaryГлоссарийNewsНовостиRSSTelegramTelegram-канал
HomeГлавнаяModelsМоделиPricingЦеныSign inВойтиAccountАккаунт

API referenceСправочник API

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

Everything a client needs to call the gateway: base URLs, endpoints, authentication, streaming and error codes. The values below are what the gateway actually answers.Всё, что нужно клиенту для вызова шлюза: base URL, эндпоинты, аутентификация, стриминг и коды ошибок. Значения ниже — то, что шлюз реально отвечает.

Base URLsBase URL

One key speaks both protocols. Point an OpenAI-compatible client at /v1 and an Anthropic client at the root.Один ключ говорит на двух протоколах. OpenAI-совместимый клиент смотрит на /v1, Anthropic-клиент — на корень.

OpenAI-compatible base URLBase URL для OpenAI-совместимых

https://llmcode.io/v1

POST /chat/completions, /responses, /embeddings; GET /models.POST /chat/completions, /responses, /embeddings; GET /models.

Anthropic Messages base URLBase URL для Anthropic Messages

https://llmcode.io

POST /v1/messages. No /v1 in the base URL expected by the SDK.POST /v1/messages. В base URL для SDK — без /v1.

OpenAI authenticationАутентификация OpenAI

Authorization: Bearer $LLMCODE_API_KEY

The token starts with sk-llmcode-.Токен начинается с sk-llmcode-.

Anthropic authenticationАутентификация Anthropic

x-api-key: $LLMCODE_API_KEY

Send anthropic-version: 2023-06-01 as with the native API.Передайте anthropic-version: 2023-06-01, как в нативном API.

EndpointsЭндпоинты

The public surface of the gateway. Everything else returns 404.Публичная поверхность шлюза. Всё остальное возвращает 404.

PathПутьWhat it doesНазначение
POST/v1/chat/completionsOpenAI-compatible chat. Streaming is supported.OpenAI-совместимый чат. Стриминг поддерживается.
POST/v1/messagesAnthropic Messages. Send x-api-key and the anthropic-version header. Streaming is supported.Anthropic Messages. Передайте x-api-key и заголовок anthropic-version. Стриминг поддерживается.
POST/v1/responsesOpenAI-compatible responses. Streaming is not available in this version: stream: true returns 400.OpenAI-совместимые responses. Стриминг в этой версии недоступен: запрос со stream: true получает 400.
POST/v1/embeddingsText embeddings. POST a list of strings as input.Эмбеддинги текста. В теле передаётся список строк в параметре input.
GET/v1/modelsList the published profiles available to the token.Список опубликованных профилей, доступных токену.
GET/v1/models/:idA single published profile. Unknown or unpublished ids return 404.Один опубликованный профиль. Неизвестный или неопубликованный id возвращает 404.

StreamingСтриминг

Which endpoints stream, and the one that does not in this version.Какие эндпоинты стримят и какой в этой версии не стримит.

Chat completionsChat completions

Streaming is supported: send stream: true and read server-sent events. The request id stays constant across chunks.Стриминг поддерживается: передайте stream: true и читайте server-sent events. request id не меняется между чанками.

Anthropic MessagesAnthropic Messages

Messages streaming is supported with the same client flow as the native API.Стриминг messages поддерживается тем же потоком, что и нативный API.

ResponsesResponses

Responses with stream: true returns 400 in this version. Use chat completions for streaming.Responses со stream: true возвращает 400 в этой версии. Для стриминга используйте chat completions.

Error codesКоды ошибок

HTTPCodeКодMeaningЗначение
400invalid_request_bodyThe request body, model or messages field is not valid.Тело запроса, модель или поле сообщений неверны.
401invalid_api_keyThe token is missing, invalid, revoked or expired.Токен отсутствует, неверен, отозван или истёк.
402insufficient_quotaThe account balance or the token limit is too low.Недостаточно баланса аккаунта или лимита токена.
403model_not_allowedThe token is not allowed to use this profile.Токену не разрешён этот профиль.
403ip_not_allowedThe request IP is not in the token IP list.IP запроса не входит в список IP токена.
404model_not_foundThe profile is not published or has no active price.Профиль не опубликован или у него нет действующей цены.
429rate_limit_exceededThe request rate limit is exceeded.Превышен лимит частоты запросов.
500internal_errorUnexpected gateway error. A retry with the same request id is safe.Непредвиденная ошибка шлюза. Повтор с тем же request id безопасен.
503upstream_unavailableThe upstream is unavailable; the hold is released.Апстрим недоступен; удержание снимается.

Token limitsЛимиты токена

  • A token belongs to one account and one published profile.Токен принадлежит одному аккаунту и одному опубликованному профилю.
  • Several tokens can use the same profile; each has its own UT limit, IP list, expiry and status.Несколько токенов могут использовать один профиль; у каждого свой лимит UT, список IP, срок и статус.
  • The default account limit is 20 active tokens. The operator can change it.Лимит аккаунта по умолчанию — 20 активных токенов. Оператор может его изменить.
  • Default rate: 600 requests per minute and 60 concurrent streams. The operator can change it.Базовый лимит: 600 запросов в минуту и 60 одновременных стримов. Оператор может его изменить.
  • A revoked or blocked token returns 401. A token that is not allowed to use the model returns 403.Отозванный или заблокированный токен возвращает 401. Токен без доступа к модели — 403.

Connect a toolПодключите инструмент

Paste-ready configs for the clients you already use, with the token kept in an environment variable.Готовые конфиги для знакомых вам клиентов; токен остаётся в переменной окружения.

OpenCodeCursorCline / Roo CodeClaude CodeCodex CLIСвой код

Model names in the API are LLMcode profiles with their own routing. They do not mean direct access to the same-named models of OpenAI LLC or Anthropic PBC. Trademarks belong to their owners. The service is independent and is not affiliated with OpenAI or Anthropic.Названия моделей в API — профили LLMcode с собственной маршрутизацией. Они не означают прямой доступ к одноимённым моделям OpenAI LLC или Anthropic PBC. Товарные знаки принадлежат их правообладателям. Сервис независим и не аффилирован с OpenAI/Anthropic.