{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://agiright.org/schemas/aicl.schema.json",
  "title": "AICL Schema",
  "description": "AI Content License / AI Content Licensing Layer schema. Draft v0.1.",
  "type": "object",
  "required": ["version", "publisher", "licenses"],
  "properties": {
    "version": {
      "type": "string"
    },
    "protocol": {
      "type": "string",
      "const": "AICL"
    },
    "publisher": {
      "type": "string"
    },
    "updated": {
      "type": "string",
      "format": "date"
    },
    "schema": {
      "type": "string",
      "format": "uri"
    },
    "payment_endpoints": {
      "type": "object",
      "properties": {
        "quote": { "type": "string", "format": "uri" },
        "pay": { "type": "string", "format": "uri" },
        "verify": { "type": "string", "format": "uri" },
        "revoke": { "type": "string", "format": "uri" }
      }
    },
    "licenses": {
      "type": "array",
      "items": {
        "type": "object",
        "required": ["id", "rights"],
        "properties": {
          "id": { "type": "string" },
          "rights": {
            "type": "array",
            "items": { "type": "string" }
          },
          "price": {
            "type": "object",
            "properties": {
              "amount": { "type": "string" },
              "currency": { "type": "string" },
              "unit": { "type": "string" }
            }
          },
          "conditions": {
            "type": "array",
            "items": { "type": "string" }
          },
          "requires_contact": {
            "type": "boolean"
          },
          "contact": {
            "type": "string"
          }
        }
      }
    }
  }
}
