{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/glyphapi-dev/json-schema/glyphapi-dev-encode-in-schema.json",
  "title": "EncodeIn",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/glyphapi-dev-openapi.json#/components/schemas/EncodeIn",
  "properties": {
    "text": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 40000
        },
        {
          "type": "null"
        }
      ],
      "title": "Text",
      "description": "Text to encode. Provide this or `texts`, not both."
    },
    "texts": {
      "anyOf": [
        {
          "items": {
            "type": "string",
            "maxLength": 40000
          },
          "type": "array",
          "maxItems": 50
        },
        {
          "type": "null"
        }
      ],
      "title": "Texts",
      "description": "Multiple texts, joined as one document. Provide this or `text`, not both. Each item and the joined total are still bounded by the same character cap as `text`."
    },
    "reader": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Reader",
      "description": "Your reader model (e.g. 'claude', 'gemini', 'qwen2.5-vl', 'gpt-4o'). If omitted, inferred from the 'X-Reader-Model' request header or the User-Agent; an unidentified caller is treated as pixel-billed (text)."
    },
    "substrate": {
      "type": "string",
      "title": "Substrate",
      "description": "'auto' (default; picks the cheapest legible substrate for `reader`) | 'text' | 'glyph'.",
      "default": "auto"
    },
    "verbatim": {
      "anyOf": [
        {
          "type": "boolean"
        },
        {
          "type": "null"
        }
      ],
      "title": "Verbatim",
      "description": "Set true if this text must stay exact (code, hashes, quotes) — auto then never picks glyph, which paraphrases. None auto-detects fenced code blocks."
    },
    "tier": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Tier",
      "description": "Glyph density tier override for substrate='glyph': '6x' | '10x' | '15x'. Ignored for substrate='auto' — the picker's own tier is used there so the claimed token estimate always matches the rendered artifact."
    }
  },
  "type": "object"
}