{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/klisten-co-kr/json-schema/klisten-co-kr-catalog-schema.json",
  "title": "Catalog",
  "x-generated": "2026-10-29",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/klisten-co-kr-models-openapi.json#/components/schemas/Catalog",
  "type": "object",
  "required": [
    "observed_at",
    "expires_at",
    "schema_version",
    "stage",
    "snapshot_id",
    "source_url",
    "source_status",
    "counts",
    "offerings"
  ],
  "properties": {
    "observed_at": {
      "type": "string",
      "format": "date-time"
    },
    "expires_at": {
      "type": "string",
      "format": "date-time"
    },
    "schema_version": {
      "const": "modelroute.public-catalog.v1"
    },
    "stage": {
      "const": "discovery-beta"
    },
    "snapshot_id": {
      "type": "string",
      "pattern": "^[a-f0-9]{64}$"
    },
    "source_url": {
      "type": "string",
      "format": "uri"
    },
    "source_status": {
      "enum": [
        "current",
        "stale",
        "not_yet_valid"
      ]
    },
    "counts": {
      "type": "object",
      "description": "All retained records, including missing records; not currently available model counts.",
      "properties": {
        "total": {
          "type": "integer",
          "minimum": 0
        },
        "free": {
          "type": "integer",
          "minimum": 0
        },
        "paid": {
          "type": "integer",
          "minimum": 0
        },
        "unknown": {
          "type": "integer",
          "minimum": 0
        }
      }
    },
    "offerings": {
      "type": "array",
      "maxItems": 10000,
      "items": {
        "$ref": "#/$defs/Offering"
      }
    }
  },
  "$defs": {
    "Offering": {
      "type": "object",
      "required": [
        "id",
        "name",
        "pricing_class",
        "presence",
        "rate_unit",
        "issues",
        "context_tokens",
        "max_output_tokens",
        "input_rate",
        "output_rate",
        "fixed_micro_usd",
        "observed_at",
        "expires_at"
      ],
      "properties": {
        "id": {
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "pricing_class": {
          "enum": [
            "free",
            "paid",
            "unknown"
          ]
        },
        "presence": {
          "enum": [
            "listed",
            "missing"
          ]
        },
        "rate_unit": {
          "const": "micro_usd_per_million_tokens"
        },
        "issues": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "context_tokens": {
          "type": [
            "integer",
            "null"
          ],
          "minimum": 0
        },
        "max_output_tokens": {
          "type": [
            "integer",
            "null"
          ],
          "minimum": 0
        },
        "input_rate": {
          "type": [
            "integer",
            "null"
          ],
          "minimum": 0
        },
        "output_rate": {
          "type": [
            "integer",
            "null"
          ],
          "minimum": 0
        },
        "fixed_micro_usd": {
          "type": [
            "integer",
            "null"
          ],
          "minimum": 0
        },
        "observed_at": {
          "type": "string",
          "format": "date-time"
        },
        "expires_at": {
          "type": "string",
          "format": "date-time"
        }
      }
    }
  }
}