Extract text from images using optical character recognition. Upload an image containing text and get back the recognized content as a string.
Base URL:
https://pylon-ocr-api.fly.dev
| Parameter | Type | Required | Description |
|---|---|---|---|
file | file (multipart) | Yes | Image file containing text (PNG, JPEG, WebP) |
Returns JSON with extracted text (200 OK).
{
"text": "Extracted text from the image...",
"confidence": 0.97
}| Status | Description |
|---|---|
200 | Extracted text returned as JSON |
402 | Payment required — x402 challenge returned |
400 | Missing or invalid image file |
500 | OCR processing failed |
$0.01 USDC per request — paid via x402 on Base Sepolia. No API key. No subscription. Pay per call.
curl -X POST "https://pylon-ocr-api.fly.dev/ocr" \
-F "file=@receipt.png"
To use Pylon APIs, you need an x402-compatible client with a funded wallet on Base Sepolia. Here's the quick setup:
The x402 flow: your first request returns 402 Payment Required with payment details in headers. The x402 client signs a USDC payment, then retries with payment proof attached. All automatic, all in milliseconds.