U

Up · Decode

by Up

POSTBase

$0.001

per call · USD Coin on Base

Decode QR/barcodes from a base64-encoded image; returns each detected code's type, decoded text, bounding rect, and polygon.

Endpoint

POST https://qr-api-production-1836.up.railway.app/decode

2

Calls / 30d

1

Unique payers / 30d

Aug 28

Last called

exact

Payment scheme

Call this service

TypeScript · @x402/fetch
import { wrapFetchWithPayment } from "@x402/fetch";
import { privateKeyToAccount } from "viem/accounts";

const account = privateKeyToAccount(process.env.PRIVATE_KEY);
const fetchWithPay = wrapFetchWithPayment(fetch, account);

const res = await fetchWithPay("https://qr-api-production-1836.up.railway.app/decode", {
  method: "POST",
  headers: { "Content-Type": "application/json" },
  body: JSON.stringify({
    "image_base64": "iVBORw0KGgoAAAANSUhEUgAAASIAAAEiCAYAAABdvt+2AAAABmJLR0QA/wD/AP+gvaeTAAAF..."
  }),
});
const data = await res.json();
cURL
curl -X POST \
  "https://qr-api-production-1836.up.railway.app/decode" \
  -H "Content-Type: application/json" \
  -d '{"image_base64":"iVBORw0KGgoAAAANSUhEUgAAASIAAAEiCAYAAABdvt+2AAAABmJLR0QA/wD/AP+gvaeTAAAF..."}' \
  -H "X-PAYMENT: <signed x402 payment>"

Example response

{
  "count": 1,
  "image_size": {
    "height": 330,
    "width": 330
  },
  "results": [
    {
      "data": "https://payapi.market",
      "polygon": [
        {
          "x": 40,
          "y": 40
        },
        {
          "x": 40,
          "y": 290
        },
        {
          "x": 290,
          "y": 290
        },
        {
          "x": 290,
          "y": 40
        }
      ],
      "rect": {
        "height": 250,
        "left": 40,
        "top": 40,
        "width": 250
      },
      "type": "QRCODE"
    }
  ]
}

Payment details

Pay to0xffc458db291b4abce020fe3de4f91f2770e537b1
AssetUSD Coin · 0x833589fcd6edb6e08f4c7c32d4f71b54bda02913
NetworksBase
Schemesexact

Is this your API?

Pin it to the top of Other and the homepage with a featured placement.

Get featured →

More from Up & similar services