{
  "format": "delx/intent-card/v1",
  "id": "image-ocr-api",
  "intent": "extract text from an image for an agent",
  "title": "Image OCR API for agents",
  "description": "Extract English machine-printed text from one caller-supplied PNG, JPEG, or WebP for $0.01 with confidence and SHA-256 receipt—no URL fetch, storage or paid vision provider.",
  "keywords": [
    "image OCR API",
    "OCR API for agents",
    "extract text from image",
    "Tesseract OCR",
    "x402 image OCR"
  ],
  "updated_at": "2026-08-06",
  "canonical_url": "https://commerce.delx.ai/intents/image-ocr-api",
  "machine_url": "https://commerce.delx.ai/intents/image-ocr-api.json",
  "recommendation": {
    "tool_name": "extract_image_text",
    "service_name": "Image OCR for Agents",
    "method": "POST",
    "resource": "https://api.delx.ai/api/v1/x402/image-ocr",
    "price_usdc": "0.01",
    "payment_protocols": [
      "x402",
      "mpp"
    ],
    "input_schema": {
      "type": "object",
      "properties": {
        "image_base64": {
          "type": "string",
          "minLength": 1,
          "maxLength": 8388608,
          "description": "One base64-encoded PNG, JPEG, or WebP image up to 6 MiB decoded; image/* data URIs are accepted."
        },
        "image": {
          "type": "string",
          "minLength": 1,
          "maxLength": 8388608,
          "description": "Alias for image_base64."
        },
        "max_chars": {
          "type": "integer",
          "minimum": 1,
          "maximum": 200000,
          "default": 200000
        },
        "psm": {
          "type": "integer",
          "enum": [
            3,
            6,
            11
          ],
          "default": 6,
          "description": "Tesseract page segmentation mode for machine-printed text."
        }
      },
      "required": [
        "image_base64"
      ],
      "additionalProperties": false
    },
    "example_input": {
      "image_base64": "\u003cbase64 PNG up to 6 MiB decoded>",
      "max_chars": 200000,
      "psm": 6
    },
    "example_output": {
      "schema": "delx/ocr/v1",
      "scope": "image_ocr",
      "document_id": "image_8b4d5e6f7a8b9c0d1e2f3a4b5c6d7e8f",
      "input_sha256": "8b4d5e6f7a8b9c0d1e2f3a4b5c6d7e8f901234567890abcdef1234567890ab",
      "output_sha256": "c5f7b2d4c1e7a0f9b6d2e8c3a4f5b6071234567890abcdef1234567890abcdef",
      "bytes": 48210,
      "text": "Printed text recognized from the image",
      "chars": 39,
      "words_observed": 7,
      "confidence": 96.42,
      "language": "eng",
      "psm": 6,
      "pages_observed": 1,
      "total_pages": 1,
      "truncated": false,
      "provider": "first-party",
      "model": "tesseract-5",
      "upstream_cost_usd": 0,
      "sale_price_usdc": 0.01,
      "gross_margin_floor_usd": 0.0097375,
      "attribution": "Text recognized locally by Delx with Tesseract; no image is stored, fetched, or sent to a third-party provider."
    },
    "agentcash": {
      "buy": "npx agentcash@latest fetch https://api.delx.ai/api/v1/x402/image-ocr -m POST -H 'x-delx-source: intent-card-image-ocr-api' --max-amount 0.01 -b '{\"image_base64\":\"\u003cbase64 PNG up to 6 MiB decoded>\",\"max_chars\":200000,\"psm\":6}'",
      "max_amount_usdc": "0.01"
    }
  },
  "attribution": {
    "header": "x-delx-source",
    "value": "intent-card-image-ocr-api"
  },
  "evidence": {
    "paid_openapi": "https://api.delx.ai/openapi.x402.json",
    "governed_portfolio": "https://api.delx.ai/x402-portfolio.json",
    "live_contract": "https://api.delx.ai/api/v1/x402/image-ocr"
  }
}
