{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/edgechat-ai/json-schema/edgechat-ai-annotate-response-schema.json",
  "title": "AnnotateResponse",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/edgechat-ai-annotate-api-openapi.yml#/components/schemas/AnnotateResponse",
  "type": "object",
  "properties": {
    "html": {
      "type": "string"
    },
    "entities": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/Mention"
      }
    },
    "credit": {
      "type": "string"
    },
    "license": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string"
        },
        "url": {
          "type": "string"
        },
        "summary": {
          "type": "string"
        }
      },
      "required": [
        "name",
        "url",
        "summary"
      ]
    }
  },
  "$defs": {
    "ArticleRef": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string"
        },
        "slug": {
          "type": "string"
        },
        "title": {
          "type": "string"
        },
        "url": {
          "type": "string"
        },
        "api_url": {
          "type": "string"
        },
        "importance": {
          "type": "number"
        },
        "rank": {
          "type": "integer"
        }
      }
    },
    "Mention": {
      "allOf": [
        {
          "$ref": "#/$defs/ArticleRef"
        },
        {
          "type": "object",
          "properties": {
            "start": {
              "type": "integer",
              "description": "Offset of the first character in UTF-16 code units (JavaScript string indices), as `end`. In Python, slice text.encode(\"utf-16-le\")[2*start:2*end] and decode, or count code points yourself when the text has characters outside the Basic Multilingual Plane (emoji)."
            },
            "end": {
              "type": "integer",
              "description": "Offset just past the last character, in UTF-16 code units."
            },
            "surface": {
              "type": "string"
            },
            "confidence": {
              "type": "number"
            }
          }
        }
      ]
    }
  }
}