{"uid":"cap_pUzldYHm5TAaDwULrQft9","slug":"2s-barcode-generator-ee77f60b","name":"2s Barcode Generator","description":"The (most) everything API: 575+ pay-per-call endpoints for AI agents — ground-truth data, a full AI gateway, and agent infrastructure (storage, queues, watchers). USDC via x402, no signup, no API keys, and upto billing: pay actual usage, not the quote.","url":"https://2s.io/api/barcode/generate","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"data":{"anyOf":[{"type":"object","required":["type","text"],"properties":{"text":{"type":"string","maxLength":2000,"minLength":1},"type":{"enum":["text"],"type":"string"}},"additionalProperties":false},{"type":"object","required":["type","url"],"properties":{"url":{"type":"string","maxLength":2000},"type":{"enum":["url"],"type":"string"}},"additionalProperties":false},{"type":"object","required":["type","to"],"properties":{"to":{"type":"string"},"body":{"type":"string","maxLength":1000},"type":{"enum":["email"],"type":"string"},"subject":{"type":"string","maxLength":200}},"additionalProperties":false},{"type":"object","required":["type","to"],"properties":{"to":{"type":"string","maxLength":50,"minLength":1},"body":{"type":"string","maxLength":1000},"type":{"enum":["sms"],"type":"string"}},"additionalProperties":false},{"type":"object","required":["type","number"],"properties":{"type":{"enum":["phone"],"type":"string"},"number":{"type":"string","maxLength":50,"minLength":1}},"additionalProperties":false},{"type":"object","required":["type","ssid"],"properties":{"ssid":{"type":"string","maxLength":100,"minLength":1},"type":{"enum":["wifi"],"type":"string"},"hidden":{"type":"boolean"},"password":{"type":"string","maxLength":200},"security":{"enum":["WPA","WEP","none"],"type":"string"}},"additionalProperties":false},{"type":"object","required":["type","name"],"properties":{"org":{"type":"string","maxLength":200},"url":{"type":"string"},"name":{"type":"string","maxLength":200,"minLength":1},"note":{"type":"string","maxLength":500},"type":{"enum":["vcard"],"type":"string"},"email":{"type":"string"},"phone":{"type":"string","maxLength":50},"title":{"type":"string","maxLength":200},"lastName":{"type":"string","maxLength":100},"firstName":{"type":"string","maxLength":100}},"additionalProperties":false},{"type":"object","required":["type","lat","lon"],"properties":{"lat":{"type":"number","maximum":90,"minimum":-90},"lon":{"type":"number","maximum":180,"minimum":-180},"type":{"enum":["geo"],"type":"string"},"altitude":{"type":"number"}},"additionalProperties":false},{"type":"object","required":["type","address"],"properties":{"type":{"enum":["bitcoin"],"type":"string"},"label":{"type":"string","maxLength":200},"amount":{"type":"number","minimum":0,"exclusiveMinimum":true},"address":{"type":"string","maxLength":100,"minLength":1},"message":{"type":"string","maxLength":500}},"additionalProperties":false},{"type":"object","required":["type","title","start","end"],"properties":{"end":{"type":"string"},"type":{"enum":["calendar"],"type":"string"},"start":{"type":"string"},"title":{"type":"string","maxLength":200,"minLength":1},"location":{"type":"string","maxLength":200},"description":{"type":"string","maxLength":1000}},"additionalProperties":false},{"type":"object","required":["type"],"properties":{"type":{"enum":["json"],"type":"string"},"value":{}},"additionalProperties":false}]},"size":{"type":"integer","default":512,"maximum":4096,"minimum":64},"style":{"type":"object","properties":{"logo":{"type":"object","required":["source"],"properties":{"source":{"type":"string","description":"https:// URL or data: URI. QR only."},"padding":{"type":"number","maximum":32,"minimum":0},"sizePct":{"type":"number","maximum":0.4,"minimum":0.05},"background":{"type":"string"},"cornerRadius":{"type":"number","maximum":64,"minimum":0}},"additionalProperties":false},"modules":{"enum":["square","rounded","dots"],"type":"string"},"background":{"type":"string","description":"CSS color or \"transparent\"."},"foreground":{"anyOf":[{"type":"string"},{"type":"object","required":["type","stops"],"properties":{"type":{"enum":["linear","radial"],"type":"string","description":"Gradient type."},"stops":{"type":"array","items":{"type":"object","required":["offset","color"],"properties":{"color":{"type":"string"},"offset":{"type":"number","maximum":1,"minimum":0}},"additionalProperties":false}},"rotation":{"type":"number","description":"Linear gradient rotation in degrees."}},"additionalProperties":false}]}},"additionalProperties":false},"format":{"enum":["qr","aztec","datamatrix","pdf417"],"type":"string","default":"qr"},"margin":{"type":"integer","default":4,"maximum":16,"minimum":0},"output":{"enum":["svg","png","dataurl"],"type":"string","default":"svg"},"errorCorrection":{"enum":["L","M","Q","H"],"type":"string","default":"M","description":"L=~7%, M=~15%, Q=~25%, H=~30% recoverable damage (QR only)."}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.001","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"settled","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.001/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.0025","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.0025","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_tK0KXlApCWy4OgUMeMAmq","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.0025","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Generates QR codes and barcodes from structured data including text, URLs, emails, SMS, phone numbers, WiFi credentials, vCards, and geolocation","exampleAgentPrompt":"Can you generate a QR code for my WiFi network called 'CornerCafe' with WPA security and password 'Coffee2024!' — I want to print it out so guests can scan it to connect?","exampleUseCases":null,"resultDescription":"Returns a JSON response containing the generated barcode or QR code, likely as an image (base64-encoded data or image URL), encoding the structured input data (URL, text, vCard, WiFi, etc.) in machine-readable barcode format.","failureModes":["Invalid input type enum value returns validation error","Text or URL exceeding maxLength (2000 chars) rejected","Malformed email or URI format rejected","Missing required fields for the selected data type (e.g. missing 'ssid' for wifi type) returns 400","Payment failure via x402 protocol returns 402 Payment Required","Empty or null data payload rejected"],"whenToPreferThis":"Choose this endpoint when you need a pay-per-call, no-signup barcode/QR code generation service that supports a wide variety of encoded data types (URL, text, email, SMS, phone, WiFi, vCard, geolocation) and can be called programmatically by an AI agent using USDC micropayments on Base or Solana. Prefer over subscription-based alternatives when usage is infrequent or automated.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-14T00:51:31.281Z","isFirstParty":false}