{"uid":"cap_ifp22DQne3xK8iEOXfWRs","slug":"mathpix-via-locus-x402-math-science-ocr-534ff37c","name":"Mathpix via Locus x402 — Math & Science OCR","description":"OCR for math, science, and documents — extract LaTeX, MathML, and Mathpix Markdown from images and handwriting.","url":"https://mathpix.x402.paywithlocus.com/mathpix/process-image?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"src":{"type":"string"},"region":{"type":"object","additionalProperties":true},"formats":{"type":"array","items":{"type":"string"}},"rm_fonts":{"type":"boolean"},"rm_spaces":{"type":"boolean"},"include_smiles":{"type":"boolean"},"include_line_data":{"type":"boolean"},"include_word_data":{"type":"boolean"},"confidence_threshold":{"type":"number"},"idiomatic_eqn_arrays":{"type":"boolean"},"math_inline_delimiters":{"type":"array","items":{"type":"string"}},"math_display_delimiters":{"type":"array","items":{"type":"string"}}}},"responseSchema":{"type":"json","example":{"data":{},"payment":{"scheme":"exact","settledUsdc":"0.001000","authorizedMaxUsdc":"0.001000"},"request":{"id":"00000000-0000-4000-8000-000000000000","statusUrl":"/requests/00000000-0000-4000-8000-000000000000"},"success":true}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.005","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.005/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.005","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.005","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_xe0mP9Soc1zxmh-xAINFv","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.005","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Extracts LaTeX, MathML, and structured text from images of mathematical equations, scientific notation, and handwritten content using Mathpix OCR, payable via x402 micropayment.","exampleAgentPrompt":"Can you extract the LaTeX from this image of a handwritten calculus equation? Here's the URL: https://example.com/equation.jpg — return it in latex_styled format and also include any chemistry diagrams as SMILES if present.","exampleUseCases":[{"title":"Digitize handwritten homework solutions","prompt":"I have a photo of my student's handwritten math homework — can you run it through Mathpix OCR and give me the full LaTeX so I can paste it into Overleaf? The image URL is https://example.com/homework.png, and I want both text and latex_styled output."},{"title":"Extract equations from textbook screenshots","prompt":"Here's a screenshot of a page from a physics textbook: https://example.com/textbook_page.jpg — please extract all the equations as LaTeX and return the output with line-by-line segmentation so I can see which formula is on which line."},{"title":"Convert chemistry diagram image to SMILES","prompt":"I've got an image of a chemical structure diagram at https://example.com/molecule.png — can you use Mathpix to extract it and return the SMILES notation for the compound?"}],"resultDescription":"Returns a JSON object containing the requested output formats (e.g. LaTeX, text, HTML, latex_styled), optional line/word segmentation data, SMILES for chemistry diagrams, and payment settlement details including the USDC amount charged. The 'data' field holds the OCR results keyed by requested format.","failureModes":["Image URL is unreachable or returns a non-image response — OCR fails with an error","Confidence score falls below the specified confidence_threshold — returns an error instead of low-quality output","Image contains no recognizable math or text — returns empty or minimal output","Invalid base64 encoding of image — request fails with a parsing error","Unsupported output format string in 'formats' array — may be ignored or cause a validation error","Payment authorization fails — request is rejected before processing begins"],"whenToPreferThis":"Choose this endpoint when you need to extract structured mathematical notation (LaTeX, MathML) or scientific content from images or handwritten documents. It is specifically optimized for math and science OCR, outperforming general-purpose OCR tools on equations, matrices, integrals, and chemistry diagrams. Prefer it over generic OCR when the content contains symbolic math, and over manual transcription pipelines when you need LaTeX output directly. The x402 micropayment model makes it practical for per-call agent workflows without subscription overhead.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-11T12:37:20.646Z","isFirstParty":false,"canonicalSlug":"mathpix-via-locus-x402-math-science-ocr-534ff37c"}