{"uid":"cap_vK68JJ3ScesuAfjoRKA7z","slug":"code-128-barcode-svg-generator-bc8195b9","name":"Code 128 Barcode SVG Generator","description":"Encode ASCII text as a Code 128 barcode SVG with automatic subset A/B/C switching and the mod-103 checksum.","url":"https://barcode-qr.x402tookit.com/code128-svg?utm_source=zero.xyz","method":"GET","headers":{},"bodySchema":{"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":["text"],"properties":{"text":{"type":"string","description":"ASCII text to encode, up to 80 characters"},"scale":{"type":"integer","description":"Pixels per module, 1 to 8 (default 2)"},"height":{"type":"integer","description":"Bar height in modules, 10 to 200 (default 40)"}}}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object","properties":{"svg":{"type":["null","string"]},"asOf":{"type":["null","string"]},"source":{"type":["null","string"]},"modules":{"type":["null","number"]},"reasons":{"type":["array","null"],"items":{"type":"string"}},"subsets":{"type":["null","string"]},"summary":{"type":["null","string"]},"symbols":{"type":["null","number"]},"verdict":{"type":["null","string"]},"checksum":{"type":["null","number"]},"degraded":{"type":["boolean","null"]},"svgBytes":{"type":["null","number"]},"disclaimer":{"type":["null","string"]},"notChecked":{"type":["array","null"],"items":{"type":"string"}},"symbolValues":{"type":["array","null"],"items":{"type":"number"}},"quietZoneModules":{"type":["null","number"]}}}}}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.02","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.02/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.02","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.02","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_ObXOsyYcPipsxPshIfrHP","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.02","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Encodes ASCII text as a Code 128 barcode SVG with automatic subset A/B/C switching and mod-103 checksum computation.","exampleAgentPrompt":"Generate a Code 128 barcode SVG for the text 'SN-20481-XZ' with a scale of 3 pixels per module and a bar height of 60 modules.","exampleUseCases":[{"title":"Shipping label barcode generation","prompt":"Create a Code 128 barcode SVG for the tracking number 'TRK-9948271-US' — I need it at scale 4 and 80 modules tall so it's easy to scan on a printed label."},{"title":"Inventory SKU barcode for product catalog","prompt":"Can you generate a Code 128 barcode SVG for the SKU 'WH-CHAIR-GRY-L'? Use default scale and height, I just need the standard barcode image to embed in our inventory sheet."},{"title":"Serial number barcode for asset tagging","prompt":"Make me a Code 128 barcode SVG encoding the serial number 'ASSET-00342' with scale 2 and bar height 50, so I can print it onto asset tags."}],"resultDescription":"Returns a JSON object containing the SVG string of the rendered Code 128 barcode, the computed mod-103 checksum value, the sequence of subsets (A/B/C) used, the total number of modules, the number of symbols, an array of symbol values, the SVG file size in bytes, quiet zone module count, a summary string, and metadata such as the source and timestamp. May also include a verdict, degraded flag, disclaimer, and reasons array if any encoding decisions were noteworthy.","failureModes":["Text longer than 80 characters returns an error or truncated result","Non-ASCII characters in the input cause encoding failure","Scale outside 1–8 or height outside 10–200 returns a validation error","Empty text parameter results in an error response","Network or payment failure (402) if USDC balance is insufficient"],"whenToPreferThis":"Choose this endpoint when you need a standards-compliant Code 128 linear barcode SVG with automatic subset optimization (A/B/C switching) and a verified mod-103 checksum, especially for retail, logistics, or inventory use cases where Code 128 is the required symbology. Prefer this over QR code endpoints when a traditional 1D barcode is required, and over EAN/UPC endpoints when the data is not a numeric GTIN.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-11-02T18:33:01.660Z","isFirstParty":false,"canonicalSlug":"code-128-barcode-svg-generator-bc8195b9"}