{"openapi":"3.0.3","info":{"title":"OCR API","version":"1.0.0","description":"Read text out of images and scanned PDFs, in 7 languages.\n\nTesseract 5 with automatic pre-processing (deskew-free grayscale normalisation and upscaling of small scans). Also produces a searchable PDF with an invisible text layer.","contact":{"url":"https://173-249-18-142.sslip.io"}},"servers":[{"url":"https://173-249-18-142.sslip.io"}],"tags":[{"name":"OCR API","description":"Read text out of images and scanned PDFs, in 7 languages."}],"components":{"securitySchemes":{"apiKey":{"type":"apiKey","in":"header","name":"X-API-Key","description":"Your Smallapis key. Omit it to use the demo quota."}}},"security":[{"apiKey":[]}],"paths":{"/v1/ocr/image":{"post":{"tags":["OCR API"],"summary":"Read the text in an image","description":"Read the text in an image","operationId":"v1_ocr_image","responses":{"200":{"description":"Result payload","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Invalid parameters"},"401":{"description":"Missing or invalid API key"},"413":{"description":"Payload larger than the plan allows"},"429":{"description":"Plan quota exhausted"}},"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"file":{"type":"string","description":"Image to read.","format":"binary"},"url":{"type":"string","description":"Public URL instead of an upload."},"lang":{"type":"string","description":"eng, fra, deu, spa, ita, por, nld. Combine with \"+\".","default":"eng"},"words":{"type":"boolean","description":"Also return per-word bounding boxes and confidence.","default":false},"psm":{"type":"integer","description":"Tesseract page segmentation mode, 0-13.","default":3}}}},"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string","description":"Public URL instead of an upload."},"lang":{"type":"string","description":"eng, fra, deu, spa, ita, por, nld. Combine with \"+\".","default":"eng"},"words":{"type":"boolean","description":"Also return per-word bounding boxes and confidence.","default":false},"psm":{"type":"integer","description":"Tesseract page segmentation mode, 0-13.","default":3}}}}}}}},"/v1/ocr/pdf":{"post":{"tags":["OCR API"],"summary":"Read the text in a scanned PDF","description":"Uses the embedded text layer when there is a usable one, and only falls back to OCR when the pages are images.","operationId":"v1_ocr_pdf","responses":{"200":{"description":"Result payload","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Invalid parameters"},"401":{"description":"Missing or invalid API key"},"413":{"description":"Payload larger than the plan allows"},"429":{"description":"Plan quota exhausted"}},"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"file":{"type":"string","description":"PDF to read.","format":"binary"},"lang":{"type":"string","description":"OCR language.","default":"eng"},"first":{"type":"integer","description":"First page, 1-based.","default":1},"last":{"type":"integer","description":"Last page. At most 20 pages per call."},"force":{"type":"boolean","description":"OCR even when a text layer exists.","default":false}}}},"application/json":{"schema":{"type":"object","properties":{"lang":{"type":"string","description":"OCR language.","default":"eng"},"first":{"type":"integer","description":"First page, 1-based.","default":1},"last":{"type":"integer","description":"Last page. At most 20 pages per call."},"force":{"type":"boolean","description":"OCR even when a text layer exists.","default":false}}}}}}}},"/v1/ocr/searchable-pdf":{"post":{"tags":["OCR API"],"summary":"Add an invisible text layer to a scan","description":"Takes an image or a scanned PDF and returns a PDF you can search and copy from.","operationId":"v1_ocr_searchable_pdf","responses":{"200":{"description":"The produced file","content":{"application/octet-stream":{"schema":{"type":"string","format":"binary"}}}},"400":{"description":"Invalid parameters"},"401":{"description":"Missing or invalid API key"},"413":{"description":"Payload larger than the plan allows"},"429":{"description":"Plan quota exhausted"}},"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"file":{"type":"string","description":"Image or PDF to process.","format":"binary"},"lang":{"type":"string","description":"OCR language.","default":"eng"}}}},"application/json":{"schema":{"type":"object","properties":{"lang":{"type":"string","description":"OCR language.","default":"eng"}}}}}}}},"/v1/ocr/languages":{"get":{"tags":["OCR API"],"summary":"List the installed OCR languages","description":"List the installed OCR languages","operationId":"v1_ocr_languages","responses":{"200":{"description":"Result payload","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Invalid parameters"},"401":{"description":"Missing or invalid API key"},"413":{"description":"Payload larger than the plan allows"},"429":{"description":"Plan quota exhausted"}},"parameters":[]}}}}