{
  "openapi": "3.0.1",
  "info": {
    "title": "Image to Text API",
    "description": "Image to text: OCR with line and word positions and confidence scores. $0.002 per image OCR result; start extra; usage included; failed results uncharged.",
    "version": "1.0",
    "x-build-id": "Ncg5P24cBeFX8Xh1W"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/hermeskd~image-to-text/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-hermeskd-image-to-text",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/acts/hermeskd~image-to-text/runs": {
      "post": {
        "operationId": "runs-sync-hermeskd-image-to-text",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor and returns information about the initiated run in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/runsResponseSchema"
                }
              }
            }
          }
        }
      }
    },
    "/acts/hermeskd~image-to-text/run-sync": {
      "post": {
        "operationId": "run-sync-hermeskd-image-to-text",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "inputSchema": {
        "type": "object",
        "required": [
          "urls"
        ],
        "properties": {
          "urls": {
            "title": "Image URLs",
            "minItems": 1,
            "maxItems": 1000,
            "type": "array",
            "description": "Image URLs (PNG, JPEG, WebP, TIFF, BMP, GIF), http or https, 1–1,000 per run, up to 20 MB, 50 megapixels and 32,767 pixels on a side each. Each URL becomes one record. Processing is sequential, with 540 seconds of work inside the default 600-second run at 1,024 MB; unfinished URLs receive timeout records.",
            "items": {
              "type": "string",
              "pattern": "^https?://[^\\s/@]+([/?#]\\S*)?$"
            }
          },
          "languages": {
            "title": "Languages",
            "minItems": 1,
            "maxItems": 3,
            "type": "array",
            "description": "Explicit Tesseract language/variant codes; 1–3 per image, 123 available codes covering 100+ languages. Unknown codes fail validation, never silently English.",
            "items": {
              "type": "string",
              "enum": [
                "afr",
                "amh",
                "ara",
                "asm",
                "aze",
                "aze_cyrl",
                "bel",
                "ben",
                "bod",
                "bos",
                "bre",
                "bul",
                "cat",
                "ceb",
                "ces",
                "chi_sim",
                "chi_sim_vert",
                "chi_tra",
                "chi_tra_vert",
                "chr",
                "cos",
                "cym",
                "dan",
                "deu",
                "deu_latf",
                "div",
                "dzo",
                "ell",
                "eng",
                "enm",
                "epo",
                "est",
                "eus",
                "fao",
                "fas",
                "fil",
                "fin",
                "fra",
                "frm",
                "fry",
                "gla",
                "gle",
                "glg",
                "grc",
                "guj",
                "hat",
                "heb",
                "hin",
                "hrv",
                "hun",
                "hye",
                "iku",
                "ind",
                "isl",
                "ita",
                "ita_old",
                "jav",
                "jpn",
                "jpn_vert",
                "kan",
                "kat",
                "kat_old",
                "kaz",
                "khm",
                "kir",
                "kmr",
                "kor",
                "kor_vert",
                "lao",
                "lat",
                "lav",
                "lit",
                "ltz",
                "mal",
                "mar",
                "mkd",
                "mlt",
                "mon",
                "mri",
                "msa",
                "mya",
                "nep",
                "nld",
                "nor",
                "oci",
                "ori",
                "pan",
                "pol",
                "por",
                "pus",
                "que",
                "ron",
                "rus",
                "san",
                "sin",
                "slk",
                "slv",
                "snd",
                "spa",
                "spa_old",
                "sqi",
                "srp",
                "srp_latn",
                "sun",
                "swa",
                "swe",
                "syr",
                "tam",
                "tat",
                "tel",
                "tgk",
                "tha",
                "tir",
                "ton",
                "tur",
                "uig",
                "ukr",
                "urd",
                "uzb",
                "uzb_cyrl",
                "vie",
                "yid",
                "yor"
              ],
              "enumTitles": [
                "afr",
                "amh",
                "ara",
                "asm",
                "aze",
                "aze_cyrl",
                "bel",
                "ben",
                "bod",
                "bos",
                "bre",
                "bul",
                "cat",
                "ceb",
                "ces",
                "chi_sim",
                "chi_sim_vert",
                "chi_tra",
                "chi_tra_vert",
                "chr",
                "cos",
                "cym",
                "dan",
                "deu",
                "deu_latf",
                "div",
                "dzo",
                "ell",
                "eng",
                "enm",
                "epo",
                "est",
                "eus",
                "fao",
                "fas",
                "fil",
                "fin",
                "fra",
                "frm",
                "fry",
                "gla",
                "gle",
                "glg",
                "grc",
                "guj",
                "hat",
                "heb",
                "hin",
                "hrv",
                "hun",
                "hye",
                "iku",
                "ind",
                "isl",
                "ita",
                "ita_old",
                "jav",
                "jpn",
                "jpn_vert",
                "kan",
                "kat",
                "kat_old",
                "kaz",
                "khm",
                "kir",
                "kmr",
                "kor",
                "kor_vert",
                "lao",
                "lat",
                "lav",
                "lit",
                "ltz",
                "mal",
                "mar",
                "mkd",
                "mlt",
                "mon",
                "mri",
                "msa",
                "mya",
                "nep",
                "nld",
                "nor",
                "oci",
                "ori",
                "pan",
                "pol",
                "por",
                "pus",
                "que",
                "ron",
                "rus",
                "san",
                "sin",
                "slk",
                "slv",
                "snd",
                "spa",
                "spa_old",
                "sqi",
                "srp",
                "srp_latn",
                "sun",
                "swa",
                "swe",
                "syr",
                "tam",
                "tat",
                "tel",
                "tgk",
                "tha",
                "tir",
                "ton",
                "tur",
                "uig",
                "ukr",
                "urd",
                "uzb",
                "uzb_cyrl",
                "vie",
                "yid",
                "yor"
              ]
            },
            "default": [
              "eng"
            ]
          },
          "granularity": {
            "title": "Granularity",
            "enum": [
              "text",
              "lines",
              "words",
              "paragraphs"
            ],
            "type": "string",
            "description": "text returns plain text only; lines adds each line with its confidence and box; words adds each word with its confidence and box. paragraphs adds each paragraph with confidence and a box.",
            "default": "lines"
          },
          "minConfidence": {
            "title": "Minimum confidence",
            "minimum": 0,
            "maximum": 100,
            "type": "integer",
            "description": "Drop words read with a confidence below this (0–100), and lines left with no word; 0 keeps everything.",
            "default": 0
          },
          "layout": {
            "title": "Text layout",
            "enum": [
              "auto",
              "single_block",
              "single_line",
              "single_word",
              "sparse_text",
              "raw_line"
            ],
            "type": "string",
            "description": "Tesseract layout: auto (PSM 3), single_block (6), single_line (7), single_word (8), sparse_text (11), raw_line (13). No automatic detection of selected language.",
            "default": "auto"
          },
          "threshold": {
            "title": "Threshold image",
            "type": "boolean",
            "description": "Use a fixed 128 grayscale threshold before OCR; off preserves the existing grayscale and resize path.",
            "default": false
          },
          "normalizeBoxes": {
            "title": "Normalized boxes",
            "type": "boolean",
            "description": "Add boxNorm with x,y,w,h in 0–1 image coordinates beside each pixel box.",
            "default": false
          },
          "includeMarkdown": {
            "title": "Include Markdown",
            "type": "boolean",
            "description": "Add escaped Markdown text, preserving source lines and paragraphs without inventing headings.",
            "default": false
          },
          "includeConfidence": {
            "title": "Include mean confidence",
            "type": "boolean",
            "description": "Add mean confidence of kept words (0–100), or null for no kept words.",
            "default": false
          }
        }
      },
      "runsResponseSchema": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "actId": {
                "type": "string"
              },
              "userId": {
                "type": "string"
              },
              "startedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "finishedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "status": {
                "type": "string",
                "example": "READY"
              },
              "meta": {
                "type": "object",
                "properties": {
                  "origin": {
                    "type": "string",
                    "example": "API"
                  },
                  "userAgent": {
                    "type": "string"
                  }
                }
              },
              "stats": {
                "type": "object",
                "properties": {
                  "inputBodyLen": {
                    "type": "integer",
                    "example": 2000
                  },
                  "rebootCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "restartCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "resurrectCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "computeUnits": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "options": {
                "type": "object",
                "properties": {
                  "build": {
                    "type": "string",
                    "example": "latest"
                  },
                  "timeoutSecs": {
                    "type": "integer",
                    "example": 300
                  },
                  "memoryMbytes": {
                    "type": "integer",
                    "example": 1024
                  },
                  "diskMbytes": {
                    "type": "integer",
                    "example": 2048
                  }
                }
              },
              "buildId": {
                "type": "string"
              },
              "defaultKeyValueStoreId": {
                "type": "string"
              },
              "defaultDatasetId": {
                "type": "string"
              },
              "defaultRequestQueueId": {
                "type": "string"
              },
              "buildNumber": {
                "type": "string",
                "example": "1.0.0"
              },
              "containerUrl": {
                "type": "string"
              },
              "usage": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "integer",
                    "example": 1
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "usageTotalUsd": {
                "type": "number",
                "example": 0.00005
              },
              "usageUsd": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "number",
                    "example": 0.00005
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}