Koskamo

doc.cheap MCP

An official MCP server for doc.cheap that provides tools for passport, ID, and driver license OCR recognition. It allows AI agents to scan documents, check API balances, search documentation, and manage stored scans via a thin client connecting to the public HTTP API.

Endpoint and access

No sign-in to connect and list tools. Individual tools may still need a vendor account, credentials, or permissions; check the documented prerequisites.

doc.cheap MCP logo, by doc.cheapVendor evidenceStreamable HTTPNo sign-inEndpoint checked 2026-11-23Operated by doc.cheap
You need:Set DOC_CHEAP_API_KEY to your key.Send your key as X-Doc-Cheap-Api-Key: sk_live_your_key or Authorization: Bearer sk_live_your_key .
MCP endpoint (Streamable HTTP)
https://mcp.doc.cheap/mcp
Vendor documentation

What its tools do

6 tools, grouped by the hints the server advertises. Hints are self-declared, not verified behavior.

Can change data (2)

6 of 6 have a description · 6 of 6 declare behavior hints · 5 of 5 with parameters document them all

Checks and signals

Each line is separate evidence, not a trust score.

  • Passed Endpoint answered the live check ·
  • Passed Official MCP Registry namespace is tied to doc.cheap ·
  • Passed Endpoint is on the registry namespace domain ·
  • Uptime 100% over 90 days
  • Availability 2 of 2 checks passed in 30 days

About doc.cheap MCP

This server connects to the doc.cheap public HTTP API to handle identity document processing. It offers capabilities for optical character recognition on passports, IDs, and driver licenses. Agents can also verify account status and query the provider's documentation.

The available tools allow for managing previously uploaded files. Users can list, retrieve, or remove stored scans. The server also includes a function to initiate new document scans and a search utility for documentation.

Connection to the server does not require authentication. However, executing specific tools likely requires valid credentials. You must provide an API key via the X-Doc-Cheap-Api-Key header or the Authorization header. Setting the DOC_CHEAP_API_KEY environment variable is also supported.

What you can do with it

  • Recognize passports and IDs
  • Check API balance
  • Search documentation
  • Manage stored scans

Source and maintenance

Vendor evidenceRegistry 0.3.10
Maintenance checked

Protocol and capabilities

Server
doc-cheap-mcp 0.3.11
MCP protocol negotiated in check
2025-11-25
Tools
6 advertised
Resources
71 advertised
Resource templates
1 advertised
Prompts
4 advertised
Server-advertised capabilities
{
  "tools": {
    "listChanged": true
  },
  "prompts": {
    "listChanged": true
  },
  "resources": {}
}

Server-provided instructions

Untrusted server output shown for inspection. It is not Koskamo guidance and is excluded from knowledge search.

This server recognises identity documents: give it a photo or scan of a passport, national ID card or driver's licence and it returns what is printed on the document as structured JSON. Reach for scan_document whenever someone shares such a document and wants it read, transcribed or checked – it draws one credit ($0.01) per document actually recognised and nothing at all when the image holds no readable document. Call check_balance before working through a batch, and search_docs for field names, error codes, MRZ rules and anything else about the API rather than guessing at them. list_scans, get_scan and delete_scan find, read back and delete results a live key has already stored.

Tools

6 advertised

scan_document — Recognise a passport or ID document
Advertised by the server during the last successful anonymous check.
Open-world

Recognise a passport, national ID card or driver's licence from a photo or scan and return what is printed on it as structured JSON. Inputs: the image as image_base64 or image_url (https, on a public address); plus the optional expect_country, return_portrait, retain_hours, reference and idempotency_key. Output: a Scan object – meta (id, status, billed, confidence, timing), document (kind, issuing country, number, series, date of issue, date of expiry, whether it has expired and how many days are left), holder (given names, surname, date of birth, sex, nationality) – country codes are the document's own three-letter ICAO codes, each with a *_detail object giving the code as written, its ISO 3166-1 alpha-3 and alpha-2 and its category, fields (every field read off the printed page, each with its own confidence), mrz (whether the machine-readable zone checks out, why not when it does not, and its lines exactly as read), images, quality and authenticity – plus a one-line summary of the same result. Calls POST /v1/scans. Cost: it bills one credit ($0.01) only when a document is recognised; an unreadable image, an empty frame or an unsupported type costs nothing, and meta.billed says which happened. Without a key, the public sandbox key is used. It gives 10 free recognised documents per address in all, and at most 10 requests per address an hour, whatever their answer. Registering gives 100 free documents every month. Use test images only, never a real document. Use it whenever someone hands over an identity document and wants it read, transcribed, or checked against what they claim – a name, a document number, a date of birth or an expiry date.

