Zero LLM · Deterministic · GS1 Sunrise 2027 Ready

Deterministic Barcode & GS1 Generation API

Generate print-ready SVG and PNG barcodes—GS1-128, GS1 DataMatrix, GS1 Digital Link (Sunrise 2027), PDF417, Code 128, Code 39 VIN, ITF-14, EAN-13, and UPC-A—with built-in GS1 AI & GTIN check-digit validation and batching up to 20 barcodes for 1 credit.

1 credit = up to 20 barcodes0 charge on invalid GS1 check digitsStrict zero data retention
POST /v1/barcode-generate
curl -X POST https://api.structocr.com/v1/barcode-generate \
  -H "x-api-key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "symbology": "gs1-128",
    "data": "(01)09506000134352(17)271231(10)LOT42",
    "format": "svg",
    "options": { "scale": 3, "include_text": true }
  }'
RESPONSE 200 OK · 1 CREDIT · ZERO RETENTION
{
  "success": true,
  "credits_used": 1,
  "data": {
    "symbology": "gs1-128",
    "format": "svg",
    "content_type": "image/svg+xml",
    "content": "<svg xmlns=\"http://www.w3.org/2000/svg\" ...>",
    "width": 556,
    "height": 109,
    "validation": {
      "valid": true,
      "check_digit": "2",
      "check_digit_valid": true,
      "parsed_ais": {
        "01": { "name": "GTIN", "value": "09506000134352", "check_digit_valid": true },
        "17": { "name": "EXPIRATION_DATE", "value": "271231", "formatted_date": "2027-12-31" },
        "10": { "name": "BATCH_LOT", "value": "LOT42" }
      }
    }
  }
}

Pre-Billing GS1 Validation

Catches bad GTIN-14/SSCC-18 check digits, malformed YYMMDD dates, and broken Digital Link URIs before charging a single credit—returning exact fix suggestions.

20 Barcodes per Credit

Send an items[] batch of up to 20 mixed symbologies in one call for 1 credit ($0.0003–$0.0005 per barcode at Pro pack rates).

Zero Cold-Start Deps

Deterministic rendering at the edge with clean SVG vectors and lossless PNG bitmaps—skip fighting native Cairo/font packages in serverless deployments.

Strict Zero Data Retention

Serial numbers, pharma lot codes, VINs, and rendered barcode images are never persisted to disk or database logs.

Supported Barcode Symbologies & Validation Rules

Purpose-built for logistics, retail compliance (GS1 Sunrise 2027), automotive VIN labels, and warehouse ERP pipelines.

symbologyStandardDeterministic ValidationPrimary Use Cases
gs1-128GS1-128 (UCC/EAN-128)Strict GS1 AI syntax, GTIN-14/SSCC-18 Mod-10 check digits, YYMMDD dates, FNC1Pallet labels, logistics cartons, healthcare UDI
gs1-datamatrixGS1 DataMatrix (2D)Strict GS1 AI syntax & check digits with FNC1Pharma serialization, medical devices, compact parts
gs1-digital-linkGS1 Digital Link (2D QR / DM)Sunrise 2027 URI syntax, primary key (/01/, /00/), GTIN check digit & query AIsRetail packaging ready for GS1 Sunrise 2027
pdf417PDF417 (ISO/IEC 15438)Configurable columns (1–30) and Reed-Solomon eclevel (0–8)Shipping manifests, boarding passes, QA ID tests
code128Code 128Printable ASCII validation, high-density 1D encodingWarehouse SKUs, inventory tags, order slips
code39Code 39 (+ vin_mode)Optional vin_mode enforces 17-char ISO 3779 VIN & 9th check digitAutomotive door-jamb VIN labels, asset tags
itf14ITF-1414-digit length & GS1 Mod-10 check digit validationCorrugated outer-case & carton barcodes
ean13 / upcaEAN-13 & UPC-A13-digit / 12-digit GS1 check digit validationGlobal and North American retail POS SKUs

StructOCR Barcode API vs. Self-Hosted Libraries

Why teams choose a deterministic managed endpoint instead of maintaining font/canvas binaries and GS1 validation rules across microservices.

DimensionStructOCR POST /v1/barcode-generateSelf-Hosted Barcode Library
Serverless / Edge runtimeZero native binaries, fonts, or canvas libraries to bundleOften requires node-canvas, Cairo, libcairo, or fontconfig
GS1 AI & Check-Digit ValidationBuilt-in GS1 AI parser, date validation & actionable fix suggestionsManual regex & custom check-digit code to maintain
Batch throughputUp to 20 barcodes in 1 API call (1 credit total)Build your own queue, worker memory limits & error handling
Zero Data RetentionInput payloads & rendered barcodes never stored in logs or diskDepends on self-managed logging & storage policies
Pricing modelPay-as-you-go ($5 for 500 credits = up to 10,000 barcodes), never expiresOngoing infra maintenance, container cold starts & updates

Frequently Asked Questions

Ready to Build with StructOCR?

Get your API key in under a minute. New users receive 200 free credits to test Passport, VIN, License Plate, Container, Receipt, HIN, Driver License, ID Card, Vehicle Registration, Weighbridge Ticket, ATM Cassette and Invoice OCR APIs.

✓ No credit card required · ✓ Instant API key · ✓ Full API access