Skip to content
POST AI agent ready /v1/qr/generate

QR Code API - Free QR Generator

Convert any string or URL into a scannable QR code. The API returns an SVG image you can embed directly in HTML or download. Configure the output size, error correction level, and quiet zone margin to fit your design.

Parameters

stringrequired

The text or URL to encode in the QR code.

number

Width and height of the QR code in pixels.

string

Error correction level. Higher levels allow more damage tolerance but produce denser codes. L (7%), M (15%), Q (25%), H (30%).

number

Quiet zone margin around the QR code in modules.

Code examples

curl -X POST https://api.botoi.com/v1/qr/generate \
  -H "Content-Type: application/json" \
  -d '{"text":"https://botoi.com","size":300,"errorCorrectionLevel":"M","margin":4}'

When to use this API

Event check-in tickets

Embed a unique QR code in each attendee ticket email. Encode the ticket ID so staff can scan and validate entry at the door with any smartphone camera.

Restaurant menu links

Generate a QR code that points to your online menu. Print it on table tents or receipts so diners can pull up the full menu without downloading an app.

Inventory and asset tagging

Encode serial numbers or asset IDs into QR codes. Print them on adhesive labels so warehouse staff can scan items during receiving, audits, and shipping.

Frequently asked questions

Why does the API return SVG instead of PNG?
SVG is resolution-independent, so the QR code stays sharp at any print or screen size. You can convert the SVG to PNG client-side if you need a raster format.
What is the maximum data length for a QR code?
QR codes support up to about 4,296 alphanumeric characters or 2,953 bytes of binary data. For most URLs and short strings, you will be well within these limits.
Which error correction level should I choose?
Use M (15%) for digital displays and L (7%) when code density matters. Pick Q (25%) or H (30%) for printed materials that might get scuffed, folded, or partially covered by a logo overlay.
Can I add a logo to the center of the QR code?
The API returns a plain QR code. To overlay a logo, set errorCorrectionLevel to H for maximum damage tolerance, then composite your logo on top of the SVG in your front end.
How do I embed the SVG directly in an HTML page?
Fetch the SVG response as text, then insert it into a container element with innerHTML. Because it is inline SVG, you can style it with CSS, change colors, or animate modules.

Get your API key

Free tier includes 5 requests per minute with no credit card required. Upgrade for higher limits.