Hubris Decisions API

The Decisions API from Hubris — 1 operation(s) for decisions.

GitHub OpenAPI

Operations 1

POST /v1/decisions Задать вопросы модели решений #

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-decisions-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-decisions-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Hubris Decisions 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: Decisions
paths:
  /v1/decisions:
    post:
      operationId: createDecision
      tags:
      - Decisions
      summary: Задать вопросы модели решений
      description: 'Модели решений (например, `typesafe/jev-1.13`) не пишут текст. Вы передаёте данные (`state`) и вопросы (`questions`), модель возвращает ответы с вероятностями.


        Типы вопросов: `noul` — да или нет, `choice` — вариант из списка, `score` — уровень на шкале. Все вопросы решаются за один запрос.


        Платится только вход (`usage.input_tokens`), выход бесплатный. `usage.cost` — списано в копейках. Стрима нет.


        Список моделей: `GET /v1/models`, фильтр по `output_modalities`, содержащему `decisions`.'
      security:
      - bearerAuth: []
      - oauth2:
        - chat:write
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DecisionsRequest'
      responses:
        '200':
          description: Ответы на все вопросы.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DecisionsResponse'
        '400':
          description: Невалидное тело запроса
        '401':
          description: Невалидный API-ключ
        '402':
          description: Недостаточно средств на балансе
        '404':
          description: Модель не найдена или это не модель решений
        '429':
          description: Превышен лимит запросов
        '502':
          description: Ошибка провайдера
        '503':
          description: Курс валют временно недоступен
        '504':
          description: Провайдер не ответил вовремя
components:
  schemas:
    DecisionAnswer:
      type: object
      properties:
        type:
          type: string
          enum:
          - noul
          - choice
          - score
        noul:
          type: number
          description: 'Для `noul`: вероятность ответа «да», от 0 до 1.'
        choice:
          type: string
          description: 'Для `choice`: ключ выбранного варианта.'
        score:
          type: number
          description: 'Для `score`: ожидаемый уровень шкалы, дробное число от 0 до N−1.'
        confidence:
          type: number
          description: Уверенность модели в ответе, от 0 до 1.
        probabilities:
          type: object
          additionalProperties:
            type: number
          description: Вероятность каждого варианта или уровня.
        legend:
          type: object
          additionalProperties:
            nullable: true
          description: 'Для `score`: номер уровня → его описание из запроса.'
      required:
      - type
    DecisionsRequest:
      type: object
      properties:
        model:
          type: string
          minLength: 1
          description: 'ID модели решений, например `typesafe/jev-1.13`. Полный список: GET /v1/models, отфильтруйте по `output_modalities`, содержащему `decisions`.'
          example: typesafe/jev-1.13
        state:
          anyOf:
          - type: string
          - type: object
            additionalProperties:
              nullable: true
          - type: array
            items:
              nullable: true
          description: 'Данные, о которых задаются вопросы: строка, объект или массив.'
          example: Третий день не проходит оплата на сайте, клиенты уходят.
        questions:
          type: object
          additionalProperties:
            $ref: '#/components/schemas/DecisionQuestion'
          description: Вопросы по ключам. Ключ возвращается в `answers`. Все вопросы решаются за один запрос.
        user:
          type: string
          maxLength: 256
          description: Опциональный идентификатор конечного пользователя.
      required:
      - model
      - state
      - questions
    DecisionsUsage:
      type: object
      properties:
        input_tokens:
          type: integer
          minimum: 0
        output_tokens:
          type: integer
          minimum: 0
        cost:
          type: number
          description: Списано за запрос, в копейках.
      required:
      - input_tokens
      - output_tokens
    DecisionQuestion:
      oneOf:
      - type: object
        properties:
          type:
            type: string
            enum:
            - noul
          instructions:
            anyOf:
            - type: string
            - type: object
              additionalProperties:
                nullable: true
            - type: array
              items:
                nullable: true
          criteria:
            type: object
            properties:
              'true':
                anyOf:
                - type: string
                - type: object
                  additionalProperties:
                    nullable: true
                - type: array
                  items:
                    nullable: true
              'false':
                anyOf:
                - type: string
                - type: object
                  additionalProperties:
                    nullable: true
                - type: array
                  items:
                    nullable: true
            required:
            - 'true'
            - 'false'
        required:
        - type
        - instructions
      - type: object
        properties:
          type:
            type: string
            enum:
            - choice
          instructions:
            anyOf:
            - type: string
            - type: object
              additionalProperties:
                nullable: true
            - type: array
              items:
                nullable: true
          criteria:
            type: object
            additionalProperties:
              anyOf:
              - type: string
              - type: object
                additionalProperties:
                  nullable: true
              - type: array
                items:
                  nullable: true
        required:
        - type
        - instructions
        - criteria
      - type: object
        properties:
          type:
            type: string
            enum:
            - score
          instructions:
            anyOf:
            - type: string
            - type: object
              additionalProperties:
                nullable: true
            - type: array
              items:
                nullable: true
          criteria:
            type: array
            items:
              anyOf:
              - type: string
              - type: object
                additionalProperties:
                  nullable: true
              - type: array
                items:
                  nullable: true
            minItems: 1
        required:
        - type
        - instructions
        - criteria
      description: Вопрос к модели. `noul` — да или нет, ответ — вероятность «да» от 0 до 1. `choice` — один вариант из `criteria` (объект «ключ → описание»). `score` — уровень на шкале из `criteria` (массив описаний уровней по порядку).
    DecisionsResponse:
      type: object
      properties:
        id:
          type: string
        model:
          type: string
        answers:
          type: object
          additionalProperties:
            $ref: '#/components/schemas/DecisionAnswer'
        usage:
          $ref: '#/components/schemas/DecisionsUsage'
      required:
      - model
      - answers
      - usage
  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 дней без повторного входа.