{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/berget-ai/json-schema/berget-ai-model-schema.json",
  "title": "Model",
  "x-generated": "2026-11-24",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/berget-ai-openapi.yml#/components/schemas/Model",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "minLength": 1,
      "description": "Unique identifier for the model"
    },
    "object": {
      "type": "string",
      "enum": [
        "model"
      ],
      "description": "Object type, always \"model\""
    },
    "created": {
      "type": "number",
      "description": "Unix timestamp when the model was created"
    },
    "owned_by": {
      "type": "string",
      "minLength": 1,
      "description": "Organization that owns the model"
    },
    "name": {
      "type": "string",
      "minLength": 1,
      "description": "Display name of the model"
    },
    "pricing": {
      "type": "object",
      "properties": {
        "currency": {
          "type": "string",
          "description": "Currency code (always \"EUR\")"
        },
        "input": {
          "type": "number",
          "description": "Cost per input token in EUR"
        },
        "output": {
          "type": "number",
          "description": "Cost per output token in EUR"
        },
        "cached_input": {
          "description": "Cost per cached input token (prefix-cache hit) in EUR. Present only for models with cached-input pricing.",
          "type": "number"
        },
        "unit": {
          "type": "string",
          "description": "Pricing unit (e.g. \"€ / M Token\")"
        }
      },
      "required": [
        "currency",
        "input",
        "output",
        "unit"
      ],
      "additionalProperties": false,
      "description": "Pricing information for the model"
    },
    "capabilities": {
      "type": "object",
      "properties": {
        "classification": {
          "default": false,
          "description": "Whether the model supports classification tasks",
          "type": "boolean"
        },
        "embeddings": {
          "default": false,
          "description": "Whether the model supports generating embeddings",
          "type": "boolean"
        },
        "formatted_output": {
          "default": false,
          "description": "Whether the model supports formatted output",
          "type": "boolean"
        },
        "function_calling": {
          "default": false,
          "description": "Whether the model supports function calling",
          "type": "boolean"
        },
        "json_mode": {
          "default": false,
          "description": "Whether the model supports JSON mode",
          "type": "boolean"
        },
        "streaming": {
          "default": false,
          "description": "Whether the model supports streaming output",
          "type": "boolean"
        },
        "vision": {
          "default": false,
          "description": "Whether the model supports vision/image input",
          "type": "boolean"
        }
      },
      "required": [
        "classification",
        "embeddings",
        "formatted_output",
        "function_calling",
        "json_mode",
        "streaming",
        "vision"
      ],
      "additionalProperties": false,
      "description": "Capabilities of the model"
    },
    "reasoning_efforts": {
      "description": "Reasoning effort levels supported by the model. Send `reasoning_effort: <level>` in the request body.",
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "quantization": {
      "description": "Quantization method used",
      "type": "string",
      "enum": [
        "BF16",
        "FP8",
        "FP16",
        "INT4",
        "INT8",
        "MXFP4"
      ]
    },
    "aliases": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Alternative names/aliases for the model"
    },
    "license": {
      "type": "string",
      "description": "License of the model"
    },
    "lifecycle_state": {
      "type": "string",
      "description": "Lifecycle state of the model (legacy — use lifecycle_status)"
    },
    "lifecycle_status": {
      "type": "string",
      "enum": [
        "preview",
        "active",
        "deprecated",
        "upgrading"
      ],
      "description": "Lifecycle status of the model. Supersedes lifecycle_state."
    },
    "model_path": {
      "type": "string",
      "description": "Path to the model"
    },
    "model_size": {
      "type": "number",
      "description": "Size of the model in billions of parameters"
    },
    "model_type": {
      "type": "string",
      "description": "Type of the model"
    },
    "parent": {
      "description": "Parent model ID",
      "type": [
        "string",
        "null"
      ]
    },
    "permission": {
      "type": "array",
      "items": {},
      "description": "List of permissions"
    },
    "root": {
      "type": "string",
      "description": "Root model ID"
    },
    "status": {
      "type": "object",
      "properties": {
        "up": {
          "type": "boolean",
          "description": "Whether the model endpoint is reachable"
        },
        "latency": {
          "description": "Round-trip latency of the last health check in milliseconds",
          "type": "number"
        },
        "tokens_per_second": {
          "description": "Current engine output throughput in tokens per second, measured over the last ~30 s scrape of the endpoint /metrics endpoint. This is the aggregate across all in-flight requests on the endpoint combined — 0 means the engine is idle, not slow. Absent until the engine has reported a value.",
          "type": "number"
        }
      },
      "required": [
        "up"
      ],
      "additionalProperties": false,
      "description": "Current status of the model endpoint"
    },
    "release_date": {
      "type": "string",
      "description": "Release date of the model (YYYY-MM-DD)"
    },
    "upgrade_to": {
      "description": "Model ID of the successor model. Present only when the model is being upgraded (lifecycle_status `upgrading`). The old model keeps serving; clients should migrate to this ID. May not be listed in the catalog until the current model retires.",
      "type": "string",
      "minLength": 1
    },
    "end_of_life": {
      "description": "End-of-life date of the model (YYYY-MM-DD)",
      "type": "string"
    }
  },
  "required": [
    "id",
    "object",
    "created",
    "owned_by",
    "name",
    "pricing",
    "capabilities",
    "aliases",
    "license",
    "lifecycle_state",
    "lifecycle_status",
    "model_path",
    "model_size",
    "model_type",
    "parent",
    "permission",
    "root",
    "status",
    "release_date"
  ],
  "additionalProperties": false
}