{"openapi":"3.1.0","info":{"title":"Mathpix via Locus MPP","version":"1.0.0","description":"OCR for math, science, and documents — extract LaTeX, MathML, and Mathpix Markdown from images and handwriting."},"x-service-info":{"categories":["ai"],"docs":{"homepage":"https://mathpix.com","apiReference":"https://docs.mathpix.com","llms":"https://beta.paywithlocus.com/mpp/mathpix.md"}},"paths":{"/mathpix/process-image":{"post":{"summary":"Process Image","x-payment-info":{"intent":"charge","method":"tempo","amount":"5000","currency":"0x20c000000000000000000000b9537d11c60e8b50"},"responses":{"200":{"description":"Successful response"},"402":{"description":"Payment Required"}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"src":{"type":"string","description":"Image URL (http/https) or base64-encoded image (data:image/...;base64,...)"},"formats":{"type":"string","description":"Output formats to return: \"text\", \"data\", \"html\", \"latex_styled\". Defaults to [\"text\"]."},"math_inline_delimiters":{"type":"string","description":"Custom inline math delimiters, e.g. [\"$\", \"$\"]. Default: [\"\\\\(\", \"\\\\)\"]."},"math_display_delimiters":{"type":"string","description":"Custom display math delimiters, e.g. [\"$$\", \"$$\"]. Default: [\"\\\\[\", \"\\\\]\"]."},"rm_spaces":{"type":"boolean","description":"Remove extra whitespace from equations. Default: true."},"rm_fonts":{"type":"boolean","description":"Strip font commands like \\mathbf. Default: false."},"idiomatic_eqn_arrays":{"type":"boolean","description":"Use aligned/gathered instead of array environments. Default: false."},"include_line_data":{"type":"boolean","description":"Return line-by-line segmentation data."},"include_word_data":{"type":"boolean","description":"Return word-level segmentation data."},"include_smiles":{"type":"boolean","description":"Enable chemistry diagram OCR (returns SMILES notation)."},"confidence_threshold":{"type":"number","description":"Minimum confidence (0–1) before returning an error."},"region":{"type":"string","description":"Pixel region to process: { x1, y1, x2, y2 } coordinates."}},"required":["src"]}}}}}},"/mathpix/process-strokes":{"post":{"summary":"Process Strokes","x-payment-info":{"intent":"charge","method":"tempo","amount":"13000","currency":"0x20c000000000000000000000b9537d11c60e8b50"},"responses":{"200":{"description":"Successful response"},"402":{"description":"Payment Required"}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"strokes":{"type":"string","description":"Stroke data: { x: [[x1, x2, ...], ...], y: [[y1, y2, ...], ...] } — arrays of coordinate arrays per stroke."},"formats":{"type":"string","description":"Output formats: \"text\", \"data\", \"html\", \"latex_styled\"."},"math_inline_delimiters":{"type":"string","description":"Custom inline math delimiters."},"math_display_delimiters":{"type":"string","description":"Custom display math delimiters."},"rm_spaces":{"type":"boolean","description":"Remove extra whitespace from equations. Default: true."},"rm_fonts":{"type":"boolean","description":"Strip font commands. Default: false."},"metadata":{"type":"string","description":"Custom key-value metadata, e.g. { improve_mathpix: true }."}},"required":["strokes"]}}}}}}}}