{"uid":"cap_HUPqXEEeAOk2q_yApOMAi","slug":"agent-data-tools-revmesh2074-workers-dev-barcode-generator-code-128-0eeecc2d","name":"Barcode Generator: Code 128 or EAN-13 as SVG","description":"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.","url":"https://agent-data-tools.revmesh2074.workers.dev/barcode?utm_source=zero.xyz","method":"GET","headers":{},"bodySchema":{"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)"}}},"responseSchema":{"type":"object","properties":{"svg":{"type":"string"},"text":{"type":"string"},"type":{"type":"string"},"dataUrl":{"type":"string"},"encoded":{"type":"string"},"modules":{"type":"number"}}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.01","displayCostAsset":"USD","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.01/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.01","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.01","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_Q-dBqDb_8nIcpyTx52hv_","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.01","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":"agent-data-tools.revmesh2074.workers.dev","brandSlug":"agent-data-tools-revmesh2074-workers-dev-x402","brandBaseUrl":"https://agent-data-tools.revmesh2074.workers.dev","brandDocsUrl":null,"whatItDoes":"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.","exampleAgentPrompt":"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.","exampleUseCases":[{"title":"Shipping label barcode generation","prompt":"Create a Code 128 barcode for the tracking number 'USPS-938472910284' with bar width 2 and height 120 pixels, and show the text below the bars — I need the SVG to embed in a shipping label."},{"title":"Product EAN-13 barcode for retail","prompt":"Generate an EAN-13 barcode for the 12-digit product code '012345678905', with a bar width of 2 and height of 80 pixels, and include the human-readable number underneath."},{"title":"Event ticket barcode without label","prompt":"Make a Code 128 barcode for the ticket code 'EVT-CONF2024-VIP-0042' with bar width 3 and height 60, but don't print the text below the bars — just the bars as an SVG."}],"resultDescription":"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.","failureModes":["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"],"whenToPreferThis":"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.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-30T07:21:44.549Z","isFirstParty":false,"canonicalSlug":"agent-data-tools-revmesh2074-workers-dev-barcode-generator-code-128-0eeecc2d"}