QR code generator
Type a URL or any text and get a QR code as SVG or PNG at a hosted URL. The code holds your text itself, with no redirect in between, so it keeps working for as long as the text does. The same call as POST /v1/qr-codes.
curl -X POST https://api.imageapis.com/v1/qr-codes -H 'X-API-Key: YOUR_KEY' -H 'Content-Type: application/json' -d '{"data":"https://imageapis.com","size":512}'What this is
A static QR code: your URL or text is encoded in the pattern itself, up to 2,000 characters. Some generators encode a short link of their own that redirects to your URL, and that link can stop working when an account lapses or the service goes away. This one puts nothing between the code and your text, so a printed code keeps working as long as your URL does.
SVG, the default, is drawn in our worker with no browser. It's a few KB and stays sharp at any print size, which makes it the right file for a printer or a design tool. PNG, JPEG and WebP are the same drawing as a bitmap, for places that don't show SVG, such as email, some CMSs and chat apps. Every file is hosted at img.imageapis.com for 30 days.
The settings
- Error correction decides how much of the code can be damaged or covered and still scan: L 7%, M 15%, Q 25%, H 30%. Higher levels can need a larger grid for the same text, so the code looks denser at the same size. Use H if a logo will sit over the middle.
- The quiet zone is the empty border, counted in modules (the code's small squares). 2 suits a screen. The QR standard asks for 4, which is safer for print.
- Colours: dark modules on a light background scan everywhere. Keep the contrast high. A light code on a dark background is inverted, and some scanners can't read it. Set the background to
transparentto drop it from SVG, PNG and WebP. - Size is in pixels with the quiet zone included. For print, SVG makes the size moot. As a rough guide, keep a printed code at least 2 cm across, and scan it once before printing many.
Many QR codes, from code
One call per code:
curl -X POST https://api.imageapis.com/v1/qr-codes -H 'X-API-Key: YOUR_KEY' \
-H 'Content-Type: application/json' \
-d '{"data": "https://example.com/t/42", "size": 512, "ec": "Q", "color": "#0b1220"}'
For a code per page, such as a ticket, an order or a product, a signed URL needs no API call at all. Your code builds /s/<base>/qr.svg?data=…&sig=…, the first fetch draws it, and every later fetch comes from the cache. To put a code on a designed card, use the qr layer in a template, as the event ticket starter does. Agents connected over MCP have the same operation as the create_qr_code tool. Each code is one image against your plan.