Generate QR codes, UPI payment QR codes, and barcodes with optional logo embedding. Support for Code128, EAN-13, UPC-A. Binary and URL output modes.
Generate QR codes, barcodes, and UPI payment codes with a single API call.
Standard QR codes for text, URLs, contacts, WiFi, and any data up to 4,296 characters.
Generate UPI-compatible QR codes that work with Google Pay, PhonePe, Paytm, and all UPI apps.
Code128, EAN-13, and UPC-A barcode formats for retail, logistics, and inventory.
Upload any image and get a QR code that opens the image directly when scanned.
Start free and scale as you grow. No hidden fees.
Everything you need to integrate the QR & Barcode Generator API
All API requests require authentication using your API key. Send it via the X-API-KEY header with every request.
X-API-KEY: your_api_key_hereThe API accepts both GET and POST requests. Use GET for simple requests and POST when uploading logo or image files.
By default the API returns raw binary PNG image directly — ideal for piping, saving to file, or embedding. Set output=url to receive a JSON response with a CDN URL instead.
| Parameter | Type | Description |
|---|---|---|
| outputOptional | String | binary (default) — raw PNG image with metadata in response headers. url — JSON response with CDN URL (expires in 2 hours). |
| Parameter | Type | Description |
|---|---|---|
| X-API-KEYHeader | String | Your API key (required in request header) |
| typeRequired | String | Generation type: qr, upi, code128, ean13, upc, image |
| sizeOptional | Integer | Output width in pixels. Min: 100, Max: 1000. Default: 300 |
| logoOptional | String / File | Logo to embed in center. Accepts: public image URL, Google Drive link, or file upload (POST). Works with qr, upi, and image types. |
All generation types are available on every plan. Plans differ in output size, logo size limits, rate limits, and monthly quota.
type=qrGenerate standard QR codes for text, URLs, vCards, WiFi, or any data.
| Parameter | Type | Description |
|---|---|---|
| dataRequired | String | Content to encode. Max: 4,296 digits (numeric), 2,611 chars (alphanumeric), or 1,273 bytes (UTF-8/binary). |
type=upiGenerate UPI-compatible payment QR codes that work with Google Pay, PhonePe, Paytm, and all UPI apps.
| Parameter | Type | Description |
|---|---|---|
| paRequired | String | UPI ID (e.g. name@upi). Max: 50 characters. |
| pnOptional | String | Payee display name. Max: 100 characters. |
| amOptional | Number | Amount in INR. Max: ₹1,00,000. Omit for dynamic amount. |
| tnOptional | String | Transaction note. Max: 80 characters. |
type=code128 / ean13 / upc| Parameter | Type | Description |
|---|---|---|
| dataRequired | String | Code128: Any text, max 80 characters. EAN-13: Exactly 13 digits. UPC-A: Exactly 12 digits. |
type=imageUpload an image and receive a QR code. When scanned, the image opens directly in the browser.
| Parameter | Type | Description |
|---|---|---|
| data or imageRequired | String / File | data: Public image URL (Google Drive, CDN, direct link). image: File upload via POST. Max: 5 MB. Supported: PNG, JPG, WEBP, GIF. |
qr, upi, and image types. Provide via public URL (including Google Drive and CDN links without extensions), or as a file upload via POST. Free plan does not include logo support.# Binary output — save PNG directly
curl -H "X-API-KEY: your_api_key" \
"https://api.corenexis.com/qr-barcode/v1?type=qr&data=https://google.com" \
--output qr.png
# URL output — get JSON with CDN link
curl -H "X-API-KEY: your_api_key" \
"https://api.corenexis.com/qr-barcode/v1?type=qr&data=https://google.com&output=url"// Binary — get image directly
const response = await fetch('https://api.corenexis.com/qr-barcode/v1?type=qr&data=https://google.com', {
headers: { 'X-API-KEY': 'your_api_key' }
});
const blob = await response.blob();
document.getElementById('qr').src = URL.createObjectURL(blob);
// URL — get JSON with CDN link
const res = await fetch('https://api.corenexis.com/qr-barcode/v1?type=qr&data=https://google.com&output=url', {
headers: { 'X-API-KEY': 'your_api_key' }
});
const data = await res.json();
console.log('QR URL:', data.data.url);import requests
headers = {"X-API-KEY": "your_api_key"}
# Binary — save image
response = requests.get("https://api.corenexis.com/qr-barcode/v1",
headers=headers, params={"type": "qr", "data": "https://google.com"})
with open("qr.png", "wb") as f:
f.write(response.content)
# URL — get JSON
response = requests.get("https://api.corenexis.com/qr-barcode/v1",
headers=headers, params={"type": "qr", "data": "https://google.com", "output": "url"})
print(response.json()["data"]["url"])$ch = curl_init();
curl_setopt_array($ch, [
CURLOPT_URL => "https://api.corenexis.com/qr-barcode/v1?type=qr&data=https://google.com&output=url",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ["X-API-KEY: your_api_key"],
]);
$response = curl_exec($ch);
$data = json_decode($response, true);
echo "QR URL: " . $data["data"]["url"];# Dynamic amount
curl -H "X-API-KEY: your_api_key" \
"https://api.corenexis.com/qr-barcode/v1?type=upi&pa=merchant@upi&pn=My+Store&output=url"
# Fixed amount with note
curl -H "X-API-KEY: your_api_key" \
"https://api.corenexis.com/qr-barcode/v1?type=upi&pa=merchant@upi&pn=My+Store&am=499&tn=Order+Payment&output=url"
# UPI QR with logo (POST)
curl -X POST "https://api.corenexis.com/qr-barcode/v1" \
-H "X-API-KEY: your_api_key" \
-F "type=upi" -F "pa=merchant@upi" -F "pn=My Store" \
-F "am=999" -F "[email protected]" -F "output=url"const params = new URLSearchParams({
type: 'upi', pa: 'merchant@upi', pn: 'My Store',
am: '499', tn: 'Order Payment', output: 'url'
});
const response = await fetch(`https://api.corenexis.com/qr-barcode/v1?${params}`, {
headers: { 'X-API-KEY': 'your_api_key' }
});
const data = await response.json();
console.log('UPI QR:', data.data.url);import requests
response = requests.get("https://api.corenexis.com/qr-barcode/v1",
headers={"X-API-KEY": "your_api_key"},
params={"type": "upi", "pa": "merchant@upi", "pn": "My Store",
"am": "499", "tn": "Order Payment", "output": "url"})
print(response.json()["data"]["url"])curl -H "X-API-KEY: your_api_key" \
"https://api.corenexis.com/qr-barcode/v1?type=code128&data=INV-2026-00451&output=url"curl -H "X-API-KEY: your_api_key" \
"https://api.corenexis.com/qr-barcode/v1?type=ean13&data=4006381333931&output=url"curl -H "X-API-KEY: your_api_key" \
"https://api.corenexis.com/qr-barcode/v1?type=upc&data=012345678905&output=url"curl -H "X-API-KEY: your_api_key" \
"https://api.corenexis.com/qr-barcode/v1?type=qr&data=https://example.com&logo=https://cdn.example.com/logo.png&output=url"curl -H "X-API-KEY: your_api_key" \
"https://api.corenexis.com/qr-barcode/v1?type=qr&data=https://example.com&logo=https://drive.google.com/file/d/1aBcDeFg/view?usp=sharing&output=url"curl -X POST "https://api.corenexis.com/qr-barcode/v1" \
-H "X-API-KEY: your_api_key" \
-F "type=qr" -F "data=https://example.com" \
-F "[email protected]" -F "size=500" -F "output=url"curl -H "X-API-KEY: your_api_key" \
"https://api.corenexis.com/qr-barcode/v1?type=image&data=https://example.com/photo.jpg&output=url"curl -X POST "https://api.corenexis.com/qr-barcode/v1" \
-H "X-API-KEY: your_api_key" \
-F "type=image" -F "[email protected]" \
-F "[email protected]" -F "size=500" -F "output=url"const formData = new FormData();
formData.append('type', 'image');
formData.append('image', fileInput.files[0]);
formData.append('output', 'url');
const response = await fetch('https://api.corenexis.com/qr-barcode/v1', {
method: 'POST',
headers: { 'X-API-KEY': 'your_api_key' },
body: formData
});
const data = await response.json();
console.log('QR:', data.data.url);
console.log('Image:', data.data.hosted_image_url);When output=binary (or omitted), the API returns raw PNG image data directly. Metadata is in response headers:
Content-Type: image/png
Content-Length: 4523
X-Plan: starter
X-Remaining: 487
X-Rate-Limit: 20
X-Monthly-Limit: 500
X-Size-KB: 4.42
X-Type: qr
X-QR-Size: 300
X-Logo: false
X-Text-Mode: binary
X-Text-Usage: 1.6%output=url{
"success": true,
"plan": "starter",
"data": {
"type": "qr",
"format": "png",
"mimetype": "image/png",
"qr_size": 300,
"logo": false,
"text_info": {
"mode": "binary",
"byte_length": 20,
"char_length": 20,
"max_allowed": 1273,
"usage_pct": 1.6
},
"url": "https://cdn.corenexis.com/qr_1711612800_a3f2d8e1.png",
"size": 4.52,
"expiry": "2026-03-28T16:00:00+00:00"
},
"usage": {
"remaining": 487,
"rate_limit": 20,
"monthly_limit": 500
}
}{
"success": true,
"plan": "starter",
"data": {
"type": "upi",
"format": "png",
"mimetype": "image/png",
"qr_size": 300,
"logo": true,
"url": "https://cdn.corenexis.com/upi_1711612800_b4e1c9f2.png",
"size": 5.18,
"expiry": "2026-03-28T16:00:00+00:00"
},
"usage": {
"remaining": 486,
"rate_limit": 20,
"monthly_limit": 500
}
}{
"success": true,
"plan": "starter",
"data": {
"type": "code128",
"format": "png",
"mimetype": "image/png",
"width": 420,
"height": 120,
"logo": false,
"url": "https://cdn.corenexis.com/code128_1711612800_c5d2a8b3.png",
"size": 1.23,
"expiry": "2026-03-28T16:00:00+00:00"
},
"usage": {
"remaining": 485,
"rate_limit": 20,
"monthly_limit": 500
}
}{
"success": true,
"plan": "pro",
"data": {
"type": "image",
"format": "png",
"mimetype": "image/png",
"qr_size": 500,
"logo": false,
"hosted_image_url": "https://cdn.corenexis.com/img_1711612800_f7a4c0d5.jpg",
"hosted_image_expiry": "2026-04-27T14:00:00+00:00",
"note": "Scan the QR code to view the image directly in any browser.",
"url": "https://cdn.corenexis.com/image_1711612800_d6e3b9c4.png",
"size": 6.85,
"expiry": "2026-03-28T16:00:00+00:00"
},
"usage": {
"remaining": 4988,
"rate_limit": 30,
"monthly_limit": 5000
}
}| Field | Type | Description |
|---|---|---|
| type | String | Requested generation type |
| format | String | Output format (always png) |
| mimetype | String | MIME type (image/png) |
| url | String | CDN URL to download the generated image (2-hour expiry) |
| size | Float | File size in KB |
| expiry | String | ISO 8601 expiry timestamp for the QR/barcode URL |
| qr_size | Integer | QR output width in pixels (QR/UPI/Image types) |
| logo | Boolean | Whether a logo was embedded |
| text_info | Object | QR data analysis — mode, length, max capacity, usage % (QR type only) |
| width / height | Integer | Actual barcode dimensions (barcode types only) |
| hosted_image_url | String | Hosted image CDN URL — 30-day expiry (Image type only) |
| hosted_image_expiry | String | ISO 8601 expiry for hosted image (Image type only) |
| Field | Type | Description |
|---|---|---|
| remaining | Integer | Remaining generations this billing period |
| rate_limit | Integer | Max requests per minute |
| monthly_limit | Integer | Total monthly limit for your plan |
| HTTP | Code | Description |
|---|---|---|
| 400 | Bad Request | Missing or invalid parameters — type, data, UPI fields, barcode format, or size out of range. |
| 400 | Data Too Long | QR text exceeds capacity (4,296 numeric / 2,611 alphanumeric / 1,273 bytes). |
| 400 | Logo Size Exceeded | Logo file size exceeds your plan's limit. |
| 400 | Width Exceeded | Requested output size exceeds your plan's maximum. |
| 401 | INVALID_KEY | API key is invalid, expired, or not found. |
| 401 | Missing API Key | X-API-KEY header is not present. |
| 402 | NO_SUBSCRIPTION | QR & Barcode API not enabled. Subscribe to a plan first. |
| 402 | SUBSCRIPTION_EXPIRED | Subscription expired. Renew to continue. |
| 403 | KEY_DISABLED | API key disabled. Generate a new key. |
| 403 | ACCOUNT_SUSPENDED | Account suspended. Contact support. |
| 429 | RATE_LIMIT_EXCEEDED | Too many requests per minute. Wait and retry. |
| 429 | QUOTA_EXCEEDED | Monthly quota reached. Upgrade your plan. |
| 500 | Server Error | Internal error. Try again. |
{
"success": false,
"code": "PARAM_LIMIT_EXCEEDED",
"message": "Logo size (650.0 KB) exceeds your plan limit (512.0 KB). Reduce logo size or upgrade your plan.",
"param": "max_logo_size_bytes",
"provided": 665600,
"max_allowed": 524288
}{
"success": false,
"code": "PARAM_LIMIT_EXCEEDED",
"message": "Requested size (500) exceeds your plan limit (300). Reduce size or upgrade your plan.",
"param": "max_qr_image_width",
"provided": 500,
"max_allowed": 300
}{
"success": false,
"error": "Data too long for QR code. Mode: binary | Your length: 1500 | Max: 1273. Limits — Numeric: 4296 | Alphanumeric: 2611 | Binary/UTF-8: 1273 bytes."
}{
"success": false,
"code": "RATE_LIMIT_EXCEEDED",
"message": "Too many requests. Please wait before making another request."
}Create your free account and start generating QR codes in seconds. No credit card required.