{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/componecat-ai/json-schema/componecat-ai-aimodel-resource-schema.json",
  "title": "AIModelResource",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/componecat-ai-ai-models-api-openapi.yml#/components/schemas/AIModelResource",
  "required": [
    "id",
    "name",
    "provider",
    "modelId",
    "properties",
    "isDefault",
    "enabled",
    "usedAt",
    "createdAt",
    "updatedAt"
  ],
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "format": "uuid"
    },
    "name": {
      "type": "string"
    },
    "provider": {
      "type": "string"
    },
    "modelId": {
      "type": "string"
    },
    "properties": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/AIModelPropertyResource"
      }
    },
    "isDefault": {
      "type": "boolean"
    },
    "enabled": {
      "type": "boolean"
    },
    "usedAt": {
      "type": [
        "null",
        "string"
      ],
      "format": "date-time"
    },
    "createdAt": {
      "type": "string",
      "format": "date-time"
    },
    "updatedAt": {
      "type": "string",
      "format": "date-time"
    }
  },
  "$defs": {
    "AIModelPropertyResource": {
      "required": [
        "key",
        "value"
      ],
      "type": "object",
      "properties": {
        "key": {
          "type": "string"
        },
        "value": {
          "type": "string"
        }
      }
    }
  }
}