API Documentation
Learn how to use the QR Code Forge API to generate QR codes programmatically.
API Endpoint
The base endpoint for all API requests.
GET /api/generate-qrQuery Parameters
Customize your QR code using these parameters.
| Parameter | Type | Required | Description |
|---|---|---|---|
| url | string | Yes | The URL or text to encode. |
| imageUrl | string | No | A URL to an image to embed in the QR code. |
Example Usage
Here’s how you can use the API in your own projects.
Example URL
/api/generate-qr?url=https://dborgov.dev&imageUrl=https://dborgov.dev/brand/icon.pngcURL Example
curl -o qrcode.png "/api/generate-qr?url=https://dborgov.dev&imageUrl=https://dborgov.dev/brand/icon.png"JavaScript (fetch)
fetch('/api/generate-qr?url=YOUR_URL&imageUrl=YOUR_IMAGE_URL')
.then(response => response.blob())
.then(blob => {
const url = URL.createObjectURL(blob);
// Use the URL to display the image, e.g., <img src={url} />
});