Docs/APIs/QR Code Generator

QR Code Generator

Generate styled QR codes with colors, logos, and custom designs

OperationalCredits 5 per callp50 1438msData GenerationStar

Overview

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.

Endpoint

One host, one path per API. The block below shows this call in four languages; every one of them is the same HTTP request. Making requests covers the timeouts, retries and parameter rules that apply to all of them. The SDKs wrap the same call in a typed client.

POSThttps://api.apiverve.com/v1/qrcodegenerator
curl -X POST https://api.apiverve.com/v1/qrcodegenerator \
  -H "x-api-key: your_api_key_here" \
  -H "Content-Type: application/json" \
  -d '{
  "value": "https://apiverve.com",
  "type": "url",
  "format": "png",
  "margin": "0"
}'
const res = await fetch('https://api.apiverve.com/v1/qrcodegenerator', {
  method: 'POST',
  headers: {
    'x-api-key': 'your_api_key_here',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
  "value": "https://apiverve.com",
  "type": "url",
  "format": "png",
  "margin": "0"
}),
});

if (!res.ok) throw new Error(`${res.status} ${await res.text()}`);

const { data } = await res.json();
console.log(data);
import requests

res = requests.post(
    "https://api.apiverve.com/v1/qrcodegenerator",
    headers={"x-api-key": "your_api_key_here"},
    json={
    "value": "https://apiverve.com",
    "type": "url",
    "format": "png",
    "margin": "0"
},
    timeout=15,
)
res.raise_for_status()

print(res.json()["data"])
package main

import (
	"fmt"
	"io"
	"net/http"
	"strings"
)

func main() {
	body := strings.NewReader(`{
  "value": "https://apiverve.com",
  "type": "url",
  "format": "png",
  "margin": "0"
}`)
	req, _ := http.NewRequest("POST", "https://api.apiverve.com/v1/qrcodegenerator", body)
	req.Header.Set("Content-Type", "application/json")
	req.Header.Set("x-api-key", "your_api_key_here")

	res, err := http.DefaultClient.Do(req)
	if err != nil {
		panic(err)
	}
	defer res.Body.Close()

	out, _ := io.ReadAll(res.Body)
	fmt.Println(string(out))
}

Replace your_api_key_here with the key from your dashboard. When the inputs arrive as a list rather than one at a time, batch requests run up to 200 of them through this same API in a single call.

Authentication

Send your key in the x-api-key header. That is the only auth step — there is no token exchange and no per-endpoint scope to configure. Authentication covers creating, rotating and revoking keys.

401 is the only auth verdict

A 401 means the key is missing, invalid or expired. A 403 means the key is valid but not permitted here — blocked by a key restriction or an IP allow-list. Running out of credits is a 429.

Parameters

Sent as JSON in the request body. Premium parameters are accepted on every plan but only take effect on plans that include them.

ParameterTypeDescription
valueRequiredstringThe text or data to encode in the QR code
typeOptionalPremiumstringThe type of data being encoded. Advanced types (wifi, vcard) are premium.
texturlemailphonesmsgeowifivcard
default text
formatOptionalPremiumstringOutput format. Vector formats (svg, webp) are premium.
pngjpegwebpsvg
default png
sizeOptionalPremiumnumberSize of the QR code in pixels (50-2048)
default 300
marginOptionalnumberMargin around the QR code in pixels (0-100)
default 10
colorOptionalPremiumstringForeground color as hex code (e.g., #000000)
default #000000
backgroundColorOptionalPremiumstringBackground color as hex code (e.g., #ffffff)
default #ffffff
dotStyleOptionalPremiumstringStyle of QR code dots
squaredotsroundedclassyclassy-roundedextra-rounded
default square
cornerSquareStyleOptionalPremiumstringStyle of corner squares
squaredotextra-rounded
default square
cornerDotStyleOptionalPremiumstringStyle of corner dots
squaredot
default square
gradientOptionalPremiumobjectGradient configuration with type (linear, radial) and colorStops array
logoOptionalPremiumstringURL of logo image to place in center of QR code
url
logoSizeOptionalPremiumnumberSize of logo relative to QR code (0.1-0.5)
default 0.3
logoMarginOptionalPremiumnumberMargin around logo in pixels
default 5

Response

Every API returns the same three top-level keys, so one response handler covers your whole integration: status, error and data. Only data changes shape. Response format covers the envelope, the other output formats and how premium fields are withheld.

Sample response
{
  "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"
  }
}

Response fields

Paths are relative to data. Premium fields are absent rather than zeroed on plans that do not include them, so check for presence instead of comparing to 0.

FieldTypeExampleDescription
idstring"b07577c8-e17f-4af3-aeff-94c74d9ea04a"
formatstring"png"Output format of the generated QR code image
typestring"url"
correctionstring"M"
sizenumber5
marginnumber0
expiresnumber1766096864874Unix timestamp when the download URL expires
downloadURLstring"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"Direct URL to download the generated QR code image

Errors

Read the HTTP status first, then error for the specific reason. The body names the parameter that has to change. Error handling covers the full status list and which of them are worth retrying.

StatusMeaningWhat to do
400Input was rejectedRead error; it names the parameter.
401Key missing or invalidCheck the header name and the key value.
403Key valid, but not permittedA key restriction or IP allow-list; see key scoping.
429Rate limited, or out of creditsRead error to tell them apart; see rate limits.

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

Other ways to use QR Code Generator

Set up QR Code Generator on APIVerve, or reach the same source a different way. Your APIVerve account and credits work on all of them — one key, one balance.

Give it to an AI agentConnect over MCP and your agent calls it as a native tool — Claude, Cursor, ChatGPT.VerveKitReference →

More in Data Generation:

Was this page helpful?