{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/clipia-ai/json-schema/clipia-ai-model-detail-schema.json",
  "title": "ModelDetail",
  "x-generated": "2026-11-04",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/clipia-ai-openapi.yml#/components/schemas/ModelDetail",
  "type": "object",
  "required": [
    "slug",
    "type",
    "name",
    "input_schema",
    "pricing"
  ],
  "properties": {
    "slug": {
      "type": "string"
    },
    "type": {
      "type": "string",
      "enum": [
        "image",
        "video",
        "audio"
      ]
    },
    "name": {
      "type": "string"
    },
    "capabilities": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "input_schema": {
      "type": [
        "object",
        "null"
      ],
      "description": "Parameters are a list of descriptors; send their names as keys inside input.",
      "properties": {
        "parameters": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/ModelInputParameter"
          }
        },
        "parameterGroups": {
          "type": "array",
          "items": {
            "type": "object"
          }
        }
      },
      "additionalProperties": true
    },
    "text_limits": {
      "type": "object",
      "description": "Границы длины текста в символах для моделей озвучки (text-to-speech).\nТекст передаётся в `input.prompt` и описан в `input_schema.parameters`;\nэто поле дополнительно объявляет те же границы. Запрос вне границ отвергается\nкодом 400 ДО создания генерации, кредиты не резервируются.\nУ не-TTS моделей поле отсутствует.\n",
      "required": [
        "min_chars",
        "max_chars"
      ],
      "properties": {
        "min_chars": {
          "type": "integer",
          "description": "Минимальная длина текста озвучки в символах."
        },
        "max_chars": {
          "type": "integer",
          "description": "Максимальная длина текста озвучки в символах."
        }
      },
      "additionalProperties": false
    },
    "pricing": {
      "$ref": "#/$defs/ModelPricing"
    }
  },
  "$defs": {
    "ModelInputParameter": {
      "type": "object",
      "required": [
        "name",
        "type"
      ],
      "properties": {
        "name": {
          "type": "string"
        },
        "type": {
          "type": "string"
        },
        "required": {
          "type": "boolean"
        },
        "default": {},
        "label": {
          "type": "string"
        },
        "hint": {
          "type": "string"
        },
        "options": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "value": {
                "type": [
                  "string",
                  "number"
                ]
              },
              "label": {
                "type": "string"
              }
            }
          }
        },
        "validation": {
          "type": "object",
          "properties": {
            "minLength": {
              "type": "integer"
            },
            "maxLength": {
              "type": "integer"
            }
          },
          "additionalProperties": true
        },
        "min": {
          "type": "number"
        },
        "max": {
          "type": "number"
        },
        "step": {
          "type": "number"
        },
        "minLength": {
          "type": "integer"
        },
        "maxLength": {
          "type": "integer"
        }
      },
      "additionalProperties": true
    },
    "ModelPricing": {
      "type": "object",
      "description": "Reference quote through active billing, with character basis for TTS.",
      "properties": {
        "credits": {
          "type": "number",
          "description": "Quote for one unit; absent when pricing is unavailable."
        },
        "billing_unit": {
          "type": "string",
          "const": "characters"
        },
        "unit_size": {
          "type": "integer",
          "const": 1000
        },
        "character_count": {
          "type": "string",
          "enum": [
            "spoken_text",
            "trimmed_text"
          ]
        },
        "rounding": {
          "type": "string",
          "const": "ceil"
        },
        "minimum_credits": {
          "type": "integer",
          "const": 1
        },
        "available": {
          "type": "boolean",
          "const": false,
          "description": "Present only when authoritative pricing is unavailable."
        },
        "estimate_required": {
          "type": "boolean",
          "const": true,
          "description": "Present when the model is available but its price depends on the submitted input (for example, the length of the source video or speech), so there is no reference quote and `credits` is absent. Call `POST /v1/models/{model}/estimate` with the actual input."
        },
        "note": {
          "type": "string"
        }
      },
      "additionalProperties": true
    }
  }
}