Skip to main content
QR Code Genius
QR Code Genius
FeaturesPricingHelp
Log inGet Started
Help Center/Developer API/Embed a QR Image (GET /render)

Embed a QR Image (GET /render)

QR Code Genius Team
Updated 7/23/2026
4 min read

GET /api/v1/render returns a QR code as a raw PNG image — not JSON — so you can use it directly as an image source in HTML or email templates. It is the fastest endpoint, at the cost of styling flexibility: size and two colors only, no logos or custom dot shapes.

Usage

<img
  src="https://www.qrcodegenius.com/api/v1/render?key=YOUR_API_KEY&content=https%3A%2F%2Fexample.com&width=256"
  alt="QR code for example.com"
  width="256"
  height="256"
/>

Query parameters

  • key (required) — your API key. This endpoint takes the key as a query parameter instead of a header so that it works inside an img tag.
  • content (required) — the text to encode, 1–4296 characters, URL-encoded.
  • width (optional) — image size in pixels, 50–2000. Default 300. The image is square.
  • dark (optional) — foreground color as a hex or CSS color, default #000000. Remember to URL-encode the # as %23.
  • light (optional) — background color, default #ffffff.

Example with colors:

https://www.qrcodegenius.com/api/v1/render?key=YOUR_API_KEY&content=Hello&width=400&dark=%23111827&light=%23f8fafc

Response

A binary image/png body with:

  • Cache-Control: public, max-age=31536000, immutable — identical URLs are cached aggressively by browsers and CDNs, so repeated views of the same QR code usually cost you one API request, not one per view.
  • X-QR-Usage — your request count for the current period.

Errors are returned as plain text (not JSON) with the matching status code: 401 for a missing or invalid key, 400 for invalid parameters, 429 when your quota is exhausted.

When to use render vs. generate

  • Use render when you just need a scannable code displayed somewhere — order confirmations, tickets, email signatures.
  • Use POST /qr when you need branding: logos, gradients, custom dot and corner shapes.
  • Use POST /qr/bulk when codes should be saved to your account or need scan tracking.

The API key is visible in the image URL, so anyone who can read your page source can see it. Use a dedicated key for embedding so you can revoke it independently, and prefer server-side generation for anything sensitive.

Was this article helpful?

Your feedback helps us improve our documentation.

QR Code Genius
QR Code Genius

The smartest QR code platform for creators and businesses.

Product

  • Features
  • Pricing
  • Help & FAQ
  • Developer API
  • Website URL
  • Digital Business Card
  • WiFi Access
  • Crypto Wallet
  • Social Media
  • Events

Company

  • Help Center
  • Support Center
  • Get Started Free
  • Login

Legal

  • Privacy Policy
  • Terms of Service

© 2026 Magpie Nexus, Inc. All rights reserved. magpienexus.com

All systems operational