Overview
Extract text from a single image using state-of-the-art OCR powered by Azure Mistral Document AI. Perfect for receipts, invoices, screenshots, scanned documents, and more.Authentication
All OCR endpoints require authentication via Bearer token in the Authorization header.Request
You can submit images via either file upload or base64-encoded JSON.Method 1: File Upload (multipart/form-data)
Method 2: Base64 JSON
Request Body (JSON Method)
- image string — Base64-encoded image data (with or without data URI prefix)
Responses
Success Response
No Text Found
Field Reference
- success boolean — Whether text extraction succeeded.
- text string — Extracted text from the image (processed from markdown).
- method string — Always
"mistral_document_ai"for OCR processing. - raw_response object — Complete unprocessed response from Mistral Document AI, including:
- pages array — Array of page data (single page for images)
- index number — Page index (0 for images)
- markdown string — Extracted text in markdown format
- text string — Plain text version
- Additional metadata fields
- model string — Model used (e.g.,
mistral-document-ai-2505)
- pages array — Array of page data (single page for images)
Supported Image Formats
- PNG
- JPEG/JPG
- GIF
- WebP
Error Responses
Authentication Required
401 Unauthorized
Invalid API Key
503 Service Unavailable
Invalid Request
400 Bad Request
Performance Tips
- Image Quality: Higher resolution images produce better OCR results
- File Format: PNG and JPEG work best
- File Size: Keep images under 10MB for optimal performance
- Parallel Processing: For multiple images, make parallel requests