{
  "x402Version": 2,
  "id": 27792,
  "slug": "27792",
  "resource": "https://agent402.tools/api/image-ocr",
  "description": "Extract text from a PNG or JPEG image - full text, overall confidence and per-line bounding boxes - from a URL or base64 payload, Tesseract on-device (no upstream API). Default English; other ISO 639-2 languages on request. Use it when an agent needs the words in a screenshot, scan or photo.",
  "type": "http",
  "serviceName": "Image OCR",
  "iconUrl": "https://res.cloudinary.com/bdb-prod/image/upload/c_fill,ar_1:1,w_256,h_256,f_auto,q_auto/v1787497819/bazaar-icons/478aced8e219894c.png",
  "resourceType": "Payments",
  "accepts": [
    {
      "scheme": "exact",
      "network": "eip155:8453",
      "payTo": "0xaBF4FAbd7c416fB67202E5f9002389Fc75e2a9D0",
      "asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
      "amount": "10000",
      "amountUsd": 0.01,
      "maxTimeoutSeconds": 300
    },
    {
      "scheme": "exact",
      "network": "eip155:137",
      "payTo": "0xaBF4FAbd7c416fB67202E5f9002389Fc75e2a9D0",
      "asset": "0x3c499c542cEF5E3811e1192ce70d8cC03d5c3359",
      "amount": "10000",
      "amountUsd": 0.01,
      "maxTimeoutSeconds": 300
    },
    {
      "scheme": "exact",
      "network": "eip155:42161",
      "payTo": "0xaBF4FAbd7c416fB67202E5f9002389Fc75e2a9D0",
      "asset": "0xaf88d065e77c8cC2239327C5EDb3A432268e5831",
      "amount": "10000",
      "amountUsd": 0.01,
      "maxTimeoutSeconds": 300
    },
    {
      "scheme": "exact",
      "network": "eip155:143",
      "payTo": "0xaBF4FAbd7c416fB67202E5f9002389Fc75e2a9D0",
      "asset": "0x754704Bc059F8C67012fEd69BC8A327a5aafb603",
      "amount": "10000",
      "maxTimeoutSeconds": 300
    },
    {
      "scheme": "exact",
      "network": "eip155:43114",
      "payTo": "0xaBF4FAbd7c416fB67202E5f9002389Fc75e2a9D0",
      "asset": "0xB97EF9Ef8734C71904D8002F8b6Bc66Dd9c48a6E",
      "amount": "10000",
      "maxTimeoutSeconds": 300
    },
    {
      "scheme": "exact",
      "network": "eip155:1329",
      "payTo": "0xaBF4FAbd7c416fB67202E5f9002389Fc75e2a9D0",
      "asset": "0xe15fC38F6D8c56aF07bbCBe3BAf5708A2Bf42392",
      "amount": "10000",
      "maxTimeoutSeconds": 300
    },
    {
      "scheme": "exact",
      "network": "eip155:10",
      "payTo": "0xaBF4FAbd7c416fB67202E5f9002389Fc75e2a9D0",
      "asset": "0x0b2C639c533813f4Aa9D7837CAf62653d097Ff85",
      "amount": "11000",
      "maxTimeoutSeconds": 300
    },
    {
      "scheme": "exact",
      "network": "eip155:4663",
      "payTo": "0xaBF4FAbd7c416fB67202E5f9002389Fc75e2a9D0",
      "asset": "0x5fc5360D0400a0Fd4f2af552ADD042D716F1d168",
      "amount": "10000",
      "maxTimeoutSeconds": 300
    },
    {
      "scheme": "exact",
      "network": "eip155:42220",
      "payTo": "0xaBF4FAbd7c416fB67202E5f9002389Fc75e2a9D0",
      "asset": "0xcebA9300f2b948710d2653dD7B07f33A8B32118C",
      "amount": "10000",
      "maxTimeoutSeconds": 300
    },
    {
      "scheme": "upto",
      "network": "eip155:8453",
      "payTo": "0xaBF4FAbd7c416fB67202E5f9002389Fc75e2a9D0",
      "asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
      "amount": "10000",
      "amountUsd": 0.01,
      "maxTimeoutSeconds": 300
    },
    {
      "scheme": "exact",
      "network": "solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp",
      "payTo": "J7aN3PLJnTCF5qpEnvJHJsnCjcGuqC2rYtEM8Gv3xwg",
      "asset": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
      "amount": "10000",
      "amountUsd": 0.01,
      "maxTimeoutSeconds": 300
    },
    {
      "scheme": "exact",
      "network": "stellar:pubnet",
      "payTo": "GDNJXCKW7ZM7GEEVP674TWPU26YJNBQ2FI4ZIPRKTPTNUEJMDHFJWWRL",
      "asset": "CCW67TSZV3SSS2HXMBQ5JFGCKJNXKZM7UQUWUZPUTHXSTZLEO7SJMI75",
      "amount": "100000",
      "maxTimeoutSeconds": 300
    },
    {
      "scheme": "exact",
      "network": "algorand:wGHE2Pwdvd7S12BL5FaOP20EGYesN73ktiC1qzkkit8=",
      "payTo": "C7IIHG7SPLPZ5H7ZT6HW3UV2OQMQQE6Y2HBNGZXSLRJULE42BEE2OY2XIE",
      "asset": "31566704",
      "amount": "10000",
      "maxTimeoutSeconds": 300
    }
  ],
  "outputSchema": {
    "properties": {
      "example": {
        "properties": {
          "confidence": {
            "type": "integer"
          },
          "lang": {
            "type": "string"
          },
          "lineCount": {
            "type": "integer"
          },
          "lines": {
            "items": {
              "properties": {
                "bbox": {
                  "properties": {
                    "x0": {
                      "type": "integer"
                    },
                    "x1": {
                      "type": "integer"
                    },
                    "y0": {
                      "type": "integer"
                    },
                    "y1": {
                      "type": "integer"
                    }
                  },
                  "type": "object"
                },
                "confidence": {
                  "type": "number"
                },
                "text": {
                  "type": "string"
                }
              },
              "type": "object"
            },
            "type": "array"
          },
          "source": {
            "type": "string"
          },
          "text": {
            "type": "string"
          }
        },
        "required": [
          "text",
          "confidence",
          "lang",
          "lineCount",
          "lines",
          "source"
        ],
        "type": "object"
      },
      "type": {
        "type": "string"
      }
    },
    "required": [
      "type"
    ],
    "type": "object"
  },
  "extensions": {
    "bazaar": {
      "info": {
        "input": {
          "body": {
            "url": "https://agent402.tools/fixtures/sample-text.png"
          },
          "bodyType": "json",
          "method": "POST",
          "type": "http"
        },
        "output": {
          "example": {
            "confidence": 94,
            "lang": "eng",
            "lineCount": 2,
            "lines": [
              {
                "bbox": {
                  "x0": 24,
                  "x1": 469,
                  "y0": 29,
                  "y1": 60
                },
                "confidence": 94.34,
                "text": "Agent402 sample text for OCR."
              },
              {
                "bbox": {
                  "x0": 27,
                  "x1": 514,
                  "y0": 81,
                  "y1": 106
                },
                "confidence": 96.31,
                "text": "Invoice 402-0001 total 12.34 USD."
              }
            ],
            "source": "tesseract.js (Tesseract WASM, Apache-2.0)",
            "text": "Agent402 sample text for OCR.\nInvoice 402-0001 total 12.34 USD."
          },
          "type": "json"
        }
      },
      "schema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "properties": {
          "input": {
            "additionalProperties": false,
            "properties": {
              "body": {
                "properties": {
                  "image": {
                    "description": "Base64 PNG/JPEG (data: URL prefix accepted). Either this or url is required.",
                    "type": "string"
                  },
                  "lang": {
                    "description": "Language code, ISO 639-2. Default 'eng'. Supported: eng, spa, fra, deu, ita, por, nld, rus, pol, tur, chi_sim, chi_tra, jpn, kor, ara, hin, tha, vie, ukr, ell.",
                    "type": "string"
                  },
                  "url": {
                    "description": "HTTPS URL to fetch the image from (max 8 MB). Either this or image is required.",
                    "type": "string"
                  }
                }
              },
              "bodyType": {
                "enum": [
                  "json",
                  "form-data",
                  "text"
                ],
                "type": "string"
              },
              "method": {
                "enum": [
                  "POST"
                ],
                "type": "string"
              },
              "type": {
                "const": "http",
                "type": "string"
              }
            },
            "required": [
              "type",
              "method",
              "bodyType",
              "body"
            ],
            "type": "object"
          },
          "output": {
            "properties": {
              "example": {
                "properties": {
                  "confidence": {
                    "type": "integer"
                  },
                  "lang": {
                    "type": "string"
                  },
                  "lineCount": {
                    "type": "integer"
                  },
                  "lines": {
                    "items": {
                      "properties": {
                        "bbox": {
                          "properties": {
                            "x0": {
                              "type": "integer"
                            },
                            "x1": {
                              "type": "integer"
                            },
                            "y0": {
                              "type": "integer"
                            },
                            "y1": {
                              "type": "integer"
                            }
                          },
                          "type": "object"
                        },
                        "confidence": {
                          "type": "number"
                        },
                        "text": {
                          "type": "string"
                        }
                      },
                      "type": "object"
                    },
                    "type": "array"
                  },
                  "source": {
                    "type": "string"
                  },
                  "text": {
                    "type": "string"
                  }
                },
                "required": [
                  "text",
                  "confidence",
                  "lang",
                  "lineCount",
                  "lines",
                  "source"
                ],
                "type": "object"
              },
              "type": {
                "type": "string"
              }
            },
            "required": [
              "type"
            ],
            "type": "object"
          }
        },
        "required": [
          "input"
        ],
        "type": "object"
      }
    },
    "builder-code": {
      "info": {
        "a": "bc_b4aw4uzd"
      },
      "schema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "additionalProperties": false,
        "properties": {
          "a": {
            "description": "App builder code",
            "pattern": "^[a-z0-9_]{1,32}$",
            "type": "string"
          },
          "s": {
            "description": "Service builder codes",
            "items": {
              "pattern": "^[a-z0-9_]{1,32}$",
              "type": "string"
            },
            "maxItems": 11,
            "type": "array"
          },
          "w": {
            "description": "Wallet builder code",
            "pattern": "^[a-z0-9_]{1,32}$",
            "type": "string"
          }
        },
        "type": "object"
      }
    },
    "payment-identifier": {
      "info": {
        "required": false
      },
      "schema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "properties": {
          "id": {
            "maxLength": 128,
            "minLength": 16,
            "pattern": "^[a-zA-Z0-9_-]+$",
            "type": "string"
          },
          "required": {
            "type": "boolean"
          }
        },
        "required": [
          "required"
        ],
        "type": "object"
      }
    }
  },
  "tags": [
    "data",
    "ocr",
    "image",
    "text-extraction",
    "tesseract",
    "bazaar",
    "builder-code",
    "payment-identifier"
  ],
  "sourceHost": "agent402.tools",
  "lastUpdated": "2026-10-08T06:12:50.334Z",
  "quality": {
    "calls30d": 8,
    "uniquePayers30d": 6,
    "lastCalledAt": "2026-10-08T06:12:50.139Z"
  },
  "metadata": {
    "serviceName": "Image OCR",
    "iconUrl": "https://res.cloudinary.com/bdb-prod/image/upload/c_fill,ar_1:1,w_256,h_256,f_auto,q_auto/v1787497819/bazaar-icons/478aced8e219894c.png",
    "extensions": {
      "bazaar": {
        "info": {
          "input": {
            "body": {
              "url": "https://agent402.tools/fixtures/sample-text.png"
            },
            "bodyType": "json",
            "method": "POST",
            "type": "http"
          },
          "output": {
            "example": {
              "confidence": 94,
              "lang": "eng",
              "lineCount": 2,
              "lines": [
                {
                  "bbox": {
                    "x0": 24,
                    "x1": 469,
                    "y0": 29,
                    "y1": 60
                  },
                  "confidence": 94.34,
                  "text": "Agent402 sample text for OCR."
                },
                {
                  "bbox": {
                    "x0": 27,
                    "x1": 514,
                    "y0": 81,
                    "y1": 106
                  },
                  "confidence": 96.31,
                  "text": "Invoice 402-0001 total 12.34 USD."
                }
              ],
              "source": "tesseract.js (Tesseract WASM, Apache-2.0)",
              "text": "Agent402 sample text for OCR.\nInvoice 402-0001 total 12.34 USD."
            },
            "type": "json"
          }
        },
        "schema": {
          "$schema": "https://json-schema.org/draft/2020-12/schema",
          "properties": {
            "input": {
              "additionalProperties": false,
              "properties": {
                "body": {
                  "properties": {
                    "image": {
                      "description": "Base64 PNG/JPEG (data: URL prefix accepted). Either this or url is required.",
                      "type": "string"
                    },
                    "lang": {
                      "description": "Language code, ISO 639-2. Default 'eng'. Supported: eng, spa, fra, deu, ita, por, nld, rus, pol, tur, chi_sim, chi_tra, jpn, kor, ara, hin, tha, vie, ukr, ell.",
                      "type": "string"
                    },
                    "url": {
                      "description": "HTTPS URL to fetch the image from (max 8 MB). Either this or image is required.",
                      "type": "string"
                    }
                  }
                },
                "bodyType": {
                  "enum": [
                    "json",
                    "form-data",
                    "text"
                  ],
                  "type": "string"
                },
                "method": {
                  "enum": [
                    "POST"
                  ],
                  "type": "string"
                },
                "type": {
                  "const": "http",
                  "type": "string"
                }
              },
              "required": [
                "type",
                "method",
                "bodyType",
                "body"
              ],
              "type": "object"
            },
            "output": {
              "properties": {
                "example": {
                  "properties": {
                    "confidence": {
                      "type": "integer"
                    },
                    "lang": {
                      "type": "string"
                    },
                    "lineCount": {
                      "type": "integer"
                    },
                    "lines": {
                      "items": {
                        "properties": {
                          "bbox": {
                            "properties": {
                              "x0": {
                                "type": "integer"
                              },
                              "x1": {
                                "type": "integer"
                              },
                              "y0": {
                                "type": "integer"
                              },
                              "y1": {
                                "type": "integer"
                              }
                            },
                            "type": "object"
                          },
                          "confidence": {
                            "type": "number"
                          },
                          "text": {
                            "type": "string"
                          }
                        },
                        "type": "object"
                      },
                      "type": "array"
                    },
                    "source": {
                      "type": "string"
                    },
                    "text": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "text",
                    "confidence",
                    "lang",
                    "lineCount",
                    "lines",
                    "source"
                  ],
                  "type": "object"
                },
                "type": {
                  "type": "string"
                }
              },
              "required": [
                "type"
              ],
              "type": "object"
            }
          },
          "required": [
            "input"
          ],
          "type": "object"
        }
      },
      "builder-code": {
        "info": {
          "a": "bc_b4aw4uzd"
        },
        "schema": {
          "$schema": "https://json-schema.org/draft/2020-12/schema",
          "additionalProperties": false,
          "properties": {
            "a": {
              "description": "App builder code",
              "pattern": "^[a-z0-9_]{1,32}$",
              "type": "string"
            },
            "s": {
              "description": "Service builder codes",
              "items": {
                "pattern": "^[a-z0-9_]{1,32}$",
                "type": "string"
              },
              "maxItems": 11,
              "type": "array"
            },
            "w": {
              "description": "Wallet builder code",
              "pattern": "^[a-z0-9_]{1,32}$",
              "type": "string"
            }
          },
          "type": "object"
        }
      },
      "payment-identifier": {
        "info": {
          "required": false
        },
        "schema": {
          "$schema": "https://json-schema.org/draft/2020-12/schema",
          "properties": {
            "id": {
              "maxLength": 128,
              "minLength": 16,
              "pattern": "^[a-zA-Z0-9_-]+$",
              "type": "string"
            },
            "required": {
              "type": "boolean"
            }
          },
          "required": [
            "required"
          ],
          "type": "object"
        }
      }
    }
  },
  "liveness": {
    "reliability": null
  },
  "verified": false,
  "featured": false,
  "provider": {
    "host": "agent402.tools",
    "manifest_name": "agent402.tools",
    "source": "cdp-mirror",
    "source_manifest_url": "https://api.cdp.coinbase.com/platform/v2/x402/discovery/resources",
    "submitted_at": "2026-10-14T01:15:01.050Z"
  },
  "exampleResponse": {
    "example": {
      "confidence": 0,
      "lang": "string",
      "lineCount": 0,
      "lines": [
        {
          "bbox": {
            "x0": 0,
            "x1": 0,
            "y0": 0,
            "y1": 0
          },
          "confidence": 0,
          "text": "string"
        }
      ],
      "source": "string",
      "text": "string"
    },
    "type": "string"
  }
}