Developer API

Build QR codes from your own app

One endpoint, one key. Free up to 1,000 requests an hour — enough for most production apps.

Authentication

Send your key in the X-API-Key header on every request.

curl "https://qrscanner.in/api/v1/generate.php" \ -H "X-API-Key: qrs_your_key_here" \ -H "Content-Type: application/json" \ -d '{"type":"upi","fields":{"vpa":"shop@okhdfcbank","name":"Anjok","amount":"499"}}'
POST /api/v1/generate.php
ParameterTypeWhat it does
typestringAny of the 45+ QR types, for example url, upi, wifi, vcard.
fieldsobjectThe values for that type. Field names match the studio form.
formatstringjson returns the payload. svg or png returns image bytes.
ecstringError correction: L, M, Q or H. Defaults to Q.
scaleintPixels per module, 2 to 20. Defaults to 8.

Response

{ "ok": true, "type": "upi", "payload": "upi://pay?pa=shop%40okhdfcbank&pn=Anjok&am=499&cu=INR", "studio_url": "https://qrscanner.in/generator.php?type=upi" }
Examples
PHP
$ch = curl_init('https://qrscanner.in/api/v1/generate.php'); curl_setopt_array($ch, [ CURLOPT_POST => true, CURLOPT_RETURNTRANSFER => true, CURLOPT_HTTPHEADER => ['X-API-Key: qrs_your_key_here', 'Content-Type: application/json'], CURLOPT_POSTFIELDS => json_encode([ 'type' => 'wifi', 'fields' => ['ssid' => 'Cafe-Guest', 'password' => 'welcome123'], 'format' => 'svg', ]), ]); $svg = curl_exec($ch);
JavaScript
const res = await fetch('https://qrscanner.in/api/v1/generate.php', { method: 'POST', headers: { 'X-API-Key': key, 'Content-Type': 'application/json' }, body: JSON.stringify({ type: 'url', fields: { url: 'https://anjok.in' } }) }); const data = await res.json();
Errors
StatusMeaningWhat to do
401Key missing or invalidCheck the header name and copy the key again from your account page.
422Unknown type, or empty resultConfirm the type name and that the required fields are filled.
429Hourly quota reachedWait for the next hour, or ask us for a commercial quota.