scan_document input schema
{
  "type": "object",
  "$schema": "http://json-schema.org/draft-07/schema#",
  "properties": {
    "image_url": {
      "type": "string",
      "description": "https: URL of an image on a public internet address, which the server fetches (25 MB maximum)."
    },
    "reference": {
      "type": "string",
      "maxLength": 128,
      "description": "Your own correlation string, echoed back in the result."
    },
    "image_base64": {
      "type": "string",
      "description": "The document image as base64 (a data: URL is also accepted)."
    },
    "retain_hours": {
      "type": "integer",
      "maximum": 8760,
      "minimum": 0,
      "description": "Hours the result stays readable via GET /v1/scans/{id} (0 = store nothing). Omit it to use the account's own history-retention setting."
    },
    "expect_country": {
      "type": "string",
      "maxLength": 3,
      "minLength": 3,
      "description": "ISO 3166-1 alpha-3 country you expect, or omit for any."
    },
    "idempotency_key": {
      "type": "string",
      "description": "Makes a retried scan return the first result instead of charging again."
    },
    "return_portrait": {
      "type": "boolean",
      "description": "Whether to include the holder photograph crop, images.main_photo (default true)."
    }
  }
}
scan_document output schema
{
  "type": "object",
  "$schema": "http://json-schema.org/draft-07/schema#",
  "required": [
    "meta",
    "document",
    "holder",
    "fields",
    "mrz",
    "images",
    "quality",
    "authenticity"
  ],
  "properties": {
    "mrz": {
      "$ref": "#/definitions/ScanMrz"
    },
    "meta": {
      "$ref": "#/definitions/ScanMeta"
    },
    "fields": {
      "type": "array",
      "items": {
        "$ref": "#/definitions/ScanField"
      },
      "description": "Every field the engine extracted off the printed document, re-keyed to our vocabulary – the open set. Always present; empty when nothing was extracted. A field read in more than one language appears once per language, so `name` repeats and only `id` is unique."
    },
    "holder": {
      "anyOf": [
        {
          "$ref": "#/definitions/ScanHolder"
        },
        {
          "type": "null"
        }
      ]
    },
    "images": {
      "$ref": "#/definitions/ScanImages"
    },
    "quality": {
      "$ref": "#/definitions/ScanQuality"
    },
    "document": {
      "anyOf": [
        {
          "$ref": "#/definitions/ScanDocument"
        },
        {
          "type": "null"
        }
      ]
    },
    "authenticity": {
      "$ref": "#/definitions/ScanAuthenticity"
    }
  },
  "definitions": {
    "ScanId": {
      "type": "string",
      "example": "01a0af18-cd8d-7a61-9f2d-4c7b8e105da3",
      "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$",
      "description": "Scan identifier: a UUID version 7 (RFC 9562), canonical lower-case `8-4-4-4-12`. Its leading 48 bits are the millisecond the scan was made, so ids sort in the order the scans happened – but treat the value as opaque: nothing else about it is part of the contract."
    },
    "ScanMrz": {
      "type": "object",
      "required": [
        "status",
        "reason",
        "lines",
        "text"
      ],
      "properties": {
        "text": {
          "type": [
            "string",
            "null"
          ],
          "description": "The same lines run together with nothing between them: one unbroken string, with no newlines and no spaces. Null when there are none."
        },
        "lines": {
          "anyOf": [
            {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            {
              "type": "null"
            }
          ],
          "description": "The zone's lines in order, exactly as read – two for a TD3 passport, three for a TD1 card. The zone's alphabet is `A-Z`, `0-9` and the filler `<`, so a line carries no whitespace. Null when the document carries none."
        },
        "reason": {
          "type": [
            "string",
            "null"
          ],
          "example": "Check digit failed for: document number, date of birth",
          "description": "One plain sentence naming what did not check out, for `failed`; null otherwise."
        },
        "status": {
          "$ref": "#/definitions/MrzStatus"
        }
      },
      "additionalProperties": false
    },
    "ScanMeta": {
      "type": "object",
      "required": [
        "schema_version",
        "id",
        "status",
        "billed",
        "confidence",
        "timing",
        "created_at",
        "reference"
      ],
      "properties": {
        "id": {
          "$ref": "#/definitions/ScanId"
        },
        "billed": {
          "type": "boolean",
          "description": "Whether the scan met the billing rule. On a live key, `true` means one credit was charged. On a sandbox key nothing is ever charged, and the flag only shows whether the same scan would have been."
        },
        "status": {
          "$ref": "#/definitions/ScanStatus"
        },
        "timing": {
          "anyOf": [
            {
              "$ref": "#/definitions/ScanTiming"
            },
            {
              "type": "null"
            }
          ]
        },
        "reference": {
          "type": [
            "string",
            "null"
          ],
          "description": "The request's `reference`, echoed back."
        },
        "confidence": {
          "allOf": [
            {
              "$ref": "#/definitions/ConfidenceBand"
            }
          ],
          "description": "How strongly the recognition backs this reading as a whole. Each entry of `fields` carries its own band as well, and they can differ from this one."
        },
        "created_at": {
          "type": "string",
          "format": "date-time",
          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
          "description": "Timestamp, ISO-8601 in UTC (`YYYY-MM-DDTHH:MM:SSZ`)."
        },
        "schema_version": {
          "type": "string",
          "const": "1.0",
          "description": "The version of this body, always `1.0`. A consumer that pins this value checks that the body is the one it was written against."
        }
      },
      "additionalProperties": false
    },
    "MrzStatus": {
      "enum": [
        "passed",
        "failed",
        "absent"
      ],
      "type": "string",
      "description": "Verdict on the machine-readable zone: `passed` (present, every check digit valid and nothing contradicting the printed page), `failed` (present but something did not check out) or `absent` (the document carries none)."
    },
    "ScanCheck": {
      "type": "object",
      "required": [
        "name",
        "label",
        "result",
        "detail"
      ],
      "properties": {
        "name": {
          "type": "string",
          "minLength": 1,
          "description": "Our stable snake_case key for this check."
        },
        "label": {
          "type": "string",
          "minLength": 1,
          "description": "Our human label for this check."
        },
        "detail": {
          "type": [
            "string",
            "null"
          ],
          "description": "One plain sentence about what this check saw, or null when it has nothing to add."
        },
        "result": {
          "$ref": "#/definitions/CheckResult"
        }
      },
      "additionalProperties": false
    },
    "ScanField": {
      "type": "object",
      "required": [
        "id",
        "name",
        "label",
        "category",
        "value",
        "language",
        "confidence"
      ],
      "properties": {
        "id": {
          "type": "string",
          "example": "surname@1032",
          "minLength": 1,
          "description": "Identity of this entry, unique across `fields`: the key and the language identifier the value was read as, plus an occurrence counter when the same pair is reported twice. `name` is the semantic key and repeats – a document that carries a field in two scripts yields one entry per language – so use `id`, not `name`, to address or key a single entry."
        },
        "name": {
          "type": "string",
          "example": "surname",
          "minLength": 1,
          "description": "Our stable snake_case key."
        },
        "label": {
          "type": "string",
          "example": "Surname",
          "minLength": 1,
          "description": "Our human label."
        },
        "value": {
          "type": [
            "string",
            "null"
          ],
          "description": "The value of this reading: the national-script spelling on a national-script reading, the transliterated Latin value on the default reading (the one whose `id` carries the identifier `0`). Null when the field is empty."
        },
        "category": {
          "$ref": "#/definitions/FieldCategory"
        },
        "language": {
          "type": [
            "string",
            "null"
          ],
          "example": "Greek",
          "description": "The language this reading was made in, e.g. `Greek`. The default Latin-script reading – the document's own Latin page and the machine-readable zone, `id` suffix `@0` – is `English`. Null only on `days_to_expire`, a number computed from the expiry date rather than text read in any language."
        },
        "confidence": {
          "$ref": "#/definitions/ConfidenceBand"
        }
      },
      "additionalProperties": false
    },
    "ScanHolder": {
      "type": "object",
      "required": [
        "given_names",
        "surname",
        "full_name",
        "birth_date",
        "sex",
        "nationality",
        "nationality_detail"
      ],
      "properties": {
        "sex": {
          "anyOf": [
            {
              "enum": [
                "M",
                "F",
                "X"
              ],
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "description": "The sex the document states: `M`, `F`, or `X` for unspecified. Null when none was read."
        },
        "surname": {
          "type": [
            "string",
            "null"
          ],
          "description": "The holder's surname, as printed. Null when none was read."
        },
        "full_name": {
          "type": [
            "string",
            "null"
          ],
          "description": "The holder's name as the document prints it in one combined field. Null when the document carries no such field – it is not composed from the two above."
        },
        "birth_date": {
          "anyOf": [
            {
              "type": "string",
              "format": "date",
              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
              "description": "Calendar date, ISO-8601 (`YYYY-MM-DD`)."
            },
            {
              "type": "null"
            }
          ],
          "description": "The holder's date of birth, ISO-8601 (`YYYY-MM-DD`). Null when none was read."
        },
        "given_names": {
          "type": [
            "string",
            "null"
          ],
          "description": "The holder's given names, as printed. Null when none was read."
        },
        "nationality": {
          "anyOf": [
            {
              "type": "string",
              "example": "GRC",
              "pattern": "^[A-Z]{3}$",
              "description": "Three-letter country code as the document writes it (ICAO Doc 9303): the ISO 3166-1 alpha-3 code for almost every state, Germany's `D` given as `DEU`, and the ICAO codes ISO lacks (for example `GBD`, `RKS`, `XXA`) passed through as read. The matching `*_detail` object says which of these it is."
            },
            {
              "type": "null"
            }
          ],
          "description": "The holder's nationality, the three-letter code the document writes. Null when none was read; it is not assumed from the issuing state."
        },
        "nationality_detail": {
          "anyOf": [
            {
              "$ref": "#/definitions/CountryCodeDetail"
            },
            {
              "type": "null"
            }
          ],
          "description": "The nationality code resolved: as written, as ISO 3166-1 alpha-3 and alpha-2, and its category – `stateless` or `refugee` for a holder without a nationality. Null when no code was read."
        }
      },
      "additionalProperties": false
    },
    "ScanImages": {
      "type": "object",
      "required": [
        "document_crop",
        "rear",
        "main_photo",
        "signature",
        "watermark_face",
        "barcode",
        "chip"
      ],
      "properties": {
        "chip": {
          "anyOf": [
            {
              "type": "string",
              "pattern": "^data:image\\/(jpeg|png);base64,[A-Za-z0-9+/]+={0,2}$",
              "description": "Image as a `data:` URL with base64 payload."
            },
            {
              "type": "null"
            }
          ],
          "description": "The chip area of the document, when it carries one."
        },
        "rear": {
          "anyOf": [
            {
              "type": "string",
              "pattern": "^data:image\\/(jpeg|png);base64,[A-Za-z0-9+/]+={0,2}$",
              "description": "Image as a `data:` URL with base64 payload."
            },
            {
              "type": "null"
            }
          ],
          "description": "The reverse side of the document, when the picture carried one and a crop of it was produced."
        },
        "barcode": {
          "anyOf": [
            {
              "type": "string",
              "pattern": "^data:image\\/(jpeg|png);base64,[A-Za-z0-9+/]+={0,2}$",
              "description": "Image as a `data:` URL with base64 payload."
            },
            {
              "type": "null"
            }
          ],
          "description": "The barcode area of the document, when it carries one."
        },
        "signature": {
          "anyOf": [
            {
              "type": "string",
              "pattern": "^data:image\\/(jpeg|png);base64,[A-Za-z0-9+/]+={0,2}$",
              "description": "Image as a `data:` URL with base64 payload."
            },
            {
              "type": "null"
            }
          ],
          "description": "The holder's signature as printed on the document."
        },
        "main_photo": {
          "anyOf": [
            {
              "type": "string",
              "pattern": "^data:image\\/(jpeg|png);base64,[A-Za-z0-9+/]+={0,2}$",
              "description": "Image as a `data:` URL with base64 payload."
            },
            {
              "type": "null"
            }
          ],
          "description": "The holder's photograph as printed on the document."
        },
        "document_crop": {
          "anyOf": [
            {
              "type": "string",
              "pattern": "^data:image\\/(jpeg|png);base64,[A-Za-z0-9+/]+={0,2}$",
              "description": "Image as a `data:` URL with base64 payload."
            },
            {
              "type": "null"
            }
          ],
          "description": "The document itself, cropped out of the uploaded picture and deskewed – the front side of a card, the data page of a booklet."
        },
        "watermark_face": {
          "anyOf": [
            {
              "type": "string",
              "pattern": "^data:image\\/(jpeg|png);base64,[A-Za-z0-9+/]+={0,2}$",
              "description": "Image as a `data:` URL with base64 payload."
            },
            {
              "type": "null"
            }
          ],
          "description": "The faint second copy of the holder's face printed into the page as a security feature – a different image from `main_photo`, and the one a verifier compares against it. Null when the document carries none."
        }
      },
      "description": "Image crops, returned in the recognition response only. Each is scaled down by height, proportionally and never upwards, to at most 250 px for `document_crop` and 100 px for every other crop, then re-encoded with every metadata block dropped.",
      "additionalProperties": false
    },
    "ScanStatus": {
      "enum": [
        "recognized",
        "no_document_found",
        "unreadable",
        "unsupported_document",
        "rejected"
      ],
      "type": "string",
      "description": "Outcome of a scan. Exactly these five string values; there are no numeric codes."
    },
    "ScanTiming": {
      "type": "object",
      "required": [
        "upload_ms",
        "processing_ms",
        "total_ms"
      ],
      "properties": {
        "total_ms": {
          "type": "integer",
          "maximum": 9007199254740991,
          "minimum": 0,
          "description": "From the request arriving to the result being complete. At least `upload_ms + processing_ms`; the remainder is the gates that run after `upload_ms` is taken – the allowance, the idempotency check and the credit hold – plus preparing the result images and mapping the engine's output into this body. It stops there: writing the history row and serializing the response happen after the number is fixed, so the same figure is stored and returned."
        },
        "upload_ms": {
          "type": "integer",
          "maximum": 9007199254740991,
          "minimum": 0,
          "description": "From the request's headers reaching the server to its body being received and validated, with your key resolved and its rate limit checked. The allowance, idempotency and credit gates are claimed after this number is taken, so they are not in it. Dominated by your own connection and by how large the image is – this is the half you can shrink, by sending a smaller picture from closer by."
        },
        "processing_ms": {
          "type": "integer",
          "maximum": 9007199254740991,
          "minimum": 0,
          "description": "The recognition itself – the server-side engine call."
        }
      },
      "description": "The split of the request's time. Null on a scan made before the split existed and read back out of storage: only the engine call was timed then, and the two halves cannot be recovered from it.",
      "additionalProperties": false
    },
    "CheckResult": {
      "enum": [
        "pass",
        "warn",
        "fail"
      ],
      "type": "string",
      "description": "Outcome of a single check."
    },
    "ScanQuality": {
      "type": "object",
      "required": [
        "overall"
      ],
      "properties": {
        "overall": {
          "enum": [
            "not_checked",
            "pass",
            "warn",
            "fail"
          ],
          "type": "string",
          "description": "Whether the uploaded picture was good enough to recognize from. `not_checked` when nothing measured it – a scan read back from storage, which keeps no engine output."
        }
      },
      "additionalProperties": false
    },
    "ScanDocument": {
      "type": "object",
      "required": [
        "kind",
        "country",
        "country_name",
        "issuing_state",
        "issuing_state_detail",
        "type_name",
        "type_confidence",
        "number",
        "series",
        "issue_date",
        "expiry_date",
        "is_expired",
        "days_remaining"
      ],
      "properties": {
        "kind": {
          "type": "string",
          "minLength": 1,
          "description": "Document type, e.g. `passport`."
        },
        "number": {
          "type": [
            "string",
            "null"
          ],
          "example": "AM7304518",
          "description": "The document number, as printed. Null when none was read. A series the document prints separately is in `series`, never folded into this value."
        },
        "series": {
          "type": [
            "string",
            "null"
          ],
          "description": "The document series, for a document that prints one as a field of its own. Null when the document carries none or none was read; it is never split out of `number`."
        },
        "country": {
          "anyOf": [
            {
              "type": "string",
              "example": "GRC",
              "pattern": "^[A-Z]{3}$",
              "description": "Three-letter country code as the document writes it (ICAO Doc 9303): the ISO 3166-1 alpha-3 code for almost every state, Germany's `D` given as `DEU`, and the ICAO codes ISO lacks (for example `GBD`, `RKS`, `XXA`) passed through as read. The matching `*_detail` object says which of these it is."
            },
            {
              "type": "null"
            }
          ],
          "description": "The state that issued the document, as its three-letter code. The same reading as `issuing_state` under the name most callers filter on; null when nothing was read."
        },
        "type_name": {
          "type": [
            "string",
            "null"
          ],
          "example": "Greece - Passport",
          "description": "The document type under its full name. Null on a scan read back from storage, which keeps no engine output."
        },
        "is_expired": {
          "type": [
            "boolean",
            "null"
          ],
          "description": "Whether the document had already expired when the scan was made. Null when no expiry date was read, which is a different answer from `false`."
        },
        "issue_date": {
          "anyOf": [
            {
              "type": "string",
              "format": "date",
              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
              "description": "Calendar date, ISO-8601 (`YYYY-MM-DD`)."
            },
            {
              "type": "null"
            }
          ],
          "description": "The date the document was issued, ISO-8601 (`YYYY-MM-DD`). Null when none was read."
        },
        "expiry_date": {
          "anyOf": [
            {
              "type": "string",
              "format": "date",
              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
              "description": "Calendar date, ISO-8601 (`YYYY-MM-DD`)."
            },
            {
              "type": "null"
            }
          ],
          "description": "The date the document expires, ISO-8601 (`YYYY-MM-DD`). Null when none was read; `is_expired` and `days_remaining` are computed from it."
        },
        "country_name": {
          "type": [
            "string",
            "null"
          ],
          "example": "Greece",
          "description": "The issuing state's name, as read from the document."
        },
        "issuing_state": {
          "anyOf": [
            {
              "type": "string",
              "example": "GRC",
              "pattern": "^[A-Z]{3}$",
              "description": "Three-letter country code as the document writes it (ICAO Doc 9303): the ISO 3166-1 alpha-3 code for almost every state, Germany's `D` given as `DEU`, and the ICAO codes ISO lacks (for example `GBD`, `RKS`, `XXA`) passed through as read. The matching `*_detail` object says which of these it is."
            },
            {
              "type": "null"
            }
          ],
          "description": "The issuing state, the three-letter code the document writes – the same reading as `country`, under the name the machine-readable zone gives it."
        },
        "days_remaining": {
          "anyOf": [
            {
              "type": "integer",
              "maximum": 9007199254740991,
              "minimum": -9007199254740991
            },
            {
              "type": "null"
            }
          ],
          "description": "Days until expiry at the time of the scan; negative once expired."
        },
        "type_confidence": {
          "allOf": [
            {
              "$ref": "#/definitions/ConfidenceBand"
            }
          ],
          "description": "How strongly the document-type match is backed."
        },
        "issuing_state_detail": {
          "anyOf": [
            {
              "$ref": "#/definitions/CountryCodeDetail"
            },
            {
              "type": "null"
            }
          ],
          "description": "The issuing state's code resolved: as written, as ISO 3166-1 alpha-3 and alpha-2, and its category. Null when no code was read."
        }
      },
      "additionalProperties": false
    },
    "FieldCategory": {
      "enum": [
        "identity",
        "document",
        "dates",
        "address",
        "visa",
        "other"
      ],
      "type": "string",
      "description": "Which group of the report a field belongs to."
    },
    "ConfidenceBand": {
      "enum": [
        "low",
        "medium",
        "high"
      ],
      "type": "string",
      "description": "How strongly the recognition backs this value: `high`, `medium` or `low`. An unknown or missing probability reads as `low`."
    },
    "ScanAuthenticity": {
      "type": "object",
      "required": [
        "overall",
        "checks"
      ],
      "properties": {
        "checks": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/ScanCheck"
          },
          "description": "One entry per authenticity check that ran. Always present; empty under the recognition-only scenario, where nothing ran."
        },
        "overall": {
          "enum": [
            "not_checked",
            "pass",
            "warn",
            "fail"
          ],
          "type": "string",
          "description": "`not_checked` under the recognition-only scenario; populated by authenticity verification later."
        }
      },
      "additionalProperties": false
    },
    "CountryCodeDetail": {
      "type": "object",
      "required": [
        "code",
        "alpha3",
        "alpha2",
        "category"
      ],
      "properties": {
        "code": {
          "type": "string",
          "example": "D",
          "pattern": "^[A-Z]{1,3}$",
          "description": "The code as the document writes it, without the zone's `<` filler: `D` for Germany, `GBD` for a British Overseas Territories citizen."
        },
        "alpha2": {
          "anyOf": [
            {
              "type": "string",
              "pattern": "^[A-Z]{2}$"
            },
            {
              "type": "null"
            }
          ],
          "example": "DE",
          "description": "The ISO 3166-1 alpha-2 code of the same state, or null with `alpha3`."
        },
        "alpha3": {
          "anyOf": [
            {
              "type": "string",
              "pattern": "^[A-Z]{3}$"
            },
            {
              "type": "null"
            }
          ],
          "example": "DEU",
          "description": "The ISO 3166-1 alpha-3 code of the state the code stands for, or null when ISO has none (Kosovo, organisations, stateless persons, refugees, specimens, unknown codes)."
        },
        "category": {
          "$ref": "#/definitions/CountryCodeCategory"
        }
      },
      "description": "A document's country code resolved: the code as written, its ISO 3166-1 codes when ISO has them, and what kind of code it is.",
      "additionalProperties": false
    },
    "CountryCodeCategory": {
      "enum": [
        "iso",
        "icao_variant",
        "british_nationality",
        "kosovo",
        "united_nations",
        "organization",
        "stateless",
        "refugee",
        "unspecified",
        "deprecated",
        "specimen",
        "unknown"
      ],
      "type": "string",
      "description": "What a document's country code is. `iso`: an ISO 3166-1 alpha-3 code. `icao_variant`: an ICAO spelling of an ISO state (`D` for Germany). `british_nationality`: a British nationality class (`GBD`, `GBN`, `GBO`, `GBP`, `GBS`). `kosovo`: `RKS`, which ISO does not list. `united_nations`: `UNO`, `UNA`, `UNK`. `organization`: an issuing authority that is not a state (`EUE`, `XPO`, `IAO` and the other `X..` codes of ICAO Doc 9303). `stateless`: `XXA`. `refugee`: `XXB`, `XXC`. `unspecified`: `XXX`. `deprecated`: a code ISO has withdrawn (`ANT`, `NTZ`). `specimen`: `UTO`, the fictional state of specimen documents. `unknown`: a code in none of these lists."
    }
  },
  "additionalProperties": false
}
scan_document annotations
{
  "readOnlyHint": false,
  "openWorldHint": true,
  "idempotentHint": true,
  "destructiveHint": false
}
check_balance — Check remaining credits
Advertised by the server during the last successful anonymous check.
Advertised read-onlyOpen-world

Return how many credits are left on the account and what the current period has used: the balance, split into this month's free credits (100 every month, drawn first) and the paid credits, the credits spent, and the scan counters broken down by status (recognized, unreadable, no document found, unsupported document, rejected). Takes no arguments and calls GET /v1/usage; under the public sandbox key it answers without calling anything. One recognised document draws one credit, at $0.01; scans that recognised nothing are counted and never charged. Needs a real API key – under the public sandbox key there is no account behind the call, and the answer says so instead of reporting zeros that read like a balance. Use it before working through a batch of documents, or when a scan is refused for lack of credit.

check_balance input schema
{
  "type": "object",
  "$schema": "http://json-schema.org/draft-07/schema#",
  "properties": {}
}
check_balance output schema
{
  "type": "object",
  "$schema": "http://json-schema.org/draft-07/schema#",
  "required": [
    "balance_credits",
    "period",
    "scans",
    "credits_spent",
    "free_allowance",
    "paid_balance_credits",
    "credits_spent_by_kind"
  ],
  "properties": {
    "scans": {
      "type": "object",
      "required": [
        "total",
        "billed",
        "by_status"
      ],
      "properties": {
        "total": {
          "type": "integer",
          "maximum": 9007199254740991,
          "minimum": 0
        },
        "billed": {
          "type": "integer",
          "maximum": 9007199254740991,
          "minimum": 0
        },
        "by_status": {
          "type": "object",
          "required": [
            "recognized",
            "no_document_found",
            "unreadable",
            "unsupported_document",
            "rejected"
          ],
          "properties": {
            "rejected": {
              "type": "integer",
              "maximum": 9007199254740991,
              "minimum": 0
            },
            "recognized": {
              "type": "integer",
              "maximum": 9007199254740991,
              "minimum": 0
            },
            "unreadable": {
              "type": "integer",
              "maximum": 9007199254740991,
              "minimum": 0
            },
            "no_document_found": {
              "type": "integer",
              "maximum": 9007199254740991,
              "minimum": 0
            },
            "unsupported_document": {
              "type": "integer",
              "maximum": 9007199254740991,
              "minimum": 0
            }
          },
          "additionalProperties": false
        }
      },
      "additionalProperties": false
    },
    "period": {
      "type": "object",
      "required": [
        "start",
        "end"
      ],
      "properties": {
        "end": {
          "type": "string",
          "format": "date-time",
          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
        },
        "start": {
          "type": "string",
          "format": "date-time",
          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
        }
      },
      "description": "Bounds of the current usage period (UTC calendar month).",
      "additionalProperties": false
    },
    "credits_spent": {
      "type": "integer",
      "maximum": 9007199254740991,
      "minimum": 0,
      "description": "Credits charged within the period."
    },
    "free_allowance": {
      "anyOf": [
        {
          "type": "object",
          "required": [
            "monthly_credits",
            "remaining_credits",
            "resets_at"
          ],
          "properties": {
            "resets_at": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date-time",
                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
                },
                {
                  "type": "null"
                }
              ],
              "description": "When the free credits are next set back to the monthly amount (00:00 UTC on the first of the next month); null when there is no next monthly amount."
            },
            "monthly_credits": {
              "type": "integer",
              "maximum": 9007199254740991,
              "minimum": 0,
              "description": "Free credits the account is set back to at the start of each UTC calendar month: 100 every month."
            },
            "remaining_credits": {
              "type": "integer",
              "maximum": 9007199254740991,
              "minimum": 0,
              "description": "Free credits left this month."
            }
          },
          "additionalProperties": false
        },
        {
          "type": "null"
        }
      ],
      "description": "This month's free credits, drawn before paid credits; null when the account may not draw free credits (its email address is not confirmed, or its free credits were withdrawn) and for a key with no account."
    },
    "balance_credits": {
      "anyOf": [
        {
          "type": "integer",
          "maximum": 9007199254740991,
          "minimum": -9007199254740991
        },
        {
          "type": "null"
        }
      ],
      "description": "Credits currently available to the account: this month's free credits plus the paid credits; null for a key with no account (the public sandbox key)."
    },
    "paid_balance_credits": {
      "anyOf": [
        {
          "type": "integer",
          "maximum": 9007199254740991,
          "minimum": 0
        },
        {
          "type": "null"
        }
      ],
      "description": "Paid credits: bought or granted to the account, drawn once this month's free credits are used up, and never reset; null only for a key with no account (the public sandbox key)."
    },
    "credits_spent_by_kind": {
      "type": "object",
      "required": [
        "free",
        "paid"
      ],
      "properties": {
        "free": {
          "type": "integer",
          "maximum": 9007199254740991,
          "minimum": 0
        },
        "paid": {
          "type": "integer",
          "maximum": 9007199254740991,
          "minimum": 0
        }
      },
      "description": "Credits charged within the period, by the kind that paid.",
      "additionalProperties": false
    }
  },
  "additionalProperties": false
}
check_balance annotations
{
  "readOnlyHint": true,
  "openWorldHint": true
}
search_docs — Search the doc.cheap API documentation
Advertised by the server during the last successful anonymous check.
Advertised read-only

