Getting Started
Quickstart
Create your first QPR Code and trigger an AI conversation in under 5 minutes.
Prerequisites
- A 3QPR account — sign up free
- An API key — create one in the Developer Portal
- curl, Python 3.8+, or Node.js 18+
Step 1 — Get your API key
Navigate to the Developer Portal and create an API key. Copy it — you'll use it in every request.
Step 2 — Create a QPR Code
A QPR Code bundles an AI system prompt with a physical QR code. When someone scans it, they're dropped into an AI conversation powered by that prompt.
curl -X POST https://api.3qpr.com/v1/qpr-codes \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "Coffee Shop Menu Assistant",
"prompt": "You are a friendly barista assistant for Blue Bottle Coffee. Help customers explore our menu, suggest drinks based on their preferences, and take orders. Be warm and enthusiastic about coffee.",
"welcome_message": "Hi! I'm your coffee guide. What can I help you find today?",
"template": "business"
}'Response:
{
"id": "qpr_01HXYZ789ABC",
"name": "Coffee Shop Menu Assistant",
"short_id": "cf7x2p",
"scan_url": "https://3qpr.com/s/cf7x2p",
"qr_image_url": "https://api.3qpr.com/qr/cf7x2p.png",
"qr_svg_url": "https://api.3qpr.com/qr/cf7x2p.svg",
"status": "active",
"scans_total": 0,
"created_at": "2026-03-20T12:00:00Z"
}Step 3 — Download the QR image
The qr_image_url in the response is a ready-to-print PNG. Download it and stick it anywhere.
curl -o my_qpr_code.png "https://api.3qpr.com/qr/cf7x2p.png"Step 4 — Test the scan experience
Open https://3qpr.com/s/cf7x2p in your browser (or scan with your phone camera). You'll land in an AI chat powered by the prompt you defined — no app download needed.
Step 5 — Subscribe to scan events
Register a webhook to receive real-time notifications whenever your QPR Code is scanned.
curl -X POST https://api.3qpr.com/v1/webhooks \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"url": "https://yourapp.com/webhooks/3qpr",
"events": ["scan.created", "conversation.completed"]
}'Save the secret from the response — it's used to verify incoming webhook signatures.