# QR Code Generator API

> QR Code Generator creates customizable QR codes with support for colors, gradients, logos, and various styling options. Generate professional QR codes for marketing, packaging, and digital experiences.

**Endpoint:** `POST https://api.apiverve.com/v1/qrcodegenerator`  
**Category:** Data Generation  
**Cost:** 10 credits per call  
**Canonical page:** https://apiverve.com/marketplace/qrcodegenerator

## Overview

A QR code generator API. QR Code Generator works by encoding data into a QR code image with full styling support. Customize colors, add your logo, choose dot styles, and create branded QR codes that match your identity.

## Authentication

Every call carries your key in an `x-api-key` header. The same key works across the whole
APIVerve catalog — there are no per-API subscriptions. Responses always use the same three
top-level keys: `status`, `error`, and `data`.

## Example request

```bash
curl -X POST "https://api.apiverve.com/v1/qrcodegenerator" \
  -H "x-api-key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"value":"https://apiverve.com","type":"url","password":"value","encryption":"value","hidden":true,"format":"png","size":1,"margin":0,"color":"value","backgroundColor":"value","dotStyle":"value","cornerSquareStyle":"value","cornerDotStyle":"value","gradient":"value","logo":"value","logoSize":1,"logoMargin":1}'
```

## Parameters

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `value` | string | Yes | The text or data to encode in the QR code. For type=wifi, the network name (SSID) with password and encryption, or a full payload like T:WPA;S:MyNetwork;P:secret;;. For type=vcard, a contact name, vCard property lines (FN:, TEL:, EMAIL:) or a full BEGIN:VCARD card |
| `type` | string | No | The type of data being encoded. Advanced types (wifi, vcard) are premium.. default text. One of: text, url, email, phone, sms, geo, wifi, vcard. Premium field |
| `password` | string | No | Wi-Fi password when type=wifi and value is the network name. Premium field |
| `encryption` | string | No | Wi-Fi security when type=wifi: WPA (default when a password is given, covers WPA2), WEP, or nopass for an open network. One of: WPA, WEP, nopass. Premium field |
| `hidden` | boolean | No | Set true when the Wi-Fi network does not broadcast its name (type=wifi). default false. Premium field |
| `format` | string | No | Output format. Vector formats (svg, webp) are premium.. default png. One of: png, jpeg, webp, svg. Premium field |
| `size` | number | No | Size of the QR code in pixels (50-2048). default 300. Premium field |
| `margin` | number | No | Margin around the QR code in pixels (0-100). default 10 |
| `color` | string | No | Foreground color as hex code (e.g., #000000). default #000000. Premium field |
| `backgroundColor` | string | No | Background color as hex code (e.g., #ffffff). default #ffffff. Premium field |
| `dotStyle` | string | No | Style of QR code dots. default square. One of: square, dots, rounded, classy, classy-rounded, extra-rounded. Premium field |
| `cornerSquareStyle` | string | No | Style of corner squares. default square. One of: square, dot, extra-rounded. Premium field |
| `cornerDotStyle` | string | No | Style of corner dots. default square. One of: square, dot. Premium field |
| `gradient` | object | No | Gradient configuration with type (linear, radial) and colorStops array. Premium field |
| `logo` | string | No | URL of logo image to place in center of QR code. url. Premium field |
| `logoSize` | number | No | Size of logo relative to QR code (0.1-0.5). default 0.3. Premium field |
| `logoMargin` | number | No | Margin around logo in pixels. default 5. Premium field |

## Response fields

- `id` — string · Unique identifier for the generated QR code, used as the download filename
- `format` — string · Output image format the QR code was generated in
- `type` — string · The type of data that was encoded in the QR code
- `correction` — string · Error-correction level used when generating the QR code, indicating how much of the code can be obscured and still scan
- `size` — number · Size of the generated QR code image in pixels
- `margin` — number · Margin applied around the QR code in pixels
- `expires` — number · Unix timestamp (in milliseconds) when the download URL stops working
- `downloadURL` — string · Signed URL to download the generated QR code image

## Sample response

```json
{
  "status": "ok",
  "error": null,
  "data": {
    "id": "b07577c8-e17f-4af3-aeff-94c74d9ea04a",
    "format": "png",
    "type": "url",
    "correction": "M",
    "size": 5,
    "margin": 0,
    "expires": 1766096864874,
    "downloadURL": "https://storage.googleapis.com/apiverve/APIData/qrcodegenerator/2556d708-7ec4-45ce-b0fb-98d47fcf170f.png?GoogleAccessId=635500398038-compute%40developer.gserviceaccount.com&Expires=1766096864&Signature=fRvOFggSHakWfnBqT46dyv9trO4sVcwPjvjV8hpFG9yI2G2UG%2FoAvJFwzX%2F%2FYPcxRfzcR5Cnc6uSx74iJANJXn42Hpcgr5EudNa%2BxtAo106LfyWBaQgaZggNVai4D6WsDYyBL8sTPGIDxjnldVFIJy7HFMRCKUZ%2B3KQMiYujmFoc2tVMVi7lngxrfAFIylHOmEgCXDaAWXGb6NwV%2BZNsDE1Ju9DLseLnhZ%2Fh2LxIbxRiF042MLkg2hp54P%2FrIhABfOcwW7CoV9Hpn4N88t5818ljyCrLfeLQpxM5gtcRCZJ3MYiICwLkmr%2F62KDmx5JBMFLB%2FVfh%2Bewsc0QJytB3vg%3D%3D"
  }
}
```

## Use cases

- **Branded Marketing** — Create branded QR codes with your logo and company colors for marketing campaigns, business cards, and promotional materials
- **Product Packaging** — Generate styled QR codes that match your product design and packaging aesthetics while linking to product information
- **Event Management** — Create custom QR codes for event tickets, check-ins, and digital experiences with unique styling per event
- **Digital Menus** — Generate restaurant menu QR codes with custom colors and branding that match your establishment's theme

## SDKs

- **npm** — `npm install @apiverve/qrcodegenerator` (https://www.npmjs.com/package/@apiverve/qrcodegenerator)
- **PyPI** — `pip install apiverve-qrcodegenerator` (https://pypi.org/project/apiverve-qrcodegenerator/)
- **NuGet** — `dotnet add package APIVerve.API.QRCodeGenerator` (https://www.nuget.org/packages/APIVerve.API.QRCodeGenerator)
- **Source** — https://github.com/apiverve/qrcodegenerator-api

## More

- Full reference: https://docs.apiverve.com/ref/qrcodegenerator
- Get an API key: https://dashboard.apiverve.com
- Full catalog: https://apiverve.com/marketplace
