# EAN-13 / UPC-A Barcode SVG Generator

> EAN-13 / UPC-A Barcode SVG Generator is a paid API for AI agents from barcode-qr.x402tookit.com, paid per call via x402, $0.02/call, status unknown (last checked 2026-11-02).

Generates an SVG barcode image for EAN-13 or UPC-A barcodes, automatically computing or verifying the check digit and applying standard L/G/R module encodings.

## Facts

- Endpoint: GET https://barcode-qr.x402tookit.com/ean13-svg?utm_source=zero.xyz
- Price: $0.02/call
- Payment: x402
- Status: unknown
- Last checked: 2026-11-02
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/ean-13-upc-a-barcode-svg-generator-9e4da234
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_Rf2hbmBf3b-yYWPsqqZh7

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability ean-13-upc-a-barcode-svg-generator-9e4da234
```

Example prompt: Can you generate an EAN-13 barcode SVG for the product code 4006381333931? Use a scale of 3 pixels per module.

## When to prefer this

Choose this endpoint when you need a standards-compliant EAN-13 or UPC-A barcode rendered as a scalable SVG with automatic check digit computation or verification. It is purpose-built for GS1 retail barcodes and returns rich metadata (parity pattern, module counts, check digit) alongside the SVG, making it superior to generic QR or Code 128 generators when specifically working with product/retail barcodes.

## Known failure modes

- Invalid digit count — code has wrong number of digits for the selected barcode type
- Non-numeric characters in the code string
- Check digit mismatch if 13/12 digits provided and final digit is wrong
- Unsupported type value (not ean13 or upca)
- Scale out of range (must be 1–8)

## How this service works

Draw an EAN-13 or UPC-A barcode SVG: adds or checks the check digit and uses the L/G/R encodings.

## Output

Returns an SVG string rendering the EAN-13 or UPC-A barcode, along with metadata including the computed check digit, the full digit string, left parity pattern, module count, quiet zone widths, SVG byte size, a verdict on digit validity, a summary message, and any degradation or warning reasons.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "required": [
      "code"
     ],
     "properties": {
      "code": {
       "type": "string",
       "description": "EAN-13: 12 or 13 digits. UPC-A: 11 or 12 digits (e.g. 4006381333931)"
      },
      "type": {
       "type": "string",
       "description": "ean13 (default) or upca"
      },
      "scale": {
       "type": "integer",
       "description": "Pixels per module, 1 to 8 (default 2)"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "properties": {
      "svg": {
       "type": [
        "null",
        "string"
       ]
      },
      "asOf": {
       "type": [
        "null",
        "string"
       ]
      },
      "ean13": {
       "type": [
        "null",
        "string"
       ]
      },
      "digits": {
       "type": [
        "null",
        "string"
       ]
      },
      "source": {
       "type": [
        "null",
        "string"
       ]
      },
      "modules": {
       "type": [
        "null",
        "number"
       ]
      },
      "reasons": {
       "type": [
        "array",
        "null"
       ],
       "items": {
        "type": "string"
       }
      },
      "summary": {
       "type": [
        "null",
        "string"
       ]
      },
      "verdict": {
       "type": [
        "null",
        "string"
       ]
      },
      "degraded": {
       "type": [
        "boolean",
        "null"
       ]
      },
      "svgBytes": {
       "type": [
        "null",
        "number"
       ]
      },
      "checkDigit": {
       "type": [
        "null",
        "number"
       ]
      },
      "disclaimer": {
       "type": [
        "null",
        "string"
       ]
      },
      "notChecked": {
       "type": [
        "array",
        "null"
       ],
       "items": {
        "type": "string"
       }
      },
      "leftParityPattern": {
       "type": [
        "null",
        "string"
       ]
      },
… (truncated)
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/ean-13-upc-a-barcode-svg-generator-9e4da234/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from barcode-qr.x402tookit.com](https://www.zero.xyz/host/barcode-qr.x402tookit.com/llms.txt)
