Pular para o conteúdo principal
QR Code Genius
QR Code Genius
RecursosPreçosAjuda
EntrarComeçar
Central de Ajuda/API para Desenvolvedores/Embed a QR Image (GET /render)

Embed a QR Image (GET /render)

Equipa QR Code Genius
Atualizado em 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.

Este artigo foi útil?

O seu feedback ajuda-nos a melhorar a nossa documentação.

QR Code Genius
QR Code Genius

Crie. Rastreie. Cresça.

Produto

  • Recursos
  • Preços
  • Ajuda & FAQ
  • API para desenvolvedores
  • URL / Website
  • vCard / Cartão de Visita Digital
  • WiFi
  • Crypto (Bitcoin/ETH)
  • Redes sociais
  • Events (iCal)

Empresa

  • Central de Ajuda
  • Contato
  • Começar
  • Entrar

Jurídico

  • Privacidade
  • Termos

© 2026 Magpie Nexus, Inc. Todos os direitos reservados. magpienexus.com

Todos os sistemas operacionais