Agentic Portal

Barcode and QR Code Tool API

documents
Serving

Decode, generate or validate barcodes and QR codes. Decode reads up to 32 codes from a public HTTPS image (QR, Data Matrix, Aztec, PDF417, EAN, UPC, Code 128 and more); generate answers a temporary HTTPS URL to a PNG or SVG, kept one hour; validate checks a payload and its check digit. POST /v1/barcode with operation. Pay per request in USDC; no account, no API key.

Endpoint
POST https://test.agent.pocket.network/v1/barcode-tools/v1/barcode
Price per call
$0.005 USD
Networks payable on
Base Sepolia (eip155:84532)
Protocol
rest

Calling it

The first call returns 402 Payment Required with the terms. Sign for those terms and retry the same request with the payment attached.

Example request

A real, working call — the request the service card verifies against.

curl -X POST https://test.agent.pocket.network/v1/barcode-tools/v1/barcode \
  -H 'content-type: application/json' \
  -d '{"operation":"validate","params":{"format":"ean13","text":"4006381333931"}}'
Example response

The response this call returned, captured 2026-10-16 13:18:56 UTC.

{
  "portal": {
    "provenance": "third-party-supplier",
    "serviceId": "barcode-tools",
    "schemaCheck": "unchecked"
  },
  "data": {
    "ok": true,
    "operation": "validate",
    "valid": true,
    "format": "EAN13"
  }
}

Try it

Make one real paid call from your own wallet — about $0.005 on Base Sepolia (eip155:84532). The wallet signs; nothing here holds a key. You'll see exactly what the service answers.

No browser wallet found. Install MetaMask, Rabby, or Coinbase Wallet to try a call here.

Supported methods

Methods the registry lists for this service. The portal forwards any call as sent; the supplier decides what it answers, and a delivered answer is settled.

Methods Barcode and QR Code Tool API accepts, and whether each reads or writes.
MethodEffect
GET /v1/healthread
GET /v1/identityread
POST /v1/barcoderead
POST /v1/self-testread

Schemas

Published by the service itself. The example above is generated from these.

Request schema
{
  "type": "object",
  "description": "The body of POST /v1/barcode. Each operation's fields are in the OpenAPI document the backend serves at /openapi.json. Format names are lowercase, as the formats operation lists them, e.g. qr_code, data_matrix, ean13, code128.",
  "required": [
    "operation"
  ],
  "properties": {
    "operation": {
      "type": "string",
      "enum": [
        "decode",
        "generate",
        "validate",
        "formats"
      ],
      "description": "decode reads an image; generate draws a code; validate checks a payload against a format; formats lists what can be read and written."
    },
    "image_url": {
      "type": "string",
      "maxLength": 2048,
      "description": "For decode, the public HTTPS image to read."
    },
    "params": {
      "type": "object",
      "description": "For decode, optional {formats, try_harder, max_results (1 to 32)}. For generate and validate, {format, text (up to 4096 characters)}, and for generate also width and height (1 to 4096, default 1024), margin, error_correction (L, M, Q, H) and output_format (png or svg)."
    }
  }
}
Response schema
{
  "type": "object",
  "description": "A JSON object with ok and operation. decode adds results (format, text, bytes_base64, position, orientation, is_valid) and count; generate adds output with barcode_format, image_format, width, height, bytes, url and expires_in_seconds; validate adds valid and format; formats adds read_formats, write_formats and a formats table. A refused request answers ok false with a code, e.g. invalid_check_digit."
}