{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/pennyocr-com/json-schema/pennyocr-com-ocrresponse-schema.json",
  "title": "OCRResponse",
  "x-generated": "2026-11-20",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/pennyocr-com-openapi.json#/components/schemas/OCRResponse",
  "properties": {
    "id": {
      "type": "string",
      "title": "Id",
      "description": "Request id, e.g. ocr_ab12cd34"
    },
    "pages": {
      "type": "integer",
      "title": "Pages"
    },
    "text": {
      "type": "string",
      "title": "Text",
      "description": "Full extracted text, pages joined by form feeds"
    },
    "page_results": {
      "items": {
        "$ref": "#/$defs/PageResult"
      },
      "type": "array",
      "title": "Page Results"
    },
    "cost_usd": {
      "type": "number",
      "title": "Cost Usd"
    },
    "model": {
      "type": "string",
      "title": "Model"
    }
  },
  "type": "object",
  "required": [
    "id",
    "pages",
    "text",
    "page_results",
    "cost_usd",
    "model"
  ],
  "$defs": {
    "PageResult": {
      "properties": {
        "page": {
          "type": "integer",
          "title": "Page",
          "description": "1-indexed page number"
        },
        "text": {
          "type": "string",
          "title": "Text"
        }
      },
      "type": "object",
      "required": [
        "page",
        "text"
      ],
      "title": "PageResult"
    }
  }
}