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://agent.pocket.network/v1/barcode-tools/v1/barcode
Price per call
$0.005 USD
Networks payable on
Base (eip155:8453), Tempo (eip155:4217)
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.
This service declares its response shape in prose rather than as fields, so there is nothing more specific to sample.
{}
Try it
Make one real paid call from your own wallet — about $0.005 on Base (eip155:8453). 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.
Method
Effect
GET /v1/health
read
GET /v1/identity
read
POST /v1/barcode
read
POST /v1/self-test
read
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."
}