Full-text search over the doc.cheap API documentation – endpoints, request options, every response field, the error codes and what to do about each, MRZ rules, retention and pricing. Takes a query and an optional limit (1 to 20, default 5), and answers with the matching sections: title, a snippet, and a link to the page. It reads a copy of the documentation shipped beside this server, so it makes no network call and works offline. Use it before guessing at a field name, an error code or a scan option – what it returns is the published contract rather than a recollection of it.

search_docs input schema
{
  "type": "object",
  "$schema": "http://json-schema.org/draft-07/schema#",
  "required": [
    "query"
  ],
  "properties": {
    "limit": {
      "type": "integer",
      "maximum": 20,
      "minimum": 1,
      "description": "Maximum number of results (default 5)."
    },
    "query": {
      "type": "string",
      "minLength": 1,
      "description": "What to search the documentation for."
    }
  }
}
search_docs output schema
{
  "type": "object",
  "$schema": "http://json-schema.org/draft-07/schema#",
  "required": [
    "results"
  ],
  "properties": {
    "results": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "title",
          "page",
          "link",
          "snippet",
          "score"
        ],
        "properties": {
          "link": {
            "type": "string",
            "description": "Address of the section on the documentation site."
          },
          "page": {
            "type": "string",
            "description": "Path of the page the section is on; empty for the home page."
          },
          "score": {
            "type": "number",
            "description": "Relevance: heading matches count five times a body match."
          },
          "title": {
            "type": "string",
            "description": "Heading of the matching documentation section."
          },
          "snippet": {
            "type": "string",
            "description": "The start of the section's text."
          }
        },
        "additionalProperties": false
      },
      "description": "Matching sections, best first; empty when nothing matched."
    }
  },
  "additionalProperties": false
}
search_docs annotations
{
  "readOnlyHint": true,
  "openWorldHint": false
}
list_scans — List stored scans
Advertised by the server during the last successful anonymous check.
Advertised read-onlyOpen-world

