apihubs-ru LLM API
The LLM API from apihubs-ru — 3 operation(s) for llm.
The LLM API from apihubs-ru — 3 operation(s) for llm.
Every API here is available over the APIs.io API and to AI agents over MCP.
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
find_apisBrowse and filter every API in the catalog.get_api_artifactsOne API's artifacts, grouped by type.get_openapiThe primary OpenAPI for this API.find_similar_apisAPIs that look like this one.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.curl "https://apis.io/api/v1/apis/apihubs-ru:apihubs-ru-llm-api"
curl "https://apis.io/api/v1/apis?limit=25"
Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.
openapi: 3.2.0
info:
title: Apihubs Ru LLM API
version: '1.0'
contact: {}
description: 'Operations tagged LLM across 2 of this provider''s published API definitions: openapi.json, apihubs-ru-openapi.json. Each path carries the servers of the definition it was published in.'
servers:
- url: https://api.apihubs.ru
description: Продакшен
tags:
- name: LLM
paths:
/api/v1/chat/completions:
post:
operationId: LlmController_createChatCompletion
parameters: []
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/ChatCompletionRequestDto'
responses:
'200':
description: Завершение чата. Когда `stream` `true`, ответ является `text/event-stream` дельт.
content:
application/json:
schema:
$ref: '#/components/schemas/ChatCompletionResponseDto'
'400':
description: Неверный запрос - неизвестная модель или неверные параметры
content:
application/json:
schema:
$ref: '#/components/schemas/BadRequestErrorResponseDto'
'401':
description: Ошибка авторизации — API-ключ отсутствует или недействителен
content:
application/json:
schema:
$ref: '#/components/schemas/UnauthorizedErrorResponseDto'
'402':
description: Требуется оплата - недостаточно средств на счету
content:
application/json:
schema:
$ref: '#/components/schemas/PaymentRequiredErrorResponseDto'
'500':
description: Внутренняя ошибка сервера - произошла ошибка на сервере
content:
application/json:
schema:
$ref: '#/components/schemas/InternalServerErrorResponseDto'
security:
- apiKey: []
summary: Совместимое с OpenAI завершение чата.
tags:
- LLM
servers:
- url: https://api.apihubs.ru
description: Продакшен
/api/v1/messages:
post:
operationId: LlmController_createMessage
parameters: []
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/AnthropicMessageRequestDto'
responses:
'200':
description: Сообщение Anthropic. Когда `stream` `true`, ответ представляет собой `text/event-stream` событий.
content:
application/json:
schema:
$ref: '#/components/schemas/AnthropicMessageResponseDto'
'400':
description: Неверный запрос - неизвестная модель или неверные параметры
content:
application/json:
schema:
$ref: '#/components/schemas/BadRequestErrorResponseDto'
'401':
description: Ошибка авторизации — API-ключ отсутствует или недействителен
content:
application/json:
schema:
$ref: '#/components/schemas/UnauthorizedErrorResponseDto'
'402':
description: Требуется оплата - недостаточно средств на счету
content:
application/json:
schema:
$ref: '#/components/schemas/PaymentRequiredErrorResponseDto'
'500':
description: Внутренняя ошибка сервера - произошла ошибка на сервере
content:
application/json:
schema:
$ref: '#/components/schemas/InternalServerErrorResponseDto'
security:
- apiKey: []
summary: Эндпоинт, совместимая с API сообщений Anthropic (модели Claude).
tags:
- LLM
servers:
- url: https://api.apihubs.ru
description: Продакшен
/api/v1/models:
get:
operationId: LlmController_listModels
parameters: []
responses:
'200':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/ModelListResponseDto'
'401':
description: Ошибка авторизации — API-ключ отсутствует или недействителен
content:
application/json:
schema:
$ref: '#/components/schemas/UnauthorizedErrorResponseDto'
security:
- apiKey: []
summary: Список доступных моделей чата с ценами за токены (USD за 1 млн токенов)
tags:
- LLM
servers:
- url: https://api.apihubs.ru
description: Продакшен
components:
schemas:
ChatCompletionResponseDto:
type: object
properties:
id:
type: string
example: chatcmpl-abc123
object:
type: string
example: chat.completion
created:
type: number
example: 1700000000
model:
type: string
example: gemini-3.5-flash
choices:
type: array
items:
$ref: '#/components/schemas/ChatCompletionChoiceDto'
usage:
$ref: '#/components/schemas/ChatCompletionUsageDto'
required:
- id
- object
- created
- model
- choices
- usage
ChatMessageDto:
type: object
properties:
role:
type: string
description: Роль автора сообщения
example: user
content:
type: object
description: Содержание сообщения. Либо строка, либо массив частей содержания (мультимодальный).
example: Hello!
name:
type: string
description: Необязательное имя автора
required:
- role
- content
AnthropicMessageRequestDto:
type: object
properties:
model:
type: string
description: Идентификатор модели
example: claude-sonnet-5
max_tokens:
type: number
description: Максимальное количество токенов для генерации (требуется Anthropic).
example: 1024
messages:
description: Сообщения диалога
type: array
items:
$ref: '#/components/schemas/AnthropicMessageDto'
stream:
type: boolean
description: Потоковые частичные дельты как события, отправляемые сервером
default: false
required:
- model
- max_tokens
- messages
ModelListResponseDto:
type: object
properties:
object:
type: string
example: list
data:
type: array
items:
$ref: '#/components/schemas/ModelObjectDto'
required:
- object
- data
ChatCompletionUsageDto:
type: object
properties:
prompt_tokens:
type: number
example: 12
completion_tokens:
type: number
example: 34
total_tokens:
type: number
example: 46
required:
- prompt_tokens
- completion_tokens
- total_tokens
ChatCompletionRequestDto:
type: object
properties:
model:
type: string
description: Идентификатор модели
example: gemini-3.5-flash
messages:
description: Сообщения диалога
type: array
items:
$ref: '#/components/schemas/ChatMessageDto'
stream:
type: boolean
description: Потоковые частичные дельты как события, отправляемые сервером
default: false
temperature:
type: number
description: Температура выборки (0-2)
top_p:
type: number
description: Вероятность ядерной выборки
max_tokens:
type: number
description: Максимальное количество токенов для генерации
max_completion_tokens:
type: number
description: Псевдоним для max_tokens; ограничен API Hubs
n:
type: number
description: Количество завершений. В настоящее время API Hubs поддерживает одно.
default: 1
maximum: 1
required:
- model
- messages
BadRequestErrorResponseDto:
type: object
properties:
code:
type: number
description: Код состояния HTTP
example: 400
error:
description: Подробности ошибки
allOf:
- $ref: '#/components/schemas/ErrorDetails'
required:
- code
- error
UnauthorizedErrorResponseDto:
type: object
properties:
code:
type: number
description: Код состояния HTTP
example: 401
error:
description: Подробности ошибки
allOf:
- $ref: '#/components/schemas/ErrorDetails'
required:
- code
- error
AnthropicMessageDto:
type: object
properties:
role:
type: string
description: Роль автора сообщения
example: user
content:
type: object
description: Содержимое сообщения. Либо строка, либо массив блоков содержимого (текст/изображение).
example: Explain rate limiting in three sentences.
required:
- role
- content
ModelLongContextPricingDto:
type: object
properties:
thresholdTokens:
type: number
example: 272000
description: Общее количество входных токенов, выше которого эти ставки заменяют базовые.
input:
type: number
example: 2.8
description: Цена входного токена
output:
type: number
example: 12.6
description: Цена выходного токена
cacheRead:
type: number
example: 0.28
description: Цена токена при чтении из кэша
cacheWrite:
type: number
example: 10
description: Цена токена при записи в кэш
required:
- thresholdTokens
- input
- output
- cacheRead
PaymentRequiredErrorResponseDto:
type: object
properties:
code:
type: number
description: Код состояния HTTP
example: 402
error:
description: Подробности ошибки
allOf:
- $ref: '#/components/schemas/ErrorDetails'
required:
- code
- error
ModelPricingDto:
type: object
properties:
currency:
type: string
example: USD
unit:
type: string
example: 1M_tokens
description: Единица расчета цены
input:
type: number
example: 1.4
description: Цена входного токена
output:
type: number
example: 8.4
description: Цена выходного токена
cacheRead:
type: number
example: 0.14
description: Цена токена при чтении из кэша
cacheWrite:
type: number
example: 5
description: Цена токена при записи в кэш (модели Anthropic)
longContext:
description: Более высокие ставки, которые заменяют указанные выше для всего запроса, если общее количество входных токенов превышает `thresholdTokens`. Отсутствуют, если модель оценивается по фиксированной цене при любом объеме контекста.
allOf:
- $ref: '#/components/schemas/ModelLongContextPricingDto'
required:
- currency
- unit
- input
- output
- cacheRead
ErrorDetails:
type: object
properties:
message:
type: string
description: Причина в человекочитаемом виде. Английский, стабильный — безопасно для логирования, не предназначен для отображения конечным пользователям на других языках.
type:
type: string
description: Тип ошибки
code:
type: string
description: Стабильный код, читаемый машиной. Используйте это соответствие, а не `message` — клиенты используют его для отображения своих локализованных сообщений.
example: insufficient_balance
required:
- message
- type
- code
ModelObjectDto:
type: object
properties:
id:
type: string
example: gemini-3.5-flash
object:
type: string
example: model
created:
type: number
example: 1700000000
owned_by:
type: string
example: apihubs
pricing:
description: Ценообразование токенов для пользователя (USD за 1M токенов); null, если не настроено
type:
- object
- 'null'
allOf:
- $ref: '#/components/schemas/ModelPricingDto'
required:
- id
- object
- created
- owned_by
AnthropicUsageDto:
type: object
properties:
input_tokens:
type: number
example: 10
output_tokens:
type: number
example: 13
required:
- input_tokens
- output_tokens
ChatCompletionChoiceDto:
type: object
properties:
index:
type: number
example: 0
message:
type: object
example:
role: assistant
content: Hi there!
finish_reason:
type:
- string
- 'null'
example: stop
required:
- index
- message
- finish_reason
AnthropicMessageResponseDto:
type: object
properties:
id:
type: string
example: msg_013zva2CMHNLnXJNN3QKQ2EF
type:
type: string
example: message
role:
type: string
example: assistant
content:
example:
- type: text
text: Hello! I'm Claude.
type: array
items:
type: string
model:
type: string
example: claude-sonnet-5
stop_reason:
type:
- string
- 'null'
example: end_turn
usage:
$ref: '#/components/schemas/AnthropicUsageDto'
required:
- id
- type
- role
- content
- model
- stop_reason
- usage
InternalServerErrorResponseDto:
type: object
properties:
code:
type: number
description: Код состояния HTTP
example: 500
error:
description: Подробности ошибки
allOf:
- $ref: '#/components/schemas/ErrorDetails'
required:
- code
- error
securitySchemes:
apiKey:
scheme: bearer
bearerFormat: API Key
type: http
description: Введите ваш API-ключ
externalDocs:
description: Документация API Hubs
url: https://docs.apihubs.ru
x-refined-from:
- openapi.json
- apihubs-ru-openapi.json