---
title: "QR Code Image Generator API — Dynamic QR codes | Imejis"
description: "Generate scannable QR codes inside branded images — encode a new URL or payload on every API call, with custom colors and error correction. Start free."
url: "https://www.imejis.io/components/qr"
---

# QR Code Image Generator API — Dynamic QR codes | Imejis

Generates a scannable QR code from any string — URLs, coupon codes, Wi-Fi payloads — with configurable colors, margin and error-correction level.

## Use cases

- Event tickets with a unique check-in QR per attendee
- Coupon images that encode a personal redemption code
- Print and packaging visuals linking to campaign landing pages
- Wi-Fi access cards for venues and rentals

## Properties

| Name | Type | Default | Description |
| --- | --- | --- | --- |
| `value` | `string` | — | The string encoded into the QR code. |
| `errorCorrectionLevel` | `'L' \| 'M' \| 'Q' \| 'H'` | `"M"` | QR error-correction level (higher survives more damage). |
| `margin` | `number` (min 0) | `4` | Quiet-zone margin around the code in modules. |
| `colorDark` | `color` | `"#000000"` | Color of the dark modules. |
| `colorLight` | `color` | `"#ffffff"` | Color of the light modules (background). |
| `opacity` | `number` | `1` | Overall component opacity from 0 (transparent) to 1 (opaque). |
| `borderWidth` | `number` | `0` | Border thickness in pixels around the component. |
| `borderColor` | `color` | `"transparent"` | Border color (any CSS color). |
| `borderStyle` | `'solid' \| 'dashed' \| 'dotted' \| 'double' \| 'none'` | `"solid"` | Border line style. |
| `borderRadius` | `number` | `0` | Corner radius in pixels. |
| `boxShadow` | `string` | — | CSS box-shadow applied to the component, e.g. "0 4px 6px rgba(0,0,0,0.1)". |

## Sample design JSON

```json
{
  "title": "QR code sample",
  "description": "A dynamic QR code",
  "dimensions": {
    "width": 800,
    "height": 420
  },
  "background": {
    "color": "#ffffff"
  },
  "components": [
    {
      "id": "sample-qr",
      "key": "link",
      "type": "qr",
      "position": {
        "x": 290,
        "y": 100
      },
      "rotation": 0,
      "size": {
        "width": 220,
        "height": 220
      },
      "dynamic": true,
      "properties": {
        "value": "https://imejis.io",
        "errorCorrectionLevel": "M",
        "margin": 4,
        "colorDark": "#000000",
        "colorLight": "#ffffff",
        "opacity": 1
      }
    }
  ]
}
```

## Examples

### Event ticket check-in code

A per-attendee check-in QR encoding the unique ticket URL.

API overrides that reproduce this example:

```json
{
  "link.value": "https://imejis.io/e/TKT-84721?utm_source=ticket"
}
```

### Coupon redemption code

A personal discount code encoded as plain text for in-store scanning.

API overrides that reproduce this example:

```json
{
  "link.value": "SAVE20-9F3K7Q",
  "link.colorDark": "#111827"
}
```

## API overrides

Set '<key>.value' (or just '<key>') to encode a different URL or string in every render; module colors are overridable as well.

Flat override payload (`key.property` addressing) with the sample design's current values — send only the keys you want to change:

```json
{
  "link.value": "https://imejis.io",
  "link.errorCorrectionLevel": "M",
  "link.margin": 4,
  "link.colorDark": "#000000",
  "link.colorLight": "#ffffff",
  "link.opacity": 1
}
```

```bash
curl --location 'https://render.imejis.io/v1/{{YOUR_DESIGN_ID}}' \
--header 'dma-api-key: {{YOUR_API_KEY}}' \
--header 'Content-Type: application/json' \
--data '{
    "link.value": "https://imejis.io",
    "link.errorCorrectionLevel": "M",
    "link.margin": 4,
    "link.colorDark": "#000000",
    "link.colorLight": "#ffffff",
    "link.opacity": 1
}'
```

`{{YOUR_DESIGN_ID}}` and `{{YOUR_API_KEY}}` are placeholders: first create
the design in your account (paste the sample design JSON above into the
editor at https://app.imejis.io, or create it programmatically via the
imejis MCP server's `create_design` + `update_design` tools), then render
it with the design's id and one of your API keys.

Agents: the MCP server at https://api.imejis.io/api/mcp exposes this same
catalog as structured data via the `list_component_types` tool (property
kinds, allowed values, bounds, ready-to-use sample designs).

## Frequently Asked Questions

### Can I generate a different QR code on each API call?

Yes — send '<key>.value' (or just the key) with any string per render: URLs, coupon codes, Wi-Fi payloads or plain text.

### Can the QR code use my brand colors?

colorDark and colorLight control the module and background colors. Keep strong contrast between them so scanners still read the code reliably.

### What error correction levels are supported?

Levels L, M, Q and H (default M). Level H survives up to 30% damage — use it when printing small or overlaying a logo on the code.

### How do I keep the QR code scannable?

Keep the default quiet-zone margin of 4 modules, maintain contrast between colorDark and colorLight, and raise errorCorrectionLevel for small or decorated codes.

## Variants

- [Branded](https://www.imejis.io/components/qr/branded.md) — On-brand module colors instead of plain black on white.
- [High error correction](https://www.imejis.io/components/qr/high-error-correction.md) — Level 'H' survives up to 30% damage — use when printing small or overlaying a logo.
- [Dark inverse](https://www.imejis.io/components/qr/dark-inverse.md) — Light modules on a dark ground — for dark-mode designs and night-time signage.

All components: https://www.imejis.io/components.md
