Skip to content

Generate static QR codes programmatically with the public API

Create QR code files from agents, internal tools, templates, and campaign workflows with OpenAPI, WebMCP, and six export formats.

Free QR code API

The QR Code Crafter API generates static QR assets through a public Netlify Function endpoint. It works with URL, WiFi, vCard, event, location, payment, app store, social profile, and plain text payloads.

Agents can discover the contract through OpenAPI, WebMCP, ai.txt, and live runtime tools named generate_qr and generate_bulk_qr. The same request shape can return SVG, PNG, JPG, WebP, PDF, or EPS files.

For batch work, the bulk endpoint accepts CSV or row objects and returns a ZIP archive with generated files plus manifest.csv and manifest.json. The public workflow is intentionally bounded to 50 rows so agents can automate safely without creating runaway jobs.

Use the API when you need repeatable QR generation without accounts, redirect lock-in, or scan-limit surprises. For campaign reporting, encode UTM-tagged destination URLs before generating the static QR code.

Key decisions

Free public endpoint

Call /.netlify/functions/generate-qr with GET parameters or a POST JSON body. Optional API keys are supported for issued credentials.

Agent-readable discovery

Use /ai.txt, /.well-known/openapi.json, /openapi.yaml, and /.well-known/webmcp.json to discover schemas, examples, and live tool registration.

Published agent recipes

OpenAPI GenerateQrRequest includes x-agent-recipes and WebMCP includes api.agentRecipes so agents can reuse deterministic payload examples for each supported QR content type.

Six export formats

Generate SVG, PNG, JPG, WebP, PDF, and EPS assets from the same request structure.

Bulk ZIP generation

Call /.netlify/functions/generate-qr-bulk with up to 50 rows to receive a ZIP containing QR files and machine-readable manifests.

Verifiable output metadata

POST responses include byte length and dimensions, while GET responses expose matching headers so agents can validate saved assets.

Optional API keys

Requests can include X-Agent-Api-Key when credentials are issued, while public access remains available unless enforcement is enabled.

API request options

OptionAccepted valuesUse
endpointGET or POST /.netlify/functions/generate-qrGenerate a single static QR asset from an encoded payload
bulk endpointPOST /.netlify/functions/generate-qr-bulkGenerate a ZIP archive from CSV rows or row objects
bulk limit1-50 rows per requestKeep browser agents and public automation bounded
formatsvg, png, jpg, webp, pdf, epsChoose the output asset type
size256-4096Set image dimensions for raster and layout exports
dimensionspx for SVG/raster, pt for PDF/EPSVerify generated asset width and height before saving
byteLengthReturned in JSON and X-QR-BytesConfirm decoded bytes match the response metadata
discoveryOpenAPI, WebMCP, ai.txt, llms.txtLet browser agents, crawlers, and API clients discover parameters without guessing
errorCorrectionLevelL, M, Q, HUse H when adding a logo or printing in tough conditions

How agents should call the QR code API

The API is intentionally small: send the QR payload, choose a format, and verify the returned file metadata before handing the asset to another workflow.

Prefer POST for automation

POST JSON keeps long payloads, vCards, calendar events, and logo data URLs out of query strings and returns base64 data with filename metadata.

Use GET for direct downloads

GET query parameters return the binary QR asset directly and expose X-QR-Width, X-QR-Height, X-QR-Unit, and X-QR-Bytes headers.

Register through WebMCP when available

The live pages expose generate_qr and generate_bulk_qr runtime tools plus declarative form markup so browser agents can submit QR generation requests without scraping visual forms.

Validate every saved file

Check contentType, extension, byteLength, and dimensions before writing the SVG, PNG, JPG, WebP, PDF, or EPS asset to downstream storage.

Batch QR code generation through the bulk endpoint

Use the bulk endpoint when an agent needs many static QR files for labels, classrooms, packaging, menus, event badges, or campaign assets.

Send CSV or row objects

POST rows as filename,value CSV or as JSON objects with value and optional filename. The endpoint normalizes filenames and rejects empty or oversized rows before generating files.

Choose one shared export format

Set SVG, PNG, JPG, WebP, PDF, or EPS once for the batch. Prefer SVG for high-volume agent workflows and PDF or EPS for print handoff.

Use Accept: application/zip for direct downloads

Agents can request a binary ZIP directly, or request JSON to receive base64 ZIP data, byte length, file count, and manifest details.

Inspect manifest files

Every ZIP includes manifest.csv and manifest.json so downstream systems can match source rows to generated filenames, statuses, and byte counts.

Static QR payloads the API supports

The endpoint encodes the exact payload you provide. Build the right payload string first, then generate the QR file in the format your workflow needs.

Marketing and content links

Encode HTTPS URLs, UTM-tagged campaign links, app store pages, social profiles, menus, PDF landing pages, and Google review links.

Device actions

Encode WiFi strings, mailto links, SMS actions, phone links, WhatsApp links, calendar events, map coordinates, and vCard contact payloads.

Payment and payment-link payloads

Encode validated PIX, UPI, PhonePe-compatible UPI, Swish, SEPA/GiroCode, PromptPay, VietQR, Swiss QR-bill, iDEAL, MobilePay/Vipps, QRIS, PayPal, Venmo, Cash App, and crypto wallet payloads or provider links after confirming the payment details in your own workflow.

