Hubris Rerank API

The Rerank API from Hubris — 1 operation(s) for rerank.

GitHub OpenAPI

Operations 1

POST /v1/rerank Отсортировать документы по запросу #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • 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.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/hubris-pw:hubris-pw-rerank-api"
All apis
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.

Get an API 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 Specification

hubris-pw-rerank-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Hubris Rerank 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: Rerank
paths:
  /v1/rerank:
    post:
      operationId: createRerank
      tags:
      - Rerank
      summary: Отсортировать документы по запросу
      description: 'Реранкер (например, `cohere/rerank-v3.5`) сортирует документы по тому, насколько они отвечают на запрос: `results` — номера документов во входном списке и оценка `relevance_score`, лучшие первыми.


        Оплата у Cohere — за поиск (`usage.search_units`), у остальных — за токены входа. `usage.cost` — списано в копейках. Стрима нет.


        Список моделей: `GET /v1/models?output_modalities=rerank`.'
      security:
      - bearerAuth: []
      - oauth2:
        - chat:write
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RerankRequest'
      responses:
        '200':
          description: Документы, отсортированные по близости к запросу.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RerankResponse'
        '400':
          description: Невалидное тело запроса
        '401':
          description: Невалидный API-ключ
        '402':
          description: Недостаточно средств на балансе
        '404':
          description: Модель не найдена или это не реранкер
        '429':
          description: Превышен лимит запросов
        '502':
          description: Ошибка провайдера
        '503':
          description: Курс валют временно недоступен
        '504':
          description: Провайдер не ответил вовремя
components:
  schemas:
    RerankResult:
      type: object
      properties:
        index:
          type: integer
          minimum: 0
          description: Номер документа во входном списке.
        relevance_score:
          type: number
          description: 'Насколько документ подходит к запросу: чем больше, тем лучше.'
        document:
          type: object
          properties:
            text:
              type: string
            image:
              type: string
      required:
      - index
      - relevance_score
    RerankResponse:
      type: object
      properties:
        id:
          type: string
        model:
          type: string
        results:
          type: array
          items:
            $ref: '#/components/schemas/RerankResult'
        usage:
          $ref: '#/components/schemas/RerankUsage'
      required:
      - model
      - results
      - usage
    RerankRequest:
      type: object
      properties:
        model:
          type: string
          minLength: 1
          description: 'ID реранкера, например `cohere/rerank-v3.5`. Полный список: GET /v1/models?output_modalities=rerank.'
          example: cohere/rerank-v3.5
        query:
          type: string
          minLength: 1
          description: Поисковый запрос, по которому сортируются документы.
          example: Как вернуть деньги за заказ?
        documents:
          type: array
          items:
            $ref: '#/components/schemas/RerankDocument'
          minItems: 1
          maxItems: 1000
          description: 'Документы для сортировки: строки или объекты `{ text, image }`.'
          example:
          - Возврат оформляется в личном кабинете.
          - Доставка занимает 3–5 дней.
        top_n:
          type: integer
          minimum: 0
          exclusiveMinimum: true
          description: Сколько самых подходящих документов вернуть. По умолчанию все.
          example: 3
        user:
          type: string
          maxLength: 256
          description: Опциональный идентификатор конечного пользователя.
      required:
      - model
      - query
      - documents
    RerankUsage:
      type: object
      properties:
        total_tokens:
          type: integer
          minimum: 0
        search_units:
          type: integer
          minimum: 0
          description: Поисковые единицы — у моделей с оплатой за поиск (Cohere).
        cost:
          type: number
          description: Списано за запрос, в копейках.
    RerankDocument:
      anyOf:
      - type: string
      - type: object
        properties:
          text:
            type: string
          image:
            type: string
            description: URL или data URI картинки.
  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 дней без повторного входа.