Image to Text (OCR)

Read text from an image, including screenshots and document photos. Returns extracted text, a confidence estimate and detected language.

Pay by wallet (x402) AI-generated image-to-text

Example

Example answer
{
  "text": "",
  "text_type": null,
  "confidence": "high",
  "language_detected": null
}

Inputs

FieldTypeRequiredWhat it is
base64stringNoBase64-encoded image
image_urlstringNoURL to image

Output fields

How reliably each field appears in a successful answer.

FieldTypeAppears
textstringAlways (present in every successful answer)
text_typestringAlways (present in every successful answer)
confidencestringAlways (present in every successful answer)
language_detectedstringAlways (present in every successful answer)

How to call it

The same tool through each route. MCP clients reach it through Strale’s server at https://api.strale.io/mcp; the call below is what the agent sends.

# Needs an API key. max_price_cents caps what this call may cost.
curl -X POST https://api.strale.io/v1/do \
  -H "Authorization: Bearer $STRALE_API_KEY" \
  -H 'Content-Type: application/json' \
  -d '{
    "capability_slug": "image-to-text",
    "inputs": {
      "image_url": "https://upload.wikimedia.org/wikipedia/commons/a/a9/Example.jpg"
    },
    "max_price_cents": 5
  }'

Limitations

  • Handwriting and complex layouts reduce OCR accuracy

    AI-powered OCR — handwritten text, low-resolution images, and complex layouts (multi-column, overlapping) have lower accuracy

    What to do instead: Pre-process images to improve contrast and resolution before submission for better OCR results

  • Input images are limited to 4 MiB decoded

    Images supplied by URL or base64 are refused above 4 MiB of decoded data, with a caller_input error naming the input field and no charge. Resize or compress the image before submitting.

Related tools