Print and design output

Use SVG, PDF, or EPS for production artwork, and PNG, JPG, or WebP for quick digital publishing and previews.

Agent integration checklist

  • Read /ai.txt or /.well-known/openapi.json first so the client uses the current endpoint, request schema, and supported formats.
  • Use POST JSON for vCard, event, WiFi, payment, and logo workflows where payloads may be long or contain reserved URL characters.
  • Use /.netlify/functions/generate-qr-bulk for batches up to 50 rows, and include Accept: application/zip when the agent needs a direct ZIP download.
  • Set a descriptive User-Agent so QR Code Crafter can identify automated integrations.
  • Honor 429 and 503 Retry-After headers before retrying requests.
  • Decode the base64 data field from POST responses and save it with the returned extension.
  • Verify byteLength, dimensions, fileCount, and manifest metadata before handing QR files to another workflow.
  • Run a live smoke test across each content payload and export format before relying on the API in production.

Guides: print

Generate static QR codes programmatically with the public API. Static QR code. Download SVG, PNG, JPG, WebP, PDF, EPS. scan. QR print preflight checklists. Live preview. Customize QR code. No account needed. Keep the destination, owner, file name, publication channel, proof result, and review date with the campaign notes so printed and shared QR assets can be checked later.

Generate static QR codes programmatically with the public API. URL QR code. Create in your browser. print. digital. Accessibility. QR code safety and privacy. QR code file formats. QR code scanner. Use the same checklist for websites, posters, packaging, receipts, menus, classroom handouts, payment notices, and customer support material.

URL QR code: HTTPS

Generate static QR codes programmatically with the public API: URL QR code, Create in your browser, HTTPS, scan. Static QR code. Analytics-ready links. UTM. QR code safety and privacy.

Select format

print: SVG, PDF, EPS. digital: PNG, JPG, WebP, SVG. QR code file formats. Download. Vector exports. Select format.

scan

scan. Live preview. QR code scanner. QR print preflight checklists. print. digital. Customize. Test the generator preview, downloaded file, placed artwork, CMS upload, exported PDF, and one physical proof before approving production.

Company

Generate static QR codes programmatically with the public API: URL QR code, Download, SVG, PNG, JPG, WebP, PDF, EPS, print, digital, scan. Company. Guides. Feedback.

QR code API

QR code API. OpenAPI. WebMCP. ai.txt. llms.txt. bulk QR code workflows. Download SVG, PNG, JPG, WebP, PDF, EPS. Static QR code.

static vs dynamic QR codes

Generate static QR codes programmatically with the public API. Static QR code. No scan limits. URL QR code. Analytics-ready links. QR code safety and privacy. Create in your browser. scan.

Feedback

URL QR code. Phone QR code. Email QR code. Accessibility. scan. Feedback. SMS QR code.

Accessibility

Accessibility. scan. print. digital. URL QR code. Create in your browser. Live preview.

Generate a QR code through the API

  1. 1

    Choose single or bulk generation

    Use generate-qr for one asset, or generate-qr-bulk when an agent needs a bounded ZIP archive of many static QR files.

  2. 2

    Build the payloads

    Prepare the final URL, WiFi string, vCard, event, payment URI, text, CSV, or row objects exactly as scanners should read them.

  3. 3

    Choose the output format

    Select SVG, PDF, or EPS for print workflows, or PNG, JPG, or WebP for digital publishing and previews.

  4. 4

    Verify the response

    Confirm success, content type, byte length, dimensions, and extension before saving or returning the QR asset.

Frequently asked questions

What is the QR Code Crafter API endpoint?

Use /.netlify/functions/generate-qr with either GET query parameters or a POST JSON body for one QR code. Use /.netlify/functions/generate-qr-bulk with POST JSON when you need a ZIP archive of up to 50 QR files.

Can the API generate QR codes in bulk?

Yes. POST CSV rows or row objects to /.netlify/functions/generate-qr-bulk. The endpoint returns either JSON with base64 ZIP data or a direct application/zip response when the request includes Accept: application/zip.

Is this a QR code generator API?

Yes. QR Code Crafter is a QR code generator API for static files: send a payload to generate QR codes as SVG, PNG, JPG, WebP, PDF, or EPS. Teams looking for an API QR code generator, qrcode API, QR API, or generate QR code API workflow can use the same public endpoint.

Is the QR code API free to use?

Public generation is available without an account unless API key enforcement is enabled for a specific deployment. If you have an issued key, include X-Agent-Api-Key and design clients to handle 401 responses.

Which file formats can the API return?

The public contract supports SVG, PNG, JPG, WebP, PDF, and EPS output formats.

Can browser agents use WebMCP to generate QR codes?

Yes. Live pages register generate_qr and generate_bulk_qr runtime tools when document.modelContext or navigator.modelContext is available, and they also expose declarative form markup for scanners that index toolname attributes.

Does the API create dynamic tracking QR codes?

No. The API creates static QR assets. To measure campaign visits, encode a UTM-tagged URL or a redirect URL you control before generating the QR code.