OCR API Testing
Testing keys automatically include the playground header when supported by the OCR gateway.
{% if not api_keys %}No API keys. Create one
{% endif %}Service: OCR API
Version: 1.0.0
Note: All OCR endpoints require X-API-Key header.
Health: GET https://api.pezamw.com/health
Endpoints: /v1/ocr/text, /v1/ocr/extract, /v1/ocr/invoice, /v1/ocr/receipt, /v1/ocr/invoice/validate, /v1/ocr/kyc, /v1/ocr/bank-statement, /v1/ocr/utility-bill, /v1/ocr/business-card, /v1/ocr/pdf-to-json, /v1/ocr/data-entry, /v1/ocr/classify, /v1/ocr/risk-signals
Drag & drop or click to browse
JPG, PNG, WEBP, BMP, TIFF, PDF (max 10MB)
API Response
{
"status": "ready",
"message": "Upload a document and test"
}
Response Headers
—
Code Examples
curl -X POST \ -H "X-API-Key: YOUR_KEY" \ -F "image=@document.jpg" \ https://api.pezamw.com/v1/ocr/text
import requests
api_key = "YOUR_KEY"
endpoint = "https://api.pezamw.com/v1/ocr/text"
with open("document.jpg", "rb") as f:
files = {"image": f}
headers = {"X-API-Key": api_key}
response = requests.post(endpoint, files=files, headers=headers)
print(response.json())
const formData = new FormData();
formData.append('image', imageFile);
const response = await fetch('https://api.pezamw.com/v1/ocr/text', {
method: 'POST',
headers: {
'X-API-Key': 'YOUR_KEY'
},
body: formData
});
const result = await response.json();
console.log(result);
const axios = require('axios');
const FormData = require('form-data');
const fs = require('fs');
const formData = new FormData();
formData.append('image', fs.createReadStream('document.jpg'));
axios.post('https://api.pezamw.com/v1/ocr/text', formData, {
headers: {
'X-API-Key': 'YOUR_KEY',
...formData.getHeaders()
}
}).then(res => console.log(res.data));