{"openapi":"3.1.0","info":{"title":"Image to Text OCR - Handwriting & Tables AI","description":"Image to text in any language, handwriting included, with the layout kept as Markdown (headings, lists, tables) and optional translation.","version":"v1"},"servers":[{"url":"https://image-to-text-ocr-handwriting-tables-ai.p.rapidapi.com","description":"RapidAPI"}],"paths":{"/v1/ocr/image":{"post":{"tags":["OCR"],"summary":"Extract the text of an image from its URL","description":"All the text of a photo, scan or screenshot, in reading order: plain\ntext, plus Markdown keeping headings, lists and tables. Handwriting and any\nlanguage. Optional translation. 1 credit (2 with translation).","operationId":"extractTextFromImageUrl","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OcrRequest"},"examples":{"Extract Text from Image URL":{"summary":"Extract Text from Image URL","value":{"url":"https://upload.wikimedia.org/wikipedia/commons/6/69/Sahan_Supermarket_receipt%2C_Hillegersberg%2C_Rotterdam_%282021%29_01.jpg"}}}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OcrResponse"},"examples":{"Extract Text from Image URL":{"summary":"Extract Text from Image URL (real response)","value":{"source":"https://upload.wikimedia.org/.../Sahan_Supermarket_receipt...jpg","mime_type":"image/jpeg","languages":["nl"],"handwriting":false,"has_text":true,"text":"SAHAN Supermarkt\nBergweg 170\n3036 BL Rotterdam\n...\nOmschrijving\tBedrag\nMIRAS OLIJFOLIE (GLAS) 1L\t3,99\n...","markdown":"SAHAN Supermarkt\nBergweg 170\n...\n| Omschrijving | Bedrag |\n| :--- | ---: |\n| MIRAS OLIJFOLIE (GLAS) 1L | 3,99 |\n| MERAY TRAKYA POMPOENPIT 200 | 1,99 |\n...","translation":{"language":"English","markdown":"SAHAN Supermarket\n...\n| Description | Amount |\n| :--- | :--- |\n| MIRAS OLIVE OIL (GLASS) 1L | 3.99 |\n...","text":"SAHAN Supermarket\n...\nDescription\tAmount\nMIRAS OLIVE OIL (GLASS) 1L\t3.99\n..."}}}}}}},"400":{"description":"Invalid input, or the target could not be processed (see `error.code`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Missing proxy secret (call through RapidAPI with your key).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Invalid proxy secret.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Daily limit of your plan reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"The AI provider failed (`ai_error`) or capacity is temporarily exhausted (`capacity_exhausted`); retry. Not billed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"x-rapidapi-endpoint":"Extract Text from Image URL"}},"/v1/ocr/image/upload":{"post":{"tags":["OCR"],"summary":"Extract the text of an uploaded image","description":"Same as /image, for a file sent as multipart/form-data (field `file`).","operationId":"extractTextFromUploadedImage","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_Extract_Text_from_Uploaded_Image"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OcrResponse"},"examples":{"Extract Text from Uploaded Image":{"summary":"Extract Text from Uploaded Image","value":{"mime_type":"image/jpeg","languages":["nl"],"translation":{"language":"English"}}}}}}},"400":{"description":"Invalid input, or the target could not be processed (see `error.code`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Missing proxy secret (call through RapidAPI with your key).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Invalid proxy secret.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Daily limit of your plan reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"The AI provider failed (`ai_error`) or capacity is temporarily exhausted (`capacity_exhausted`); retry. Not billed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"x-rapidapi-endpoint":"Extract Text from Uploaded Image"}}},"components":{"schemas":{"Body_Extract_Text_from_Uploaded_Image":{"properties":{"file":{"type":"string","title":"File","description":"Image, up to 20 MB.","format":"binary"},"translate_to":{"type":"string","maxLength":40,"title":"Translate To","description":"Also translate the text into this language (e.g. 'English', 'fr'). +1 credit."}},"type":"object","required":["file"],"title":"Body_Extract Text from Uploaded Image"},"ErrorBody":{"properties":{"status":{"type":"integer","title":"Status","examples":[400]},"code":{"type":"string","title":"Code","examples":["invalid_url"]},"message":{"type":"string","title":"Message","examples":["A website URL is required."]}},"type":"object","required":["status","code","message"],"title":"ErrorBody"},"ErrorEnvelope":{"properties":{"error":{"$ref":"#/components/schemas/ErrorBody"}},"type":"object","required":["error"],"title":"ErrorEnvelope"},"OcrRequest":{"properties":{"url":{"type":"string","maxLength":2048,"title":"Url","description":"Direct link to an image: PNG, JPEG, WEBP, HEIC, GIF, BMP or TIFF, up to 20 MB.","examples":["https://upload.wikimedia.org/wikipedia/commons/6/69/Sahan_Supermarket_receipt%2C_Hillegersberg%2C_Rotterdam_%282021%29_01.jpg"]},"translate_to":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"title":"Translate To","description":"Also translate the text into this language (e.g. 'English', 'fr'). +1 credit."}},"type":"object","required":["url"],"title":"OcrRequest"},"OcrResponse":{"properties":{"source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source","description":"File name or final URL."},"mime_type":{"type":"string","title":"Mime Type","examples":["image/jpeg"]},"languages":{"items":{"type":"string"},"type":"array","title":"Languages","description":"ISO 639-1 codes of the text found.","examples":[["nl"]]},"handwriting":{"type":"boolean","title":"Handwriting","description":"Whether the image contains handwriting."},"has_text":{"type":"boolean","title":"Has Text"},"text":{"type":"string","title":"Text","description":"Plain text, in reading order."},"markdown":{"type":"string","title":"Markdown","description":"The same text with its layout: headings, lists and tables."},"translation":{"anyOf":[{"$ref":"#/components/schemas/Translation"},{"type":"null"}]}},"type":"object","required":["mime_type","languages","handwriting","has_text","text","markdown"],"title":"OcrResponse"},"Translation":{"properties":{"language":{"type":"string","title":"Language","examples":["English"]},"markdown":{"type":"string","title":"Markdown"},"text":{"type":"string","title":"Text"}},"type":"object","required":["language","markdown","text"],"title":"Translation"}},"securitySchemes":{"RapidAPIKey":{"type":"apiKey","in":"header","name":"X-RapidAPI-Key"},"RapidAPIHost":{"type":"apiKey","in":"header","name":"X-RapidAPI-Host"}}},"tags":[{"name":"OCR","description":"Image to text, with its layout kept as Markdown."}],"security":[{"RapidAPIKey":[],"RapidAPIHost":[]}]}