Hubris Embeddings API
The Embeddings API from Hubris — 1 operation(s) for embeddings.
The Embeddings API from Hubris — 1 operation(s) for embeddings.
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/hubris-pw:hubris-pw-embeddings-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. 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: Hubris Embeddings API
version: 1.0.0
description: 'OpenAI-совместимый API российского LLM-агрегатора. Все цены в рублях.
Версии и вывод из эксплуатации (deprecation policy): несовместимые изменения — только в новой версии префикса (`/v2`); об отключении эндпоинта или поля предупреждаем не меньше чем за 90 дней заголовками `Deprecation` (RFC 9745) и `Sunset` (RFC 8594), записью в журнале изменений и письмом. Подробно: https://hubris.pw/docs/api/versioning'
servers:
- url: https://api.hubris.pw
description: Production
tags:
- name: Embeddings
paths:
/v1/embeddings:
post:
operationId: createEmbedding
tags:
- Embeddings
summary: Создать эмбеддинги
description: 'OpenAI-совместимый embeddings endpoint. Превращает текст в вектор фиксированной длины — для семантического поиска, RAG, классификации.
Принимает строку, массив строк (батч до 2048), массив токен-ID или массив массивов токен-ID. Биллинг — только по `prompt_tokens` (output всегда 0).
Стрима нет. Полный список embedding-моделей: `GET /v1/models` с фильтром `output_modalities=embeddings`.'
security:
- bearerAuth: []
- oauth2:
- chat:write
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/EmbeddingsRequest'
responses:
'200':
description: Успешный ответ — список эмбеддингов в порядке `input`.
content:
application/json:
schema:
$ref: '#/components/schemas/EmbeddingsResponse'
'400':
description: Невалидное тело запроса
content:
application/json:
schema:
$ref: '#/components/schemas/EmbeddingsErrorResponse'
'401':
description: Невалидный API-ключ
content:
application/json:
schema:
$ref: '#/components/schemas/EmbeddingsErrorResponse'
'402':
description: Недостаточно средств на балансе
content:
application/json:
schema:
$ref: '#/components/schemas/EmbeddingsErrorResponse'
'404':
description: Модель не найдена или не поддерживает embeddings
content:
application/json:
schema:
$ref: '#/components/schemas/EmbeddingsErrorResponse'
'429':
description: Превышен дневной лимит ключа
content:
application/json:
schema:
$ref: '#/components/schemas/EmbeddingsErrorResponse'
'502':
description: Ошибка провайдера
content:
application/json:
schema:
$ref: '#/components/schemas/EmbeddingsErrorResponse'
'503':
description: Курс ЦБ РФ временно недоступен
content:
application/json:
schema:
$ref: '#/components/schemas/EmbeddingsErrorResponse'
'504':
description: Провайдер не ответил вовремя
content:
application/json:
schema:
$ref: '#/components/schemas/EmbeddingsErrorResponse'
components:
schemas:
EmbeddingsErrorResponse:
type: object
properties:
error:
$ref: '#/components/schemas/ErrorObject'
required:
- error
EmbeddingsRequest:
type: object
properties:
model:
type: string
minLength: 1
description: 'ID embedding-модели — например, `openai/text-embedding-3-small`. Полный список: GET /v1/models, отфильтруйте по `output_modalities` содержащему `embeddings`.'
example: openai/text-embedding-3-small
input:
anyOf:
- type: string
- type: array
items:
type: string
- type: array
items:
type: integer
- type: array
items:
type: array
items:
type: integer
- type: array
items:
type: object
properties:
content:
type: array
items:
oneOf:
- type: object
properties:
type:
type: string
enum:
- text
text:
type: string
required:
- type
- text
- type: object
properties:
type:
type: string
enum:
- image_url
image_url:
type: object
properties:
url:
type: string
minLength: 1
required:
- url
required:
- type
- image_url
minItems: 1
required:
- content
description: 'Что превратить в вектор. Принимает: одну строку, массив строк (батч), массив токен-ID, массив массивов токен-ID или массив объектов `{content: [...]}` с частями `text` и `image_url` — для моделей с изображениями на входе (`input_modalities` содержит `image`). Максимум 2048 элементов в батче.'
example: Привет, мир
encoding_format:
type: string
enum:
- float
- base64
description: '`float` (по умолчанию) — массив чисел в `embedding`. `base64` — base64-строка.'
example: float
dimensions:
type: integer
minimum: 0
exclusiveMinimum: true
description: Уменьшенная размерность вектора. Поддерживается только моделями `text-embedding-3-*`.
example: 256
user:
type: string
description: Опциональный идентификатор конечного пользователя (для логов абьюза провайдера).
required:
- model
- input
EmbeddingsUsage:
type: object
properties:
prompt_tokens:
type: integer
minimum: 0
total_tokens:
type: integer
minimum: 0
required:
- prompt_tokens
- total_tokens
ErrorCode:
type: string
enum:
- invalid_request
- invalid_api_key
- insufficient_balance
- daily_limit_exceeded
- workspace_limit_exceeded
- model_not_found
- exchange_rate_unavailable
- upstream_error
- upstream_timeout
- context_length_exceeded
- content_policy_violation
- input_image_rejected
- not_found
- internal_error
- too_many_active_jobs
- video_not_ready
- index_out_of_range
- byok_disabled
- byok_egress_unavailable
- byok_not_configured
- byok_insufficient_credits
- byok_not_supported_for_videos
ErrorObject:
type: object
properties:
message:
type: string
type:
type: string
code:
$ref: '#/components/schemas/ErrorCode'
param:
type: string
nullable: true
required:
- message
- type
- code
EmbeddingsResponse:
type: object
properties:
object:
type: string
enum:
- list
data:
type: array
items:
$ref: '#/components/schemas/Embedding'
model:
type: string
usage:
$ref: '#/components/schemas/EmbeddingsUsage'
required:
- object
- data
- model
- usage
Embedding:
type: object
properties:
object:
type: string
enum:
- embedding
index:
type: integer
minimum: 0
embedding:
nullable: true
description: Массив чисел при `encoding_format=float` или base64-строка при `encoding_format=base64`.
required:
- object
- index
securitySchemes:
bearerAuth:
type: http
scheme: bearer
bearerFormat: sk-gw-...
description: API-ключ в формате `sk-gw-` + 32 hex. Создаётся в дашборде на /keys. Обычный ключ даёт все права, ключ только для чтения не может тратить баланс.
oauth2:
type: oauth2
description: 'OAuth-токен приложения с ограниченными правами. Регистрация клиента — `POST /oauth/clients` (RFC 7591), PKCE S256 обязателен. Метаданные: `/.well-known/oauth-authorization-server`, `/.well-known/oauth-protected-resource`.'
flows:
authorizationCode:
authorizationUrl: https://api.hubris.pw/oauth/authorize
tokenUrl: https://api.hubris.pw/oauth/token
refreshUrl: https://api.hubris.pw/oauth/token
scopes:
chat:write: 'Запросы к моделям от имени пользователя (списывают баланс): чат, Responses, Messages, эмбеддинги, реранкеры, модели решений, изображения, распознавание и озвучка речи, расшифровка видео; коннекторы Битрикс24.'
models:read: Видеть цепочки резервных моделей пользователя в `GET /v1/models`.
balance:read: Видеть остаток баланса пользователя.
videos:write: Создавать видео от имени пользователя (`POST /v1/videos`, резервирует и списывает баланс).
videos:read: Узнавать статус и скачивать видео пользователя (`GET /v1/videos/{id}`, `GET /v1/videos/{id}/content`).
offline_access: Выдать refresh-токен, чтобы подключение жило 90 дней без повторного входа.