{
  "openapi": "3.1.0",
  "info": {
    "title": "Barcode, QR & Logistics Label Sheet Edge API",
    "version": "1.0.0",
    "summary": "Generate scan-verified QR Codes, GS1-128, EAN-13, UPC-A (SVG + lossless PNG) and Avery/Zebra label sheets in <15ms.",
    "description": "Deterministic ISO/IEC 18004 QR Code (v1-v10 GF(256) Reed-Solomon), GS1-128 (FNC1 Application Identifiers), Code-128 (auto Set B/C), EAN-13, and UPC-A encoder returning crisp SVG, lossless binary PNG, and print-ready Avery 5160 / Zebra 4x6 & 2x1 label sheets.\n\nEliminates fragile canvas/native image binaries, broken QR Reed-Solomon/mask implementations, wrong GS1 Modulo-10/103 check digits, and misaligned Avery 5160 or Zebra thermal @page CSS.",
    "contact": {
      "name": "API Keg",
      "url": "https://apikeg.com"
    }
  },
  "servers": [
    {
      "url": "https://barcode-pass.apikeg.com"
    }
  ],
  "components": {
    "securitySchemes": {
      "bearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "API Keg Key (ak_live_...)",
        "description": "Optional per-email monthly subscription API key ($5/$20/$50 tiers at https://apikeg.com/account). Omit this header to pay per request inline via HTTP 402 (x402 USDC)."
      }
    }
  },
  "security": [
    {},
    {
      "bearerAuth": []
    }
  ],
  "paths": {
    "/v1/generate-barcode": {
      "post": {
        "operationId": "generate_barcode",
        "summary": "Generate Barcode or QR Code (SVG + PNG)",
        "description": "Encodes a single QR Code (ISO 18004 v1-v10), Code-128, GS1-128, EAN-13, or UPC-A symbol, validating/computing GS1 check digits and returning both crisp vector SVG and lossless binary base64 PNG. Why call instead of DIY: Avoids 800+ lines of GF(256) Reed-Solomon, BCH format/version masking, GS1 FNC1/Mod-103 tables, and binary PNG DEFLATE+CRC32 framing; executes at the edge in <10ms. Pricing: $0.001 USD per generated barcode or QR symbol (SVG + PNG) (x402 instant micropayment). Pass ?dry_run=true on REST to validate schema free.",
        "tags": [
          "logistics",
          "ecommerce",
          "retail-ops",
          "developer-tools",
          "document-generation"
        ],
        "externalDocs": {
          "description": "Generate Barcode or QR Code (SVG + PNG) Specification & Examples",
          "url": "https://barcode-pass.apikeg.com/tools/generate-barcode"
        },
        "x-x402": {
          "version": 2,
          "scheme": "exact",
          "priceUsd": "0.001",
          "amountAtomicUnits": "1000",
          "network": "eip155:8453",
          "asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
          "payTo": "0x000000000000000000000000000000000000dEaD",
          "extensions": {
            "bazaar": {
              "discoverable": true,
              "category": [
                "logistics",
                "ecommerce",
                "retail-ops",
                "developer-tools",
                "document-generation"
              ],
              "info": {
                "input": {
                  "type": "http",
                  "method": "POST",
                  "bodyType": "json",
                  "example": {
                    "format": "gs1_128",
                    "value": "(01)09501101530003(17)271231(10)BATCH42",
                    "scale": 2,
                    "barHeight": 80
                  }
                },
                "output": {
                  "type": "json",
                  "summary": "Normalized GS1-128 string, dimensions, crisp <svg>, and lossless pngBase64."
                }
              },
              "schema": {
                "inputSchema": {
                  "type": "object",
                  "properties": {
                    "format": {
                      "type": "string",
                      "enum": [
                        "qr",
                        "code128",
                        "gs1_128",
                        "ean13",
                        "upca"
                      ],
                      "description": "Symbology format: 'qr' (ISO 18004 v1-v10 UTF-8), 'code128' (Set B/C auto-packed), 'gs1_128' (GS1 Application Identifiers with FNC1), 'ean13' (GTIN-13), or 'upca' (GTIN-12)."
                    },
                    "value": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 1024,
                      "description": "Payload to encode (UTF-8 string/URL for QR; printable ASCII for code128; '(01)...' AI string for gs1_128; 12/13 digits for ean13; 11/12 digits for upca)."
                    },
                    "scale": {
                      "type": "integer",
                      "minimum": 1,
                      "maximum": 24,
                      "description": "Pixels per module (defaults to 4 for QR and 2 for 1D linear barcodes)."
                    },
                    "barHeight": {
                      "type": "integer",
                      "minimum": 20,
                      "maximum": 400,
                      "description": "Bar height in pixels for 1D linear barcodes (defaults to 72)."
                    },
                    "quietZone": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 32,
                      "description": "Quiet zone margin in modules (defaults to ISO standard: 4 for QR, 9-11 for 1D)."
                    },
                    "includeText": {
                      "type": "boolean",
                      "description": "Render human-readable text beneath symbol (defaults to true for 1D, false for QR)."
                    },
                    "label": {
                      "type": "string",
                      "maxLength": 120,
                      "description": "Optional custom human-readable caption override beneath the barcode."
                    },
                    "foreground": {
                      "type": "string",
                      "maxLength": 16,
                      "description": "Foreground bar/module hex color (#RGB or #RRGGBB, default '#000000')."
                    },
                    "background": {
                      "type": "string",
                      "maxLength": 16,
                      "description": "Background hex color (#RGB or #RRGGBB, default '#FFFFFF')."
                    },
                    "errorCorrection": {
                      "type": "string",
                      "enum": [
                        "L",
                        "M",
                        "Q",
                        "H"
                      ],
                      "default": "M",
                      "description": "QR Code Reed-Solomon error correction level: L (~7%), M (~15%), Q (~25%), H (~30%)."
                    }
                  },
                  "required": [
                    "format",
                    "value"
                  ],
                  "additionalProperties": false
                },
                "outputSchema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "data",
                    "_meta"
                  ],
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "type": "object",
                      "description": "Deterministic structured tool result payload."
                    },
                    "_meta": {
                      "type": "object",
                      "required": [
                        "requestId",
                        "durationMs",
                        "chargedUsd",
                        "dryRun"
                      ],
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "durationMs": {
                          "type": "number"
                        },
                        "chargedUsd": {
                          "type": "string"
                        },
                        "dryRun": {
                          "type": "boolean"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "dry_run",
            "in": "query",
            "required": false,
            "description": "Validate request schema for free ($0.00) without executing or settling payment.",
            "schema": {
              "type": "boolean",
              "default": false
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "format": {
                    "type": "string",
                    "enum": [
                      "qr",
                      "code128",
                      "gs1_128",
                      "ean13",
                      "upca"
                    ],
                    "description": "Symbology format: 'qr' (ISO 18004 v1-v10 UTF-8), 'code128' (Set B/C auto-packed), 'gs1_128' (GS1 Application Identifiers with FNC1), 'ean13' (GTIN-13), or 'upca' (GTIN-12)."
                  },
                  "value": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 1024,
                    "description": "Payload to encode (UTF-8 string/URL for QR; printable ASCII for code128; '(01)...' AI string for gs1_128; 12/13 digits for ean13; 11/12 digits for upca)."
                  },
                  "scale": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 24,
                    "description": "Pixels per module (defaults to 4 for QR and 2 for 1D linear barcodes)."
                  },
                  "barHeight": {
                    "type": "integer",
                    "minimum": 20,
                    "maximum": 400,
                    "description": "Bar height in pixels for 1D linear barcodes (defaults to 72)."
                  },
                  "quietZone": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 32,
                    "description": "Quiet zone margin in modules (defaults to ISO standard: 4 for QR, 9-11 for 1D)."
                  },
                  "includeText": {
                    "type": "boolean",
                    "description": "Render human-readable text beneath symbol (defaults to true for 1D, false for QR)."
                  },
                  "label": {
                    "type": "string",
                    "maxLength": 120,
                    "description": "Optional custom human-readable caption override beneath the barcode."
                  },
                  "foreground": {
                    "type": "string",
                    "maxLength": 16,
                    "description": "Foreground bar/module hex color (#RGB or #RRGGBB, default '#000000')."
                  },
                  "background": {
                    "type": "string",
                    "maxLength": 16,
                    "description": "Background hex color (#RGB or #RRGGBB, default '#FFFFFF')."
                  },
                  "errorCorrection": {
                    "type": "string",
                    "enum": [
                      "L",
                      "M",
                      "Q",
                      "H"
                    ],
                    "default": "M",
                    "description": "QR Code Reed-Solomon error correction level: L (~7%), M (~15%), Q (~25%), H (~30%)."
                  }
                },
                "required": [
                  "format",
                  "value"
                ],
                "additionalProperties": false
              },
              "example": {
                "format": "gs1_128",
                "value": "(01)09501101530003(17)271231(10)BATCH42",
                "scale": 2,
                "barHeight": 80
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful execution result.",
            "headers": {
              "PAYMENT-RESPONSE": {
                "description": "Base64-encoded x402 v2 payment settlement receipt (when paid).",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "type": "object"
                    },
                    "_meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "durationMs": {
                          "type": "number"
                        },
                        "chargedUsd": {
                          "type": "string"
                        },
                        "dryRun": {
                          "type": "boolean"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Schema validation error (unbilled, $0.00)."
          },
          "402": {
            "description": "Payment Required. Decode the Base64 PAYMENT-REQUIRED header and retry with PAYMENT-SIGNATURE.",
            "headers": {
              "PAYMENT-REQUIRED": {
                "description": "Base64-encoded x402 v2 PaymentRequired JSON object.",
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    },
    "/v1/generate-label-sheet": {
      "post": {
        "operationId": "generate_label_sheet",
        "summary": "Generate Printable Barcode / QR Label Sheet",
        "description": "Batch-encodes up to 200 QR or 1D barcodes into print-ready @page HTML/SVG label sheets formatted for Avery 5160 (30-up US Letter), Zebra 4x6 shipping thermal, or Zebra 2x1 retail/bin tags. Why call instead of DIY: Replaces brittle PDF/headless-Chrome pipelines with zero-margin print-accurate @page CSS + inline crisp vector SVGs for up to 200 warehouse or retail labels in a single call. Pricing: $0.002 base (up to $0.008 max ($0.002 base + $0.002 per 50 rendered labels, capped at $0.008 for up to 200 labels), x402 variable settlement). Pass ?dry_run=true on REST to validate schema free.",
        "tags": [
          "logistics",
          "ecommerce",
          "retail-ops",
          "developer-tools",
          "document-generation"
        ],
        "externalDocs": {
          "description": "Generate Printable Barcode / QR Label Sheet Specification & Examples",
          "url": "https://barcode-pass.apikeg.com/tools/generate-label-sheet"
        },
        "x-x402": {
          "version": 2,
          "scheme": "upto",
          "priceUsd": "0.002",
          "maxPriceUsd": "0.008",
          "amountAtomicUnits": "8000",
          "network": "eip155:8453",
          "asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
          "payTo": "0x000000000000000000000000000000000000dEaD",
          "extensions": {
            "bazaar": {
              "discoverable": true,
              "category": [
                "logistics",
                "ecommerce",
                "retail-ops",
                "developer-tools",
                "document-generation"
              ],
              "info": {
                "input": {
                  "type": "http",
                  "method": "POST",
                  "bodyType": "json",
                  "example": {
                    "template": "avery_5160",
                    "startOffset": 0,
                    "items": [
                      {
                        "format": "ean13",
                        "value": "4006381333931",
                        "title": "Neon Highlighter Yellow",
                        "subtitle": "$3.49",
                        "sku": "HL-YLW-01",
                        "quantity": 15
                      },
                      {
                        "format": "upca",
                        "value": "036000291452",
                        "title": "Cotton Tissue Pack",
                        "subtitle": "$5.99",
                        "sku": "CT-PK-12",
                        "quantity": 15
                      }
                    ]
                  }
                },
                "output": {
                  "type": "json",
                  "summary": "1 US Letter page (30 labels) with inline EAN-13/UPC-A SVGs and print-ready @page HTML."
                }
              },
              "schema": {
                "inputSchema": {
                  "type": "object",
                  "properties": {
                    "template": {
                      "type": "string",
                      "enum": [
                        "avery_5160",
                        "zebra_4x6",
                        "zebra_2x1"
                      ],
                      "default": "avery_5160",
                      "description": "Print stock layout: 'avery_5160' (3x10 US Letter 8.5x11in, 30/page), 'zebra_4x6' (4x6in shipping/pallet thermal), or 'zebra_2x1' (2x1in retail/shelf thermal)."
                    },
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "format": {
                            "type": "string",
                            "enum": [
                              "qr",
                              "code128",
                              "gs1_128",
                              "ean13",
                              "upca"
                            ],
                            "description": "Symbology format: 'qr' (ISO 18004 v1-v10 UTF-8), 'code128' (Set B/C auto-packed), 'gs1_128' (GS1 Application Identifiers with FNC1), 'ean13' (GTIN-13), or 'upca' (GTIN-12)."
                          },
                          "value": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 1024,
                            "description": "Barcode or QR payload for this label."
                          },
                          "title": {
                            "type": "string",
                            "maxLength": 120,
                            "description": "Primary product, bin, pallet, or attendee title printed on the label."
                          },
                          "subtitle": {
                            "type": "string",
                            "maxLength": 120,
                            "description": "Secondary line (e.g. price '$24.99', lot/expiry, or warehouse location)."
                          },
                          "sku": {
                            "type": "string",
                            "maxLength": 64,
                            "description": "Optional SKU or internal item code."
                          },
                          "quantity": {
                            "type": "integer",
                            "minimum": 1,
                            "maximum": 200,
                            "default": 1,
                            "description": "Number of identical copies of this label to emit (total sheet labels <= 200)."
                          },
                          "errorCorrection": {
                            "type": "string",
                            "enum": [
                              "L",
                              "M",
                              "Q",
                              "H"
                            ],
                            "default": "M",
                            "description": "QR Code Reed-Solomon error correction level: L (~7%), M (~15%), Q (~25%), H (~30%)."
                          }
                        },
                        "required": [
                          "format",
                          "value"
                        ],
                        "additionalProperties": false,
                        "description": "Single barcode/QR label entry within a print sheet batch."
                      },
                      "minItems": 1,
                      "maxItems": 200,
                      "description": "1 to 200 barcode/QR label definitions to render onto print-ready sheets."
                    },
                    "startOffset": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 29,
                      "default": 0,
                      "description": "Blank cells to skip on page 1 for partially used Avery 5160 sheets."
                    },
                    "includeBarcodeText": {
                      "type": "boolean",
                      "description": "Render human-readable text inside each barcode SVG (defaults to true for 1D, false for QR)."
                    },
                    "includePng": {
                      "type": "boolean",
                      "default": false,
                      "description": "Also include lossless base64 PNGs alongside each label's inline SVG."
                    },
                    "foreground": {
                      "type": "string",
                      "maxLength": 16,
                      "description": "Foreground bar/module hex color (#RGB or #RRGGBB, default '#000000')."
                    },
                    "background": {
                      "type": "string",
                      "maxLength": 16,
                      "description": "Background hex color (#RGB or #RRGGBB, default '#FFFFFF')."
                    }
                  },
                  "required": [
                    "items"
                  ],
                  "additionalProperties": false
                },
                "outputSchema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "data",
                    "_meta"
                  ],
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "type": "object",
                      "description": "Deterministic structured tool result payload."
                    },
                    "_meta": {
                      "type": "object",
                      "required": [
                        "requestId",
                        "durationMs",
                        "chargedUsd",
                        "dryRun"
                      ],
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "durationMs": {
                          "type": "number"
                        },
                        "chargedUsd": {
                          "type": "string"
                        },
                        "dryRun": {
                          "type": "boolean"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "dry_run",
            "in": "query",
            "required": false,
            "description": "Validate request schema for free ($0.00) without executing or settling payment.",
            "schema": {
              "type": "boolean",
              "default": false
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "template": {
                    "type": "string",
                    "enum": [
                      "avery_5160",
                      "zebra_4x6",
                      "zebra_2x1"
                    ],
                    "default": "avery_5160",
                    "description": "Print stock layout: 'avery_5160' (3x10 US Letter 8.5x11in, 30/page), 'zebra_4x6' (4x6in shipping/pallet thermal), or 'zebra_2x1' (2x1in retail/shelf thermal)."
                  },
                  "items": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "format": {
                          "type": "string",
                          "enum": [
                            "qr",
                            "code128",
                            "gs1_128",
                            "ean13",
                            "upca"
                          ],
                          "description": "Symbology format: 'qr' (ISO 18004 v1-v10 UTF-8), 'code128' (Set B/C auto-packed), 'gs1_128' (GS1 Application Identifiers with FNC1), 'ean13' (GTIN-13), or 'upca' (GTIN-12)."
                        },
                        "value": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 1024,
                          "description": "Barcode or QR payload for this label."
                        },
                        "title": {
                          "type": "string",
                          "maxLength": 120,
                          "description": "Primary product, bin, pallet, or attendee title printed on the label."
                        },
                        "subtitle": {
                          "type": "string",
                          "maxLength": 120,
                          "description": "Secondary line (e.g. price '$24.99', lot/expiry, or warehouse location)."
                        },
                        "sku": {
                          "type": "string",
                          "maxLength": 64,
                          "description": "Optional SKU or internal item code."
                        },
                        "quantity": {
                          "type": "integer",
                          "minimum": 1,
                          "maximum": 200,
                          "default": 1,
                          "description": "Number of identical copies of this label to emit (total sheet labels <= 200)."
                        },
                        "errorCorrection": {
                          "type": "string",
                          "enum": [
                            "L",
                            "M",
                            "Q",
                            "H"
                          ],
                          "default": "M",
                          "description": "QR Code Reed-Solomon error correction level: L (~7%), M (~15%), Q (~25%), H (~30%)."
                        }
                      },
                      "required": [
                        "format",
                        "value"
                      ],
                      "additionalProperties": false,
                      "description": "Single barcode/QR label entry within a print sheet batch."
                    },
                    "minItems": 1,
                    "maxItems": 200,
                    "description": "1 to 200 barcode/QR label definitions to render onto print-ready sheets."
                  },
                  "startOffset": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 29,
                    "default": 0,
                    "description": "Blank cells to skip on page 1 for partially used Avery 5160 sheets."
                  },
                  "includeBarcodeText": {
                    "type": "boolean",
                    "description": "Render human-readable text inside each barcode SVG (defaults to true for 1D, false for QR)."
                  },
                  "includePng": {
                    "type": "boolean",
                    "default": false,
                    "description": "Also include lossless base64 PNGs alongside each label's inline SVG."
                  },
                  "foreground": {
                    "type": "string",
                    "maxLength": 16,
                    "description": "Foreground bar/module hex color (#RGB or #RRGGBB, default '#000000')."
                  },
                  "background": {
                    "type": "string",
                    "maxLength": 16,
                    "description": "Background hex color (#RGB or #RRGGBB, default '#FFFFFF')."
                  }
                },
                "required": [
                  "items"
                ],
                "additionalProperties": false
              },
              "example": {
                "template": "avery_5160",
                "startOffset": 0,
                "items": [
                  {
                    "format": "ean13",
                    "value": "4006381333931",
                    "title": "Neon Highlighter Yellow",
                    "subtitle": "$3.49",
                    "sku": "HL-YLW-01",
                    "quantity": 15
                  },
                  {
                    "format": "upca",
                    "value": "036000291452",
                    "title": "Cotton Tissue Pack",
                    "subtitle": "$5.99",
                    "sku": "CT-PK-12",
                    "quantity": 15
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful execution result.",
            "headers": {
              "PAYMENT-RESPONSE": {
                "description": "Base64-encoded x402 v2 payment settlement receipt (when paid).",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "type": "object"
                    },
                    "_meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "durationMs": {
                          "type": "number"
                        },
                        "chargedUsd": {
                          "type": "string"
                        },
                        "dryRun": {
                          "type": "boolean"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Schema validation error (unbilled, $0.00)."
          },
          "402": {
            "description": "Payment Required. Decode the Base64 PAYMENT-REQUIRED header and retry with PAYMENT-SIGNATURE.",
            "headers": {
              "PAYMENT-REQUIRED": {
                "description": "Base64-encoded x402 v2 PaymentRequired JSON object.",
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    },
    "/v1/validate-gtin-check-digit": {
      "post": {
        "operationId": "validate_gtin_check_digit",
        "summary": "Validate or Compute GS1 GTIN / SSCC Check Digit",
        "description": "Validates or computes official GS1 Modulo-10 check digits for GTIN-8, GTIN-12 (UPC-A), GTIN-13 (EAN-13), GTIN-14, GSIN-17, and SSCC-18 identifiers (single value or batch up to 100). Why call instead of DIY: Prevents costly retailer/Amazon GTIN check-digit rejections and off-by-one right-to-left 3x/1x weighting bugs. Pricing: $0.0005 USD per GTIN/SSCC validation request (up to 100 codes) (x402 instant micropayment). Pass ?dry_run=true on REST to validate schema free.",
        "tags": [
          "logistics",
          "ecommerce",
          "retail-ops",
          "developer-tools",
          "document-generation"
        ],
        "externalDocs": {
          "description": "Validate or Compute GS1 GTIN / SSCC Check Digit Specification & Examples",
          "url": "https://barcode-pass.apikeg.com/tools/validate-gtin-check-digit"
        },
        "x-x402": {
          "version": 2,
          "scheme": "exact",
          "priceUsd": "0.0005",
          "amountAtomicUnits": "500",
          "network": "eip155:8453",
          "asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
          "payTo": "0x000000000000000000000000000000000000dEaD",
          "extensions": {
            "bazaar": {
              "discoverable": true,
              "category": [
                "logistics",
                "ecommerce",
                "retail-ops",
                "developer-tools",
                "document-generation"
              ],
              "info": {
                "input": {
                  "type": "http",
                  "method": "POST",
                  "bodyType": "json",
                  "example": {
                    "value": "4006381333931"
                  }
                },
                "output": {
                  "type": "json",
                  "summary": "valid=true, gtinType='GTIN-13', expectedCheckDigit='1'."
                }
              },
              "schema": {
                "inputSchema": {
                  "type": "object",
                  "properties": {
                    "value": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 64,
                      "description": "Single GTIN-8, GTIN-12 (UPC-A), GTIN-13 (EAN-13), GTIN-14, GSIN-17, or SSCC-18 string to validate or complete."
                    },
                    "values": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 64
                      },
                      "minItems": 1,
                      "maxItems": 100,
                      "description": "Optional batch of 1 to 100 GTIN/SSCC strings to validate in a single call."
                    }
                  },
                  "additionalProperties": false
                },
                "outputSchema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "data",
                    "_meta"
                  ],
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "type": "object",
                      "description": "Deterministic structured tool result payload."
                    },
                    "_meta": {
                      "type": "object",
                      "required": [
                        "requestId",
                        "durationMs",
                        "chargedUsd",
                        "dryRun"
                      ],
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "durationMs": {
                          "type": "number"
                        },
                        "chargedUsd": {
                          "type": "string"
                        },
                        "dryRun": {
                          "type": "boolean"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "dry_run",
            "in": "query",
            "required": false,
            "description": "Validate request schema for free ($0.00) without executing or settling payment.",
            "schema": {
              "type": "boolean",
              "default": false
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "value": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 64,
                    "description": "Single GTIN-8, GTIN-12 (UPC-A), GTIN-13 (EAN-13), GTIN-14, GSIN-17, or SSCC-18 string to validate or complete."
                  },
                  "values": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 64
                    },
                    "minItems": 1,
                    "maxItems": 100,
                    "description": "Optional batch of 1 to 100 GTIN/SSCC strings to validate in a single call."
                  }
                },
                "additionalProperties": false
              },
              "example": {
                "value": "4006381333931"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful execution result.",
            "headers": {
              "PAYMENT-RESPONSE": {
                "description": "Base64-encoded x402 v2 payment settlement receipt (when paid).",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean",
                      "const": true
                    },
                    "data": {
                      "type": "object"
                    },
                    "_meta": {
                      "type": "object",
                      "properties": {
                        "requestId": {
                          "type": "string"
                        },
                        "durationMs": {
                          "type": "number"
                        },
                        "chargedUsd": {
                          "type": "string"
                        },
                        "dryRun": {
                          "type": "boolean"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Schema validation error (unbilled, $0.00)."
          },
          "402": {
            "description": "Payment Required. Decode the Base64 PAYMENT-REQUIRED header and retry with PAYMENT-SIGNATURE.",
            "headers": {
              "PAYMENT-REQUIRED": {
                "description": "Base64-encoded x402 v2 PaymentRequired JSON object.",
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    }
  }
}