# Barcode Generator: Code 128 or EAN-13 as SVG

> Barcode Generator: Code 128 or EAN-13 as SVG is a paid API for AI agents from agent-data-tools.revmesh2074.workers.dev, paid per call via x402, $0.01/call, status unknown (last checked 2026-10-30).

Generates a Code 128 or EAN-13 barcode as an SVG image and data URL from text or numeric input, with configurable bar width, height, and label display.

## Facts

- Endpoint: GET https://agent-data-tools.revmesh2074.workers.dev/barcode?utm_source=zero.xyz
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-30
- Activations on Zero: 0
- Provider: agent-data-tools.revmesh2074.workers.dev
- Website: https://agent-data-tools.revmesh2074.workers.dev
- Tags: x402
- Canonical page: https://www.zero.xyz/c/agent-data-tools-revmesh2074-workers-dev-barcode-generator-code-128-0eeecc2d
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_HUPqXEEeAOk2q_yApOMAi

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 agent-data-tools-revmesh2074-workers-dev-barcode-generator-code-128-0eeecc2d
```

Example prompt: Generate a Code 128 barcode SVG for the text 'SHIP-20240501-XYZ' with bars 3 pixels wide and 100 pixels tall, and include the label below.

## When to prefer this

Choose this endpoint when you need a linear (1D) barcode in SVG format — specifically Code 128 for general text/alphanumeric data or EAN-13 for retail product codes. Prefer this over QR code generators when the target scanner or system expects a linear barcode (e.g. POS systems, shipping carriers, GS1 retail). Use the companion QR endpoint when you need 2D codes or need to encode URLs, contact info, or large data payloads.

## Known failure modes

- Invalid EAN-13 input (non-numeric or wrong digit count) returns an error
- Non-ASCII characters in Code 128 input cause encoding failure
- Width out of range (not 1–6) returns a validation error
- Height out of range (not 20–300) returns a validation error
- Missing required 'text' parameter returns a 400 error
- EAN-13 check digit mismatch on 13-digit input returns a verification error

## How this service works

Generate a barcode as an SVG image: Code 128 for any printable ASCII text (switching to the compact numeric set for runs of digits, with the mod-103 check symbol), or EAN-13 for 12 or 13 digits (the check digit is computed or verified). Set bar width and height and whether to print the text below. Returns the SVG and a data URL ready for an <img> tag. Use for shipping labels, product codes, tickets or inventory; for QR codes use qr.

## Output

Returns a JSON object containing the SVG markup of the barcode, a data URL suitable for use in an HTML <img> tag, the encoded text, the barcode type used (code128 or ean13), and the number of modules (bar units) in the barcode.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "required": [
  "text"
 ],
 "properties": {
  "text": {
   "type": "string",
   "description": "What to encode: ASCII text for Code 128, or 12-13 digits for EAN-13"
  },
  "type": {
   "type": "string",
   "description": "code128 (default) or ean13"
  },
  "label": {
   "type": "string",
   "description": "true (default) to print the text below the bars"
  },
  "width": {
   "type": "integer",
   "description": "Module (narrowest bar) width in pixels, 1-6 (default 2)"
  },
  "height": {
   "type": "integer",
   "description": "Bar height in pixels, 20-300 (default 80)"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "svg": {
   "type": "string"
  },
  "text": {
   "type": "string"
  },
  "type": {
   "type": "string"
  },
  "dataUrl": {
   "type": "string"
  },
  "encoded": {
   "type": "string"
  },
  "modules": {
   "type": "number"
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/agent-data-tools-revmesh2074-workers-dev-barcode-generator-code-128-0eeecc2d/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from agent-data-tools.revmesh2074.workers.dev](https://www.zero.xyz/host/agent-data-tools.revmesh2074.workers.dev/llms.txt)
