{
  "serviceId": "barcode-tools",
  "displayName": "Barcode and QR Code Tool API",
  "description": "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.",
  "category": "documents",
  "resourceUrl": "https://agent.pocket.network/v1/barcode-tools",
  "priceUsd": "0.005000",
  "priceVersion": 1,
  "rails": [
    {
      "id": "base",
      "network": "eip155:8453",
      "chainId": 8453,
      "tokenAddress": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
      "tokenDecimals": 6,
      "payToAddress": "0xF732ea490c5766071785a2310523f7fA2CEbB829"
    }
  ],
  "paymentNetworks": [
    "eip155:8453",
    "eip155:4217"
  ],
  "paymentProtocols": [
    "x402",
    "mpp"
  ],
  "protocols": [
    "rest"
  ],
  "inputSchema": {
    "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)."
      }
    }
  },
  "outputSchema": {
    "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."
  },
  "methods": {
    "GET /v1/health": "read",
    "GET /v1/identity": "read",
    "POST /v1/barcode": "read",
    "POST /v1/self-test": "read"
  },
  "firstParty": true,
  "networks": [
    "eip155:8453",
    "eip155:4217"
  ],
  "serving": true,
  "page": "https://agent.pocket.network/services/barcode-tools",
  "descriptor": "https://agent.pocket.network/services/barcode-tools/descriptor.json"
}