List the account's stored scans, most recent first, one page at a time. Inputs: the optional limit (1 to 100 rows, default 20) and cursor (the next_cursor of the previous page; omit it for the first page). Output: scans – one row per scan with id, status (recognized, unreadable, no_document_found, unsupported_document or rejected), billed, duration_ms, reference (your own string from the scan) and created_at – and next_cursor, which is null on the last page. A row holds no extracted data; call get_scan with its id for the full result. Calls GET /v1/scans; it never charges a credit. Only scans made with a live key under a non-zero retention window are stored for the account, and only until that window ends (retain_hours on the scan, or the account's history-retention setting, one year by default); a scan made with retain_hours 0 was never stored. A key reaches its own account's scans and no other account's. Under a sandbox key nothing can be read back: an account's own sk_sandbox_ key stores nothing, and the public key keeps every scan for one year, with a reduced thumbnail and the address it came from, where that key cannot read, list or delete it. Under the public sandbox key the answer is an empty list, given without calling the API. Errors: a cursor this API did not issue is refused (validation_failed); a key the API does not know is refused (unauthorized). Use it to find a scan made earlier – by its reference or its time – before reading or deleting it.

list_scans input schema
{
  "type": "object",
  "$schema": "http://json-schema.org/draft-07/schema#",
  "properties": {
    "limit": {
      "type": "integer",
      "maximum": 100,
      "minimum": 1,
      "description": "Rows per page, 1 to 100 (default 20)."
    },
    "cursor": {
      "type": "string",
      "minLength": 1,
      "description": "next_cursor from the previous page; omit it for the first page."
    }
  }
}
list_scans output schema
{
  "type": "object",
  "$schema": "http://json-schema.org/draft-07/schema#",
  "required": [
    "scans",
    "next_cursor"
  ],
  "properties": {
    "scans": {
      "type": "array",
      "items": {
        "$ref": "#/definitions/ScanSummary"
      },
      "description": "The account's scans, most recent first."
    },
    "next_cursor": {
      "type": [
        "string",
        "null"
      ],
      "description": "Opaque cursor for the next page: send it back as `cursor` to continue after the last row of this one. Null on the last page."
    }
  },
  "definitions": {
    "ScanId": {
      "type": "string",
      "example": "01a0af18-cd8d-7a61-9f2d-4c7b8e105da3",
      "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$",
      "description": "Scan identifier: a UUID version 7 (RFC 9562), canonical lower-case `8-4-4-4-12`. Its leading 48 bits are the millisecond the scan was made, so ids sort in the order the scans happened – but treat the value as opaque: nothing else about it is part of the contract."
    },
    "ScanStatus": {
      "enum": [
        "recognized",
        "no_document_found",
        "unreadable",
        "unsupported_document",
        "rejected"
      ],
      "type": "string",
      "description": "Outcome of a scan. Exactly these five string values; there are no numeric codes."
    },
    "ScanSummary": {
      "type": "object",
      "required": [
        "id",
        "status",
        "billed",
        "duration_ms",
        "reference",
        "created_at"
      ],
      "properties": {
        "id": {
          "$ref": "#/definitions/ScanId"
        },
        "billed": {
          "type": "boolean",
          "description": "Whether the scan met the billing rule. On a live key, `true` means one credit was charged. On a sandbox key nothing is ever charged, and the flag only shows whether the same scan would have been."
        },
        "status": {
          "$ref": "#/definitions/ScanStatus"
        },
        "reference": {
          "type": [
            "string",
            "null"
          ],
          "description": "The request's `reference`, echoed back."
        },
        "created_at": {
          "type": "string",
          "format": "date-time",
          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
          "description": "Timestamp, ISO-8601 in UTC (`YYYY-MM-DDTHH:MM:SSZ`)."
        },
        "duration_ms": {
          "type": "integer",
          "maximum": 9007199254740991,
          "minimum": 0,
          "description": "Server-side processing time of the scan in milliseconds."
        }
      },
      "additionalProperties": false
    }
  },
  "additionalProperties": false
}
list_scans annotations
{
  "readOnlyHint": true,
  "openWorldHint": true
}
get_scan — Fetch a stored scan
Advertised by the server during the last successful anonymous check.
Advertised read-onlyOpen-world

Fetch the full result of one stored scan by its id, as it was returned when the document was recognised. Input: scan_id – meta.id of a scan_document result, or id of a list_scans row. Output: the same Scan object scan_document returns (meta, document, holder, fields, mrz and the rest) plus a one-line summary, with two differences: the image crops are never stored, so every images slot is null, and quality reads not_checked. Calls GET /v1/scans/{id}; it never re-runs recognition and never charges a credit. Only scans made with a live key under a non-zero retention window are stored for the account, and only until that window ends (retain_hours on the scan, or the account's history-retention setting, one year by default); a scan made with retain_hours 0 was never stored. A key reaches its own account's scans and no other account's. Under a sandbox key nothing can be read back: an account's own sk_sandbox_ key stores nothing, and the public key keeps every scan for one year, with a reduced thumbnail and the address it came from, where that key cannot read, list or delete it. Errors: an id that is unknown, belongs to another account, was made with retain_hours 0 or has passed its window is refused as not_found – the cases are not told apart. Use it to read back a document recognised earlier instead of scanning the image again.

get_scan input schema
{
  "type": "object",
  "$schema": "http://json-schema.org/draft-07/schema#",
  "required": [
    "scan_id"
  ],
  "properties": {
    "scan_id": {
      "type": "string",
      "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$",
      "description": "The scan's id: meta.id of the scan_document result, or id of a list_scans row (a lower-case UUID)."
    }
  }
}
get_scan output schema
{
  "type": "object",
  "$schema": "http://json-schema.org/draft-07/schema#",
  "required": [
    "meta",
    "document",
    "holder",
    "fields",
    "mrz",
    "images",
    "quality",
    "authenticity"
  ],
  "properties": {
    "mrz": {
      "$ref": "#/definitions/ScanMrz"
    },
    "meta": {
      "$ref": "#/definitions/ScanMeta"
    },
    "fields": {
      "type": "array",
      "items": {
        "$ref": "#/definitions/ScanField"
      },
      "description": "Every field the engine extracted off the printed document, re-keyed to our vocabulary – the open set. Always present; empty when nothing was extracted. A field read in more than one language appears once per language, so `name` repeats and only `id` is unique."
    },
    "holder": {
      "anyOf": [
        {
          "$ref": "#/definitions/ScanHolder"
        },
        {
          "type": "null"
        }
      ]
    },
    "images": {
      "$ref": "#/definitions/ScanImages"
    },
    "quality": {
      "$ref": "#/definitions/ScanQuality"
    },
    "document": {
      "anyOf": [
        {
          "$ref": "#/definitions/ScanDocument"
        },
        {
          "type": "null"
        }
      ]
    },
    "authenticity": {
      "$ref": "#/definitions/ScanAuthenticity"
    }
  },
  "definitions": {
    "ScanId": {
      "type": "string",
      "example": "01a0af18-cd8d-7a61-9f2d-4c7b8e105da3",
      "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$",
      "description": "Scan identifier: a UUID version 7 (RFC 9562), canonical lower-case `8-4-4-4-12`. Its leading 48 bits are the millisecond the scan was made, so ids sort in the order the scans happened – but treat the value as opaque: nothing else about it is part of the contract."
    },
    "ScanMrz": {
      "type": "object",
      "required": [
        "status",
        "reason",
        "lines",
        "text"
      ],
      "properties": {
        "text": {
          "type": [
            "string",
            "null"
          ],
          "description": "The same lines run together with nothing between them: one unbroken string, with no newlines and no spaces. Null when there are none."
        },
        "lines": {
          "anyOf": [
            {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            {
              "type": "null"
            }
          ],
          "description": "The zone's lines in order, exactly as read – two for a TD3 passport, three for a TD1 card. The zone's alphabet is `A-Z`, `0-9` and the filler `<`, so a line carries no whitespace. Null when the document carries none."
        },
        "reason": {
          "type": [
            "string",
            "null"
          ],
          "example": "Check digit failed for: document number, date of birth",
          "description": "One plain sentence naming what did not check out, for `failed`; null otherwise."
        },
        "status": {
          "$ref": "#/definitions/MrzStatus"
        }
      },
      "additionalProperties": false
    },
    "ScanMeta": {
      "type": "object",
      "required": [
        "schema_version",
        "id",
        "status",
        "billed",
        "confidence",
        "timing",
        "created_at",
        "reference"
      ],
      "properties": {
        "id": {
          "$ref": "#/definitions/ScanId"
        },
        "billed": {
          "type": "boolean",
          "description": "Whether the scan met the billing rule. On a live key, `true` means one credit was charged. On a sandbox key nothing is ever charged, and the flag only shows whether the same scan would have been."
        },
        "status": {
          "$ref": "#/definitions/ScanStatus"
        },
        "timing": {
          "anyOf": [
            {
              "$ref": "#/definitions/ScanTiming"
            },
            {
              "type": "null"
            }
          ]
        },
        "reference": {
          "type": [
            "string",
            "null"
          ],
          "description": "The request's `reference`, echoed back."
        },
        "confidence": {
          "allOf": [
            {
              "$ref": "#/definitions/ConfidenceBand"
            }
          ],
          "description": "How strongly the recognition backs this reading as a whole. Each entry of `fields` carries its own band as well, and they can differ from this one."
        },
        "created_at": {
          "type": "string",
          "format": "date-time",
          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
          "description": "Timestamp, ISO-8601 in UTC (`YYYY-MM-DDTHH:MM:SSZ`)."
        },
        "schema_version": {
          "type": "string",
          "const": "1.0",
          "description": "The version of this body, always `1.0`. A consumer that pins this value checks that the body is the one it was written against."
        }
      },
      "additionalProperties": false
    },
    "MrzStatus": {
      "enum": [
        "passed",
        "failed",
        "absent"
      ],
      "type": "string",
      "description": "Verdict on the machine-readable zone: `passed` (present, every check digit valid and nothing contradicting the printed page), `failed` (present but something did not check out) or `absent` (the document carries none)."
    },
    "ScanCheck": {
      "type": "object",
      "required": [
        "name",
        "label",
        "result",
        "detail"
      ],
      "properties": {
        "name": {
          "type": "string",
          "minLength": 1,
          "description": "Our stable snake_case key for this check."
        },
        "label": {
          "type": "string",
          "minLength": 1,
          "description": "Our human label for this check."
        },
        "detail": {
          "type": [
            "string",
            "null"
          ],
          "description": "One plain sentence about what this check saw, or null when it has nothing to add."
        },
        "result": {
          "$ref": "#/definitions/CheckResult"
        }
      },
      "additionalProperties": false
    },
    "ScanField": {
      "type": "object",
      "required": [
        "id",
        "name",
        "label",
        "category",
        "value",
        "language",
        "confidence"
      ],
      "properties": {
        "id": {
          "type": "string",
          "example": "surname@1032",
          "minLength": 1,
          "description": "Identity of this entry, unique across `fields`: the key and the language identifier the value was read as, plus an occurrence counter when the same pair is reported twice. `name` is the semantic key and repeats – a document that carries a field in two scripts yields one entry per language – so use `id`, not `name`, to address or key a single entry."
        },
        "name": {
          "type": "string",
          "example": "surname",
          "minLength": 1,
          "description": "Our stable snake_case key."
        },
        "label": {
          "type": "string",
          "example": "Surname",
          "minLength": 1,
          "description": "Our human label."
        },
        "value": {
          "type": [
            "string",
            "null"
          ],
          "description": "The value of this reading: the national-script spelling on a national-script reading, the transliterated Latin value on the default reading (the one whose `id` carries the identifier `0`). Null when the field is empty."
        },
        "category": {
          "$ref": "#/definitions/FieldCategory"
        },
        "language": {
          "type": [
            "string",
            "null"
          ],
          "example": "Greek",
          "description": "The language this reading was made in, e.g. `Greek`. The default Latin-script reading – the document's own Latin page and the machine-readable zone, `id` suffix `@0` – is `English`. Null only on `days_to_expire`, a number computed from the expiry date rather than text read in any language."
        },
        "confidence": {
          "$ref": "#/definitions/ConfidenceBand"
        }
      },
      "additionalProperties": false
    },
    "ScanHolder": {
      "type": "object",
      "required": [
        "given_names",
        "surname",
        "full_name",
        "birth_date",
        "sex",
        "nationality",
        "nationality_detail"
      ],
      "properties": {
        "sex": {
          "anyOf": [
            {
              "enum": [
                "M",
                "F",
                "X"
              ],
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "description": "The sex the document states: `M`, `F`, or `X` for unspecified. Null when none was read."
        },
        "surname": {
          "type": [
            "string",
            "null"
          ],
          "description": "The holder's surname, as printed. Null when none was read."
        },
        "full_name": {
          "type": [
            "string",
            "null"
          ],
          "description": "The holder's name as the document prints it in one combined field. Null when the document carries no such field – it is not composed from the two above."
        },
        "birth_date": {
          "anyOf": [
            {
              "type": "string",
              "format": "date",
              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
              "description": "Calendar date, ISO-8601 (`YYYY-MM-DD`)."
            },
            {
              "type": "null"
            }
          ],
          "description": "The holder's date of birth, ISO-8601 (`YYYY-MM-DD`). Null when none was read."
        },
        "given_names": {
          "type": [
            "string",
            "null"
          ],
          "description": "The holder's given names, as printed. Null when none was read."
        },
        "nationality": {
          "anyOf": [
            {
              "type": "string",
              "example": "GRC",
              "pattern": "^[A-Z]{3}$",
              "description": "Three-letter country code as the document writes it (ICAO Doc 9303): the ISO 3166-1 alpha-3 code for almost every state, Germany's `D` given as `DEU`, and the ICAO codes ISO lacks (for example `GBD`, `RKS`, `XXA`) passed through as read. The matching `*_detail` object says which of these it is."
            },
            {
              "type": "null"
            }
          ],
          "description": "The holder's nationality, the three-letter code the document writes. Null when none was read; it is not assumed from the issuing state."
        },
        "nationality_detail": {
          "anyOf": [
            {
              "$ref": "#/definitions/CountryCodeDetail"
            },
            {
              "type": "null"
            }
          ],
          "description": "The nationality code resolved: as written, as ISO 3166-1 alpha-3 and alpha-2, and its category – `stateless` or `refugee` for a holder without a nationality. Null when no code was read."
        }
      },
      "additionalProperties": false
    },
    "ScanImages": {
      "type": "object",
      "required": [
        "document_crop",
        "rear",
        "main_photo",
        "signature",
        "watermark_face",
        "barcode",
        "chip"
      ],
      "properties": {
        "chip": {
          "anyOf": [
            {
              "type": "string",
              "pattern": "^data:image\\/(jpeg|png);base64,[A-Za-z0-9+/]+={0,2}$",
              "description": "Image as a `data:` URL with base64 payload."
            },
            {
              "type": "null"
            }
          ],
          "description": "The chip area of the document, when it carries one."
        },
        "rear": {
          "anyOf": [
            {
              "type": "string",
              "pattern": "^data:image\\/(jpeg|png);base64,[A-Za-z0-9+/]+={0,2}$",
              "description": "Image as a `data:` URL with base64 payload."
            },
            {
              "type": "null"
            }
          ],
          "description": "The reverse side of the document, when the picture carried one and a crop of it was produced."
        },
        "barcode": {
          "anyOf": [
            {
              "type": "string",
              "pattern": "^data:image\\/(jpeg|png);base64,[A-Za-z0-9+/]+={0,2}$",
              "description": "Image as a `data:` URL with base64 payload."
            },
            {
              "type": "null"
            }
          ],
          "description": "The barcode area of the document, when it carries one."
        },
        "signature": {
          "anyOf": [
            {
              "type": "string",
              "pattern": "^data:image\\/(jpeg|png);base64,[A-Za-z0-9+/]+={0,2}$",
              "description": "Image as a `data:` URL with base64 payload."
            },
            {
              "type": "null"
            }
          ],
          "description": "The holder's signature as printed on the document."
        },
        "main_photo": {
          "anyOf": [
            {
              "type": "string",
              "pattern": "^data:image\\/(jpeg|png);base64,[A-Za-z0-9+/]+={0,2}$",
              "description": "Image as a `data:` URL with base64 payload."
            },
            {
              "type": "null"
            }
          ],
          "description": "The holder's photograph as printed on the document."
        },
        "document_crop": {
          "anyOf": [
            {
              "type": "string",
              "pattern": "^data:image\\/(jpeg|png);base64,[A-Za-z0-9+/]+={0,2}$",
              "description": "Image as a `data:` URL with base64 payload."
            },
            {
              "type": "null"
            }
          ],
          "description": "The document itself, cropped out of the uploaded picture and deskewed – the front side of a card, the data page of a booklet."
        },
        "watermark_face": {
          "anyOf": [
            {
              "type": "string",
              "pattern": "^data:image\\/(jpeg|png);base64,[A-Za-z0-9+/]+={0,2}$",
              "description": "Image as a `data:` URL with base64 payload."
            },
            {
              "type": "null"
            }
          ],
          "description": "The faint second copy of the holder's face printed into the page as a security feature – a different image from `main_photo`, and the one a verifier compares against it. Null when the document carries none."
        }
      },
      "description": "Image crops, returned in the recognition response only. Each is scaled down by height, proportionally and never upwards, to at most 250 px for `document_crop` and 100 px for every other crop, then re-encoded with every metadata block dropped.",
      "additionalProperties": false
    },
    "ScanStatus": {
      "enum": [
        "recognized",
        "no_document_found",
        "unreadable",
        "unsupported_document",
        "rejected"
      ],
      "type": "string",
      "description": "Outcome of a scan. Exactly these five string values; there are no numeric codes."
    },
    "ScanTiming": {
      "type": "object",
      "required": [
        "upload_ms",
        "processing_ms",
        "total_ms"
      ],
      "properties": {
        "total_ms": {
          "type": "integer",
          "maximum": 9007199254740991,
          "minimum": 0,
          "description": "From the request arriving to the result being complete. At least `upload_ms + processing_ms`; the remainder is the gates that run after `upload_ms` is taken – the allowance, the idempotency check and the credit hold – plus preparing the result images and mapping the engine's output into this body. It stops there: writing the history row and serializing the response happen after the number is fixed, so the same figure is stored and returned."
        },
        "upload_ms": {
          "type": "integer",
          "maximum": 9007199254740991,
          "minimum": 0,
          "description": "From the request's headers reaching the server to its body being received and validated, with your key resolved and its rate limit checked. The allowance, idempotency and credit gates are claimed after this number is taken, so they are not in it. Dominated by your own connection and by how large the image is – this is the half you can shrink, by sending a smaller picture from closer by."
        },
        "processing_ms": {
          "type": "integer",
          "maximum": 9007199254740991,
          "minimum": 0,
          "description": "The recognition itself – the server-side engine call."
        }
      },
      "description": "The split of the request's time. Null on a scan made before the split existed and read back out of storage: only the engine call was timed then, and the two halves cannot be recovered from it.",
      "additionalProperties": false
    },
    "CheckResult": {
      "enum": [
        "pass",
        "warn",
        "fail"
      ],
      "type": "string",
      "description": "Outcome of a single check."
    },
    "ScanQuality": {
      "type": "object",
      "required": [
        "overall"
      ],
      "properties": {
        "overall": {
          "enum": [
            "not_checked",
            "pass",
            "warn",
            "fail"
          ],
          "type": "string",
          "description": "Whether the uploaded picture was good enough to recognize from. `not_checked` when nothing measured it – a scan read back from storage, which keeps no engine output."
        }
      },
      "additionalProperties": false
    },
    "ScanDocument": {
      "type": "object",
      "required": [
        "kind",
        "country",
        "country_name",
        "issuing_state",
        "issuing_state_detail",
        "type_name",
        "type_confidence",
        "number",
        "series",
        "issue_date",
        "expiry_date",
        "is_expired",
        "days_remaining"
      ],
      "properties": {
        "kind": {
          "type": "string",
          "minLength": 1,
          "description": "Document type, e.g. `passport`."
        },
        "number": {
          "type": [
            "string",
            "null"
          ],
          "example": "AM7304518",
          "description": "The document number, as printed. Null when none was read. A series the document prints separately is in `series`, never folded into this value."
        },
        "series": {
          "type": [
            "string",
            "null"
          ],
          "description": "The document series, for a document that prints one as a field of its own. Null when the document carries none or none was read; it is never split out of `number`."
        },
        "country": {
          "anyOf": [
            {
              "type": "string",
              "example": "GRC",
              "pattern": "^[A-Z]{3}$",
              "description": "Three-letter country code as the document writes it (ICAO Doc 9303): the ISO 3166-1 alpha-3 code for almost every state, Germany's `D` given as `DEU`, and the ICAO codes ISO lacks (for example `GBD`, `RKS`, `XXA`) passed through as read. The matching `*_detail` object says which of these it is."
            },
            {
              "type": "null"
            }
          ],
          "description": "The state that issued the document, as its three-letter code. The same reading as `issuing_state` under the name most callers filter on; null when nothing was read."
        },
        "type_name": {
          "type": [
            "string",
            "null"
          ],
          "example": "Greece - Passport",
          "description": "The document type under its full name. Null on a scan read back from storage, which keeps no engine output."
        },
        "is_expired": {
          "type": [
            "boolean",
            "null"
          ],
          "description": "Whether the document had already expired when the scan was made. Null when no expiry date was read, which is a different answer from `false`."
        },
        "issue_date": {
          "anyOf": [
            {
              "type": "string",
              "format": "date",
              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
              "description": "Calendar date, ISO-8601 (`YYYY-MM-DD`)."
            },
            {
              "type": "null"
            }
          ],
          "description": "The date the document was issued, ISO-8601 (`YYYY-MM-DD`). Null when none was read."
        },
        "expiry_date": {
          "anyOf": [
            {
              "type": "string",
              "format": "date",
              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
              "description": "Calendar date, ISO-8601 (`YYYY-MM-DD`)."
            },
            {
              "type": "null"
            }
          ],
          "description": "The date the document expires, ISO-8601 (`YYYY-MM-DD`). Null when none was read; `is_expired` and `days_remaining` are computed from it."
        },
        "country_name": {
          "type": [
            "string",
            "null"
          ],
          "example": "Greece",
          "description": "The issuing state's name, as read from the document."
        },
        "issuing_state": {
          "anyOf": [
            {
              "type": "string",
              "example": "GRC",
              "pattern": "^[A-Z]{3}$",
              "description": "Three-letter country code as the document writes it (ICAO Doc 9303): the ISO 3166-1 alpha-3 code for almost every state, Germany's `D` given as `DEU`, and the ICAO codes ISO lacks (for example `GBD`, `RKS`, `XXA`) passed through as read. The matching `*_detail` object says which of these it is."
            },
            {
              "type": "null"
            }
          ],
          "description": "The issuing state, the three-letter code the document writes – the same reading as `country`, under the name the machine-readable zone gives it."
        },
        "days_remaining": {
          "anyOf": [
            {
              "type": "integer",
              "maximum": 9007199254740991,
              "minimum": -9007199254740991
            },
            {
              "type": "null"
            }
          ],
          "description": "Days until expiry at the time of the scan; negative once expired."
        },
        "type_confidence": {
          "allOf": [
            {
              "$ref": "#/definitions/ConfidenceBand"
            }
          ],
          "description": "How strongly the document-type match is backed."
        },
        "issuing_state_detail": {
          "anyOf": [
            {
              "$ref": "#/definitions/CountryCodeDetail"
            },
            {
              "type": "null"
            }
          ],
          "description": "The issuing state's code resolved: as written, as ISO 3166-1 alpha-3 and alpha-2, and its category. Null when no code was read."
        }
      },
      "additionalProperties": false
    },
    "FieldCategory": {
      "enum": [
        "identity",
        "document",
        "dates",
        "address",
        "visa",
        "other"
      ],
      "type": "string",
      "description": "Which group of the report a field belongs to."
    },
    "ConfidenceBand": {
      "enum": [
        "low",
        "medium",
        "high"
      ],
      "type": "string",
      "description": "How strongly the recognition backs this value: `high`, `medium` or `low`. An unknown or missing probability reads as `low`."
    },
    "ScanAuthenticity": {
      "type": "object",
      "required": [
        "overall",
        "checks"
      ],
      "properties": {
        "checks": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/ScanCheck"
          },
          "description": "One entry per authenticity check that ran. Always present; empty under the recognition-only scenario, where nothing ran."
        },
        "overall": {
          "enum": [
            "not_checked",
            "pass",
            "warn",
            "fail"
          ],
          "type": "string",
          "description": "`not_checked` under the recognition-only scenario; populated by authenticity verification later."
        }
      },
      "additionalProperties": false
    },
    "CountryCodeDetail": {
      "type": "object",
      "required": [
        "code",
        "alpha3",
        "alpha2",
        "category"
      ],
      "properties": {
        "code": {
          "type": "string",
          "example": "D",
          "pattern": "^[A-Z]{1,3}$",
          "description": "The code as the document writes it, without the zone's `<` filler: `D` for Germany, `GBD` for a British Overseas Territories citizen."
        },
        "alpha2": {
          "anyOf": [
            {
              "type": "string",
              "pattern": "^[A-Z]{2}$"
            },
            {
              "type": "null"
            }
          ],
          "example": "DE",
          "description": "The ISO 3166-1 alpha-2 code of the same state, or null with `alpha3`."
        },
        "alpha3": {
          "anyOf": [
            {
              "type": "string",
              "pattern": "^[A-Z]{3}$"
            },
            {
              "type": "null"
            }
          ],
          "example": "DEU",
          "description": "The ISO 3166-1 alpha-3 code of the state the code stands for, or null when ISO has none (Kosovo, organisations, stateless persons, refugees, specimens, unknown codes)."
        },
        "category": {
          "$ref": "#/definitions/CountryCodeCategory"
        }
      },
      "description": "A document's country code resolved: the code as written, its ISO 3166-1 codes when ISO has them, and what kind of code it is.",
      "additionalProperties": false
    },
    "CountryCodeCategory": {
      "enum": [
        "iso",
        "icao_variant",
        "british_nationality",
        "kosovo",
        "united_nations",
        "organization",
        "stateless",
        "refugee",
        "unspecified",
        "deprecated",
        "specimen",
        "unknown"
      ],
      "type": "string",
      "description": "What a document's country code is. `iso`: an ISO 3166-1 alpha-3 code. `icao_variant`: an ICAO spelling of an ISO state (`D` for Germany). `british_nationality`: a British nationality class (`GBD`, `GBN`, `GBO`, `GBP`, `GBS`). `kosovo`: `RKS`, which ISO does not list. `united_nations`: `UNO`, `UNA`, `UNK`. `organization`: an issuing authority that is not a state (`EUE`, `XPO`, `IAO` and the other `X..` codes of ICAO Doc 9303). `stateless`: `XXA`. `refugee`: `XXB`, `XXC`. `unspecified`: `XXX`. `deprecated`: a code ISO has withdrawn (`ANT`, `NTZ`). `specimen`: `UTO`, the fictional state of specimen documents. `unknown`: a code in none of these lists."
    }
  },
  "additionalProperties": false
}
get_scan annotations
{
  "readOnlyHint": true,
  "openWorldHint": true
}
delete_scan — Delete a stored scan
Advertised by the server during the last successful anonymous check.
Advertised destructiveOpen-world

Permanently delete one stored scan now, before its retention window would end. This cannot be undone: the stored result, its history row and its thumbnail are removed, and the scan can no longer be listed, fetched or replayed through its idempotency_key. The credit it drew is not refunded, and this period's usage counters still count it. Input: scan_id – meta.id of a scan_document result, or id of a list_scans row. Output: { id, deleted: true }. Calls DELETE /v1/scans/{id}. Only scans made with a live key under a non-zero retention window are stored for the account, and only until that window ends (retain_hours on the scan, or the account's history-retention setting, one year by default); a scan made with retain_hours 0 was never stored. A key reaches its own account's scans and no other account's. Under a sandbox key nothing can be read back: an account's own sk_sandbox_ key stores nothing, and the public key keeps every scan for one year, with a reduced thumbnail and the address it came from, where that key cannot read, list or delete it. Errors: an id that is unknown, belongs to another account, has passed its window or was already deleted is refused as not_found, and nothing is deleted. Use it when someone asks for a document's data to be removed; confirm the id with list_scans or get_scan first, because the deletion is final.

delete_scan input schema
{
  "type": "object",
  "$schema": "http://json-schema.org/draft-07/schema#",
  "required": [
    "scan_id"
  ],
  "properties": {
    "scan_id": {
      "type": "string",
      "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$",
      "description": "The scan's id: meta.id of the scan_document result, or id of a list_scans row (a lower-case UUID)."
    }
  }
}
delete_scan output schema
{
  "type": "object",
  "$schema": "http://json-schema.org/draft-07/schema#",
  "required": [
    "id",
    "deleted"
  ],
  "properties": {
    "id": {
      "$ref": "#/definitions/ScanId"
    },
    "deleted": {
      "type": "boolean",
      "const": true,
      "description": "Always true: the stored result is gone and cannot be read back."
    }
  },
  "definitions": {
    "ScanId": {
      "type": "string",
      "example": "01a0af18-cd8d-7a61-9f2d-4c7b8e105da3",
      "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$",
      "description": "Scan identifier: a UUID version 7 (RFC 9562), canonical lower-case `8-4-4-4-12`. Its leading 48 bits are the millisecond the scan was made, so ids sort in the order the scans happened – but treat the value as opaque: nothing else about it is part of the contract."
    }
  },
  "additionalProperties": false
}
delete_scan annotations
{
  "readOnlyHint": false,
  "openWorldHint": true,
  "idempotentHint": true,
  "destructiveHint": true
}

Prompts

4 advertised

scan_document_to_json — Read a document into JSON

Advertised by the server during the last successful anonymous check.

Scan one passport, ID card or driver's licence image by its URL and present the printed fields it carries, with the structured JSON underneath.

image_url
https: address of the document image, on a public internet address. (required)
check_document_expiry — Check whether a document has expired

Advertised by the server during the last successful anonymous check.

Scan one document image by its URL and report its expiry date, whether it has expired as of the scan, and how many days are left.

image_url
https: address of the document image, on a public internet address. (required)
batch_scan — Scan a batch of documents

Advertised by the server during the last successful anonymous check.

Check the balance, then scan several document images one by one and summarise what was read and which ones failed.

image_urls
The document image addresses (https), separated by spaces, commas or new lines. (required)
explain_error — Explain an API error code

Advertised by the server during the last successful anonymous check.

Explain what a doc.cheap API error code means, whether retrying helps, and what to change – from the documentation page for that code.

error_code
The error.code value from the API response, e.g. insufficient_credits. (required)

Resources

71 advertised

changelog — Changelog

Advertised by the server during the last successful anonymous check.

Every change to the recognition API and to this documentation, dated, newest first, with an Atom feed and a page per month.

changelog URI
doccheap://docs/changelog

MIME type: text/markdown

concepts — Concepts

Advertised by the server during the last successful anonymous check.

Why the API behaves as it does: what recognition actually does, what confidence means, what is billed, what is kept, and what fails.

concepts URI
doccheap://docs/concepts

MIME type: text/markdown

concepts/api-keys-and-sessions — API keys and sessions

Advertised by the server during the last successful anonymous check.

The two ways a caller is identified – an API key and a dashboard session – what each may do, and why they are kept apart.

concepts/api-keys-and-sessions URI
doccheap://docs/concepts/api-keys-and-sessions

MIME type: text/markdown

concepts/confidence-and-readings — Confidence and readings

Advertised by the server during the last successful anonymous check.

Why confidence is a band rather than a number, why one field can be read more than once, and what a verdict of not_checked is saying.

concepts/confidence-and-readings URI
doccheap://docs/concepts/confidence-and-readings

MIME type: text/markdown

concepts/crypto-deposits — Crypto deposits

Advertised by the server during the last successful anonymous check.

How a permanent deposit address is derived for an account, how a transfer becomes credits, and what the chain watcher does and does not promise.

concepts/crypto-deposits URI
doccheap://docs/concepts/crypto-deposits

MIME type: text/markdown

concepts/data-retention-and-privacy — Data retention and privacy

Advertised by the server during the last successful anonymous check.

What this service stores, for how long, what it never stores at all, and what zero retention means for a request and its result.

concepts/data-retention-and-privacy URI
doccheap://docs/concepts/data-retention-and-privacy

MIME type: text/markdown

concepts/how-recognition-works — How recognition works

Advertised by the server during the last successful anonymous check.

What happens between sending an image and getting fields back: detection, classification, zone reading and the checks that follow.

concepts/how-recognition-works URI
doccheap://docs/concepts/how-recognition-works

MIME type: text/markdown

concepts/mrz-and-the-visual-zone — The MRZ and the visual zone

Advertised by the server during the last successful anonymous check.

Why a document says the same thing twice, when the two zones disagree, and which one to believe in each of those cases.

concepts/mrz-and-the-visual-zone URI
doccheap://docs/concepts/mrz-and-the-visual-zone

MIME type: text/markdown

concepts/reliability — Reliability

Advertised by the server during the last successful anonymous check.

What this service promises when a dependency is away, what it charges in that case, and how a caller can tell a retry is worth making.

concepts/reliability URI
doccheap://docs/concepts/reliability

MIME type: text/markdown

concepts/what-a-billed-scan-is — What a billed scan is

Advertised by the server during the last successful anonymous check.

One cent per document, and the rule that decides whether a call is charged at all: what makes a recognition billable, and what does not.

concepts/what-a-billed-scan-is URI
doccheap://docs/concepts/what-a-billed-scan-is

MIME type: text/markdown

errors/client_token_expired — Error client_token_expired

Advertised by the server during the last successful anonymous check.

A client token was used after its expiry. What raises it, and how to fix it.

errors/client_token_expired URI
doccheap://docs/errors/client_token_expired

MIME type: text/markdown

errors/client_token_not_allowed — Error client_token_not_allowed

Advertised by the server during the last successful anonymous check.

A client token was sent to an endpoint other than POST /v1/scans, or a token was requested without an API key. What raises it, and how to fix it.

errors/client_token_not_allowed URI
doccheap://docs/errors/client_token_not_allowed

MIME type: text/markdown

errors/client_token_used_up — Error client_token_used_up

Advertised by the server during the last successful anonymous check.

A client token was used more times than it allows. What raises it, and how to fix it.

errors/client_token_used_up URI
doccheap://docs/errors/client_token_used_up

MIME type: text/markdown

errors/document_repeated — Error document_repeated

Advertised by the server during the last successful anonymous check.

The same document was sent again within the window that guards against a duplicate charge. What raises it, and how to fix it.

errors/document_repeated URI
doccheap://docs/errors/document_repeated

MIME type: text/markdown

errors/engine_unavailable — Error engine_unavailable

Advertised by the server during the last successful anonymous check.

The recognition engine did not answer within its timeout; nothing was charged. What raises it, and how to fix it.

errors/engine_unavailable URI
doccheap://docs/errors/engine_unavailable

MIME type: text/markdown

errors/idempotency_conflict — idempotency_conflict (409): key reused, new body

Advertised by the server during the last successful anonymous check.

409 idempotency_conflict: this Idempotency-Key was first sent with a different body. This call did not run and cost nothing. Send it under a new key.

errors/idempotency_conflict URI
doccheap://docs/errors/idempotency_conflict

MIME type: text/markdown

errors/idempotency_in_progress — Error idempotency_in_progress

Advertised by the server during the last successful anonymous check.

The first request carrying this idempotency key has not finished yet. What raises it, and how to fix it.

errors/idempotency_in_progress URI
doccheap://docs/errors/idempotency_in_progress

MIME type: text/markdown

errors/idempotency_replay_unavailable — Error idempotency_replay_unavailable

Advertised by the server during the last successful anonymous check.

The first result for this idempotency key can no longer be replayed. What raises it, and how to fix it.

errors/idempotency_replay_unavailable URI
doccheap://docs/errors/idempotency_replay_unavailable

MIME type: text/markdown

errors/impersonation_read_only — Error impersonation_read_only

Advertised by the server during the last successful anonymous check.

Raised only on an administrative surface: an impersonated session may not write. What raises it, and how to fix it.

errors/impersonation_read_only URI
doccheap://docs/errors/impersonation_read_only

MIME type: text/markdown

errors/insufficient_credits — Error insufficient_credits

Advertised by the server during the last successful anonymous check.

This month's free credits and the paid credits are both used up, so the recognition cannot be reserved. What raises it, and how to fix it.

errors/insufficient_credits URI
doccheap://docs/errors/insufficient_credits

MIME type: text/markdown

errors/internal_error — Error internal_error

Advertised by the server during the last successful anonymous check.

An unexpected failure; nothing was charged and the response carries an event id. What raises it, and how to fix it.

errors/internal_error URI
doccheap://docs/errors/internal_error

MIME type: text/markdown

errors/invalid_request — Error invalid_request

Advertised by the server during the last successful anonymous check.

The request was malformed or an argument was outside the range the endpoint accepts. What raises it, and how to fix it.

errors/invalid_request URI
doccheap://docs/errors/invalid_request

MIME type: text/markdown

errors/maintenance — Error maintenance

Advertised by the server during the last successful anonymous check.

The service is in a planned maintenance window and is refusing requests for its duration. What raises it, and how to fix it.

errors/maintenance URI
doccheap://docs/errors/maintenance

MIME type: text/markdown

errors/not_found — Error not_found

Advertised by the server during the last successful anonymous check.

No resource matched the request, or the one that did has passed its retention window. What raises it, and how to fix it.

errors/not_found URI
doccheap://docs/errors/not_found

MIME type: text/markdown

errors/payload_too_large — Error payload_too_large

Advertised by the server during the last successful anonymous check.

The request body is over the size the endpoint accepts. What raises it, and how to fix it.

errors/payload_too_large URI
doccheap://docs/errors/payload_too_large

MIME type: text/markdown

errors/payment_driver_unavailable — Error payment_driver_unavailable

Advertised by the server during the last successful anonymous check.

Raised only on an administrative surface when a payment driver is not configured. What raises it, and how to fix it.

errors/payment_driver_unavailable URI
doccheap://docs/errors/payment_driver_unavailable

MIME type: text/markdown

errors/rate_limited — Error rate_limited

Advertised by the server during the last successful anonymous check.

The caller is over the request rate its key allows; the response says when to retry. What raises it, and how to fix it.

errors/rate_limited URI
doccheap://docs/errors/rate_limited

MIME type: text/markdown

errors/rate_unavailable — Error rate_unavailable

Advertised by the server during the last successful anonymous check.

The exchange rate needed to price this top-up could not be read. What raises it, and how to fix it.

errors/rate_unavailable URI
doccheap://docs/errors/rate_unavailable

MIME type: text/markdown

errors/registration_required — Error registration_required

Advertised by the server during the last successful anonymous check.

The public sandbox allowance is spent; an account of your own is needed to continue. What raises it, and how to fix it.

errors/registration_required URI
doccheap://docs/errors/registration_required

MIME type: text/markdown

errors/service_unavailable — Error service_unavailable

Advertised by the server during the last successful anonymous check.

A store this service depends on is unreachable, so the request cannot be served now. What raises it, and how to fix it.

errors/service_unavailable URI
doccheap://docs/errors/service_unavailable

MIME type: text/markdown

errors/topup_in_progress — Error topup_in_progress

Advertised by the server during the last successful anonymous check.

A top-up for this account is already being processed. What raises it, and how to fix it.

errors/topup_in_progress URI
doccheap://docs/errors/topup_in_progress

MIME type: text/markdown

errors/unauthorized — Error unauthorized

Advertised by the server during the last successful anonymous check.

The API key was missing, malformed, revoked or not valid for this endpoint. What raises it, and how to fix it.

errors/unauthorized URI
doccheap://docs/errors/unauthorized

MIME type: text/markdown

errors/unsupported_media_type — Error unsupported_media_type

Advertised by the server during the last successful anonymous check.

The content type or the image format is not one this endpoint reads. What raises it, and how to fix it.

errors/unsupported_media_type URI
doccheap://docs/errors/unsupported_media_type

MIME type: text/markdown

errors/validation_failed — Error validation_failed

Advertised by the server during the last successful anonymous check.

The request parsed but a field failed validation; the body names the field. What raises it, and how to fix it.

errors/validation_failed URI
doccheap://docs/errors/validation_failed

MIME type: text/markdown

guides — Guides

Advertised by the server during the last successful anonymous check.

Task-shaped instructions: recognizing each kind of document, handling errors and retries, controlling retention, managing keys, and tracking spend.

guides URI
doccheap://docs/guides

MIME type: text/markdown

guides/check-an-mrz — Check an MRZ

Advertised by the server during the last successful anonymous check.

Verify the check digits of a machine-readable zone, read what a failed digit means, and decide what to do with the document.

guides/check-an-mrz URI
doccheap://docs/guides/check-an-mrz

MIME type: text/markdown

guides/control-history-retention — Control history retention

Advertised by the server during the last successful anonymous check.

Choose how long a result is kept: per request, per account, or not at all, and understand what disappears when the window ends.

guides/control-history-retention URI
doccheap://docs/guides/control-history-retention

MIME type: text/markdown

guides/crop-with-opencv — Crop a document with OpenCV

Advertised by the server during the last successful anonymous check.

Find a document's outline in a photo with OpenCV, straighten it, and send the cropped image to doc.cheap from Python.

guides/crop-with-opencv URI
doccheap://docs/guides/crop-with-opencv

MIME type: text/markdown

guides/get-results-without-webhooks — Get results without webhooks

Advertised by the server during the last successful anonymous check.

The API answers in the same response, so there is no callback to register. This is how to fit that into a queue or a background worker.

guides/get-results-without-webhooks URI
doccheap://docs/guides/get-results-without-webhooks

MIME type: text/markdown

guides/handle-errors — Handle errors

Advertised by the server during the last successful anonymous check.

Branch on the error code rather than the status, decide what to retry, and turn the documentation link in every error body into a fix.

guides/handle-errors URI
doccheap://docs/guides/handle-errors

MIME type: text/markdown

guides/handle-non-latin-scripts — Handle non-Latin scripts

Advertised by the server during the last successful anonymous check.

Read documents printed in Greek, Arabic or Han script: which values are transliterated, which are not, and how to get both spellings.

guides/handle-non-latin-scripts URI
doccheap://docs/guides/handle-non-latin-scripts

MIME type: text/markdown

guides/read-a-passport-in-an-ionic-app — Read a passport in an Ionic app

Advertised by the server during the last successful anonymous check.

Take a passport photo with the Capacitor Camera plugin, send it through your own small server, and show the holder and document fields in the app.

guides/read-a-passport-in-an-ionic-app URI
doccheap://docs/guides/read-a-passport-in-an-ionic-app

MIME type: text/markdown

guides/recognize-a-driver-licence — Recognize a driver licence

Advertised by the server during the last successful anonymous check.

Send a driver licence to the recognition API, read the vehicle categories and dates, and handle the layouts that vary by country.

guides/recognize-a-driver-licence URI
doccheap://docs/guides/recognize-a-driver-licence

MIME type: text/markdown

guides/recognize-a-passport — Recognize a passport

Advertised by the server during the last successful anonymous check.

Send a passport photo to the recognition API, choose the options that matter, and read the machine-readable zone and the visual fields.

guides/recognize-a-passport URI
doccheap://docs/guides/recognize-a-passport

MIME type: text/markdown

guides/recognize-an-id-card — Recognize an ID card

Advertised by the server during the last successful anonymous check.

Send a national ID card to the recognition API, including the two-sided case, and read the identity fields that come back.

guides/recognize-an-id-card URI
doccheap://docs/guides/recognize-an-id-card

MIME type: text/markdown

guides/retry-safely-with-idempotency — Retry safely with idempotency

Advertised by the server during the last successful anonymous check.

Send an idempotency key so a retried recognition returns the first result instead of running and charging a second time.

guides/retry-safely-with-idempotency URI
doccheap://docs/guides/retry-safely-with-idempotency

MIME type: text/markdown

guides/rotate-api-keys — Rotate API keys

Advertised by the server during the last successful anonymous check.

Issue a second key, move traffic onto it and revoke the old one, without a window in which calls fail.

guides/rotate-api-keys URI
doccheap://docs/guides/rotate-api-keys

MIME type: text/markdown

guides/top-up-with-crypto — Top up with crypto

Advertised by the server during the last successful anonymous check.

Send USDT to the permanent deposit address of your account and watch the credits arrive, including what to do if they do not.

guides/top-up-with-crypto URI
doccheap://docs/guides/top-up-with-crypto

MIME type: text/markdown

guides/track-usage-and-spend — Track usage and spend

Advertised by the server during the last successful anonymous check.

Read the balance and the period counters from the API, and reconcile them against what the dashboard shows for the same period.

guides/track-usage-and-spend URI
doccheap://docs/guides/track-usage-and-spend

MIME type: text/markdown

guides/use-the-ai-sdk — Use the AI SDK

Advertised by the server during the last successful anonymous check.

Give a model built with the AI SDK five tools that recognize a passport, ID card or driver licence and work with stored scans and the balance.

guides/use-the-ai-sdk URI
doccheap://docs/guides/use-the-ai-sdk

MIME type: text/markdown

guides/use-the-mcp-server — Use the MCP server

Advertised by the server during the last successful anonymous check.

Install the MCP server with npx so a coding assistant can recognize a passport or ID, check the balance, work with stored scans and search these docs.

guides/use-the-mcp-server URI
doccheap://docs/guides/use-the-mcp-server

MIME type: text/markdown

guides/work-with-result-images — Work with result images

Advertised by the server during the last successful anonymous check.

Ask for the portrait and the cropped document image, read them out of the response, and know how long each stays available.

guides/work-with-result-images URI
doccheap://docs/guides/work-with-result-images

MIME type: text/markdown

index — Document recognition API documentation

Advertised by the server during the last successful anonymous check.

Turn a photo of a passport or ID card into structured JSON with one HTTP call. Run the example here, then pick a guide or the reference.

index URI
doccheap://docs/index

MIME type: text/markdown

reference — Reference

Advertised by the server during the last successful anonymous check.

The exact contract: endpoints, response shapes, the field catalogue, scan options, errors, limits, idempotency and versioning.

reference URI
doccheap://docs/reference

MIME type: text/markdown

reference/errors — Errors

Advertised by the server during the last successful anonymous check.

Every error code the recognition API returns, the HTTP status it comes with, and the page that states its cause and its fix.

reference/errors URI
doccheap://docs/reference/errors

MIME type: text/markdown

reference/fields — Field catalogue

Advertised by the server during the last successful anonymous check.

Every field key the result publishes, with its label and category, and the rules that decide what appears in the list and what does not.

reference/fields URI
doccheap://docs/reference/fields

MIME type: text/markdown

reference/fields/languages — Field languages and scripts

Advertised by the server during the last successful anonymous check.

How a reading's language is reported, the three steps that resolve it, and the full table of assigned language identifiers.

reference/fields/languages URI
doccheap://docs/reference/fields/languages

MIME type: text/markdown

reference/glossary — Glossary

Advertised by the server during the last successful anonymous check.

The words this documentation uses with a precise meaning, and what each one means here.

reference/glossary URI
doccheap://docs/reference/glossary

MIME type: text/markdown

reference/http-status-codes — HTTP status codes

Advertised by the server during the last successful anonymous check.

Every HTTP status this API answers with, the error codes that share it, and what separates them.

reference/http-status-codes URI
doccheap://docs/reference/http-status-codes

MIME type: text/markdown

reference/idempotency — Idempotency

Advertised by the server during the last successful anonymous check.

What makes two scan requests the same request, how long a key is remembered, and the three codes that arbitrate a replay.

reference/idempotency URI
doccheap://docs/reference/idempotency

MIME type: text/markdown

reference/images — Result images

Advertised by the server during the last successful anonymous check.

The seven image crops a recognition returns, their height caps, and the rules the re-encode follows.

reference/images URI
doccheap://docs/reference/images

MIME type: text/markdown

reference/limits — Limits

Advertised by the server during the last successful anonymous check.

The limits a caller meets: request rate, image size, request body size, idempotency key length and the retention windows on offer.

reference/limits URI
doccheap://docs/reference/limits

MIME type: text/markdown

reference/mrz — MRZ reference

Advertised by the server during the last successful anonymous check.

The machine-readable zone as this API publishes it – the lines, the unbroken text, the three formats, and how the check digits are reported.

reference/mrz URI
doccheap://docs/reference/mrz

MIME type: text/markdown

reference/response — The response

Advertised by the server during the last successful anonymous check.

The recognition result, group by group – every key, its type, when it is null, and what each value is derived from.

reference/response URI
doccheap://docs/reference/response

MIME type: text/markdown

reference/scan-options — Scan options

Advertised by the server during the last successful anonymous check.

Every option on a scan request: what it changes, its default, its allowed values, and the options that interact with each other.

reference/scan-options URI
doccheap://docs/reference/scan-options

MIME type: text/markdown

reference/service-levels — Service levels

Advertised by the server during the last successful anonymous check.

What this service measures, what it targets for latency and uptime, how incidents are published, and where the live figures come from.

reference/service-levels URI
doccheap://docs/reference/service-levels

MIME type: text/markdown

reference/versioning — Versioning

Advertised by the server during the last successful anonymous check.

One response shape, one version, and what a consumer can rely on.

reference/versioning URI
doccheap://docs/reference/versioning

MIME type: text/markdown

start — Get started

Advertised by the server during the last successful anonymous check.

Three ways in: your first call with the public sandbox key, moving to a live key of your own, and recognizing a document without writing code.

start URI
doccheap://docs/start

MIME type: text/markdown

start/first-recognition — Your first recognition

Advertised by the server during the last successful anonymous check.

Send one image to the recognition API with the public sandbox key, read the extracted fields, and check what the call cost you.

start/first-recognition URI
doccheap://docs/start/first-recognition

MIME type: text/markdown

start/from-sandbox-to-live — From the sandbox to a live key

Advertised by the server during the last successful anonymous check.

Register an account, use its 100 free documents every month, issue your own live key and point an existing integration at it.

start/from-sandbox-to-live URI
doccheap://docs/start/from-sandbox-to-live

MIME type: text/markdown

start/recognize-without-code — Recognize a document without code

Advertised by the server during the last successful anonymous check.

Upload a document in the dashboard, read the extracted fields on screen, and decide whether the API fits before writing an integration.

start/recognize-without-code URI
doccheap://docs/start/recognize-without-code

MIME type: text/markdown

docs-page — doc.cheap documentation page

Advertised by the server during the last successful anonymous check.

One page of the doc.cheap API documentation as markdown, by its path: reference/fields, reference/errors, reference/mrz, reference/limits, concepts/what-a-billed-scan-is, or errors/<code> for any error code the API returns.

docs-page URI template
doccheap://docs/{+slug}

MIME type: text/markdown

90-day uptime

A lightweight connection check about every six hours, sampled on hosts with many listings. It shows the server answered, not that its tools work.

100% (71 of 71 checks answered)

  1. 2026-11-02: 3 of 3 checks answered
  2. 2026-11-03: 4 of 4 checks answered
  3. 2026-11-04: 4 of 4 checks answered
  4. 2026-11-05: 4 of 4 checks answered
  5. 2026-11-06: 4 of 4 checks answered
  6. 2026-11-07: 2 of 2 checks answered
  7. 2026-11-09: 1 of 1 checks answered
  8. 2026-11-10: 2 of 2 checks answered
  9. 2026-11-11: 1 of 1 checks answered
  10. 2026-11-12: 1 of 1 checks answered
  11. 2026-11-14: 1 of 1 checks answered
  12. 2026-11-15: 2 of 2 checks answered
  13. 2026-11-16: 4 of 4 checks answered
  14. 2026-11-17: 5 of 5 checks answered
  15. 2026-11-18: 5 of 5 checks answered
  16. 2026-11-19: 4 of 4 checks answered
  17. 2026-11-20: 3 of 3 checks answered
  18. 2026-11-21: 4 of 4 checks answered
  19. 2026-11-22: 4 of 4 checks answered
  20. 2026-11-23: 3 of 3 checks answered
  21. 2026-11-24: 4 of 4 checks answered
  22. 2026-11-25: 4 of 4 checks answered
  23. 2026-11-26: 2 of 2 checks answered

30-day availability

Aggregated from read-only remote checks; this is not a tool-execution or security guarantee.

Successful checks
2 of 2 (100%)
Average latency
2829 ms
95th percentile latency
2866 ms

Maintenance history

Public check and source-refresh events. Editorial and ownership records remain private.

  • · probe · passed · 2787 ms · 6 tool(s), 71 resource(s), 1 resource template(s), 4 prompt(s)
  • · probe · passed · 2870 ms · metadata changed · 6 tool(s), 71 resource(s), 1 resource template(s), 4 prompt(s)
  • · repository · failed · Repository maintenance failed
  • · registry · passed · metadata changed · Source metadata updated
  • · backfill · recorded · Pre-expansion baseline; unobserved rich metadata remains unknown

Connect from your client

Each snippet registers the same endpoint; pick the client you use.

This server is operated by the named third party. Listing and endpoint checks are not an endorsement or a security audit. Review the operator's permissions, terms, and data handling before connecting. How listings are checked and corrected.

Claude Code

Run this once in a terminal. It registers the remote server. Use --scope project to write .mcp.json for the repo.
Claude Code configuration
claude mcp add --transport http doc-cheap-mcp https://mcp.doc.cheap/mcp

Codex

Run this once. Codex stores MCP servers in ~/.codex/config.toml (or .codex/config.toml in a trusted project).
Codex configuration
codex mcp add doc-cheap-mcp --url https://mcp.doc.cheap/mcp

Cursor

Merge this server into .cursor/mcp.json in your project, then enable doc-cheap-mcp in your MCP settings.
Cursor configuration
{
  "mcpServers": {
    "doc-cheap-mcp": {
      "url": "https://mcp.doc.cheap/mcp"
    }
  }
}

Cline

Merge this into cline_mcp_settings.json (Cline → MCP Servers → Configure).
Cline configuration
{
  "mcpServers": {
    "doc-cheap-mcp": {
      "type": "streamableHttp",
      "url": "https://mcp.doc.cheap/mcp",
      "disabled": false
    }
  }
}

VS Code

Merge this server into .vscode/mcp.json. Use MCP: List Servers to start doc-cheap-mcp and inspect its tools.
VS Code configuration
{
  "servers": {
    "doc-cheap-mcp": {
      "type": "http",
      "url": "https://mcp.doc.cheap/mcp"
    }
  }
}

Gemini CLI

Run this once. It writes .gemini/settings.json in the current project; pass --scope user for ~/.gemini/settings.json.
Gemini CLI configuration
gemini mcp add --transport http doc-cheap-mcp https://mcp.doc.cheap/mcp

Claude Desktop

Open Claude Settings > Connectors > Add custom connector, enter this server URL and enable it for the conversation. This is a manual remote-connector handoff, not a desktop JSON configuration.
Claude Desktop configuration
https://mcp.doc.cheap/mcp

Windsurf

Merge this into ~/.codeium/windsurf/mcp_config.json, then refresh MCP in Cascade. Windsurf remote servers use serverUrl, not url.
Windsurf configuration
{
  "mcpServers": {
    "doc-cheap-mcp": {
      "serverUrl": "https://mcp.doc.cheap/mcp"
    }
  }
}

Let your agent find its tools

Find servers like doc.cheap MCP from your agent. Add Koskamo once to search the index for endpoints, access requirements, and client setup. Public discovery needs no key.

Frequently asked questions

Can I use this server without an account?
You can connect and list tools without signing in. However, individual tools may require a vendor account, credentials, or permissions. The live check only verifies connection and tool discovery, not access to user content or successful execution.
How do I authenticate for tool execution?
You must provide your API key. Send it as the X-Doc-Cheap-Api-Key header or as a Bearer token in the Authorization header. Alternatively, set the DOC_CHEAP_API_KEY environment variable to your key.
What document types are supported?
The server supports OCR recognition for passports, IDs, and driver licenses. It allows agents to scan these documents and manage the resulting stored scans.

Do you run doc.cheap MCP?

Prove ownership with a DNS record, a well-known file, or your Official MCP Registry entry, and your edits publish immediately. Proofs are re-checked weekly; admins can still hide or remove a listing.

Claim this listing