{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/apihubs-ru/json-schema/apihubs-ru-catalog-model-dto-schema.json",
  "title": "CatalogModelDto",
  "x-generated": "2026-10-30",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/apihubs-ru-openapi.json#/components/schemas/CatalogModelDto",
  "type": "object",
  "properties": {
    "pageUpdatedAt": {
      "type": "string",
      "description": "Observed significant public content change, ISO 8601; omitted until a change is recorded"
    },
    "id": {
      "type": "string",
      "description": "Публичный идентификатор модели, также используется как часть URL"
    },
    "group": {
      "type": "string",
      "description": "Группа маршрутизации, общая для связанных моделей"
    },
    "name": {
      "type": "string",
      "description": "Отображаемое имя"
    },
    "description": {
      "type": "string",
      "description": "Маркетинговое описание"
    },
    "descriptionLocales": {
      "type": "object",
      "additionalProperties": {
        "type": "string"
      },
      "description": "Marketing descriptions keyed by locale, for example { en: \"…\", ru: \"…\" }"
    },
    "type": {
      "type": "string",
      "description": "Тип генерации",
      "enum": [
        "TEXT",
        "MUSIC",
        "IMAGE",
        "VIDEO"
      ]
    },
    "kind": {
      "type": "string",
      "description": "Модель генерации медиа или LLM чат-модель",
      "enum": [
        "media",
        "llm"
      ]
    },
    "vendor": {
      "type": "string",
      "description": "Поставщик наверху цепочки, например, Google"
    },
    "releasedAt": {
      "type": "string",
      "description": "Date the vendor released the model, `YYYY-MM-DD`; absent when never announced"
    },
    "tags": {
      "description": "Теги каталога",
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "capabilities": {
      "description": "Теги возможностей, определяемые параметрами модели",
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "pricing": {
      "description": "Таблица цен; пусто, если у модели нет опубликованной цены",
      "type": "array",
      "items": {
        "$ref": "#/$defs/CatalogPriceDto"
      }
    },
    "priceFrom": {
      "type": "string",
      "description": "Headline price in USD, in the same unit as `pricing` (see `priceUnit`): the base-tier price for media models (or the cheapest complete tariff variant when no base tier resolves), the input-token rate for chat models"
    },
    "priceUnit": {
      "type": "string",
      "description": "What one price in `pricing` and `priceFrom` buys: a whole generation, one second of output (per-second video tariffs) or 1M tokens (chat models)",
      "enum": [
        "generation",
        "second",
        "megatoken"
      ]
    },
    "params": {
      "description": "Параметры ввода в порядке, в котором форма должна их отображать",
      "type": "array",
      "items": {
        "$ref": "#/$defs/CatalogParamFieldDto"
      }
    },
    "protocols": {
      "type": "array",
      "description": "Протоколы передачи данных, доступные для модели LLM",
      "items": {
        "type": "string",
        "enum": [
          "openai",
          "anthropic"
        ]
      }
    }
  },
  "required": [
    "id",
    "group",
    "name",
    "type",
    "kind",
    "tags",
    "capabilities",
    "pricing",
    "priceUnit",
    "params"
  ],
  "$defs": {
    "CatalogParamFieldDto": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string",
          "description": "Название поля, как отправлено в `input`"
        },
        "label": {
          "type": "string",
          "description": "Метка для элемента формы"
        },
        "description": {
          "type": "string",
          "description": "Описание поля"
        },
        "kind": {
          "type": "string",
          "description": "Скалярный тип поля (или его элементов, когда `isArray`)",
          "enum": [
            "string",
            "number",
            "boolean",
            "object"
          ]
        },
        "isArray": {
          "type": "boolean",
          "description": "Принимает ли поле список значений"
        },
        "required": {
          "type": "boolean",
          "description": "Обязательное ли поле"
        },
        "default": {
          "description": "Значение по умолчанию, если есть",
          "nullable": true,
          "oneOf": [
            {
              "type": "string"
            },
            {
              "type": "number"
            },
            {
              "type": "boolean"
            },
            {
              "type": "array",
              "items": {}
            }
          ]
        },
        "options": {
          "description": "Допустимые значения — отображать как список выбора",
          "type": "array",
          "items": {
            "$ref": "#/$defs/CatalogParamOptionDto"
          }
        },
        "minimum": {
          "type": "number"
        },
        "maximum": {
          "type": "number"
        },
        "maxLength": {
          "type": "number"
        },
        "isMedia": {
          "type": "boolean",
          "description": "Поле содержит URL предоставленных пользователем данных"
        },
        "isPrompt": {
          "type": "boolean",
          "description": "Поле является основным запросом модели"
        },
        "multiline": {
          "type": "boolean",
          "description": "Отображать как текстовое поле, а не как поле ввода"
        },
        "deprecated": {
          "type": "boolean",
          "description": "Поле сохраняется только для совместимости"
        }
      },
      "required": [
        "name",
        "label",
        "kind",
        "isArray",
        "required",
        "isMedia",
        "isPrompt",
        "multiline",
        "deprecated"
      ]
    },
    "CatalogParamOptionDto": {
      "type": "object",
      "properties": {
        "value": {
          "description": "Значение, отправленное в API",
          "oneOf": [
            {
              "type": "string"
            },
            {
              "type": "number"
            }
          ]
        },
        "label": {
          "type": "string",
          "description": "Читаемая для человека метка"
        }
      },
      "required": [
        "value",
        "label"
      ]
    },
    "CatalogPriceDto": {
      "type": "object",
      "properties": {
        "key": {
          "type": "string",
          "description": "Ключ стоимости из каталога моделей (\"default\", разрешение, размер…)"
        },
        "price": {
          "type": "string",
          "description": "Price in USD, as a string, for one unit of `CatalogModelDto.priceUnit` — a whole generation, one second of output or 1M tokens"
        },
        "isDefault": {
          "type": "boolean",
          "description": "Whether this is the model's base tier: what a request that sets no parameters is billed"
        },
        "dimensions": {
          "type": "object",
          "additionalProperties": {
            "type": "string"
          },
          "description": "Resolved tariff dimensions for this price; present for matrix tariffs"
        }
      },
      "required": [
        "key",
        "price",
        "isDefault"
      ]
    }
  }
}