{"uid":"cap_omhKTjk2lZjsG9gUi81ee","slug":"402utils-barcode-generator-1a2a29dc","name":"402utils Barcode Generator","description":"Generate a 1D barcode as PNG or SVG: EAN-13, EAN-8, UPC-A, Code 128, Code 39 or ITF-14. Validates the structure and check digit for each symbology — EAN/UPC/ITF compute a missing check digit or reject a wrong one. Options: format (png/svg), scale (module px 1-10), text (human-readable line, default on). Returns the raw image. Generation only — reading a barcode from an image is out of scope.","url":"https://402utils.com/v1/barcode","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"data":{"type":"string","description":"The value to encode (digits for EAN/UPC/ITF; text for Code 39/128)."},"text":{"type":"boolean","default":true,"description":"Render the human-readable value under the bars."},"scale":{"type":"integer","default":3,"maximum":10,"minimum":1,"description":"Module width in px."},"format":{"enum":["png","svg"],"type":"string","default":"png"},"symbology":{"enum":["ean13","ean8","upca","code128","code39","itf14"],"type":"string","description":"Barcode type."}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.002","displayCostAsset":"USDC","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.002/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.002","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.002","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_eC6irI1mpEkUd-mf-HLUM","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.002","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Generates a 1D barcode image (PNG or SVG) for EAN-13, EAN-8, UPC-A, Code 128, Code 39, or ITF-14 symbologies, with check digit validation.","exampleAgentPrompt":"Generate an EAN-13 barcode for the value 590123412345 as a PNG with scale 4 and the human-readable number shown underneath.","exampleUseCases":null,"resultDescription":"Returns the raw barcode image file — either a PNG binary or an SVG document — ready to embed, display, or print. For EAN/UPC/ITF symbologies, a missing check digit is computed automatically; a wrong one is rejected with an error.","failureModes":["Invalid check digit provided — endpoint rejects and returns error","Data string contains characters unsupported by the chosen symbology (e.g. lowercase for Code 39)","Data length mismatch for fixed-length symbologies (EAN-13 requires 12 or 13 digits)","Scale out of range (must be 1–10) — validation error","Unknown symbology value — returns 4xx error","Payment failure — x402 payment not accepted or insufficient USDC balance"],"whenToPreferThis":"Use this endpoint when you need server-side barcode image generation with automatic check digit computation and validation for standard retail/logistics symbologies (EAN, UPC, ITF-14, Code 128/39). Prefer this over client-side libraries when you need a clean hosted API with per-call pricing, or when you want guaranteed check digit correctness without implementing the logic yourself.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-15T12:51:08.875Z","isFirstParty":false}