QR Code Generator
This API generates high-quality QR codes for URLs, text, Wi-Fi configs, or vCards. The result is automatically uploaded to cloud storage, returning a direct image link that you can share or embed immediately.
Endpoint
Section titled “Endpoint” POST
/api/v1/qrcode Request Parameters
Section titled “Request Parameters”The following parameters are accepted in the request body:
| Field | Type | Required | Description |
|---|---|---|---|
text | string | Yes | The content to encode (URL, Text, etc.). |
color | string | Optional | Dot color in Hex format (Default: #000000). |
bg | string | Optional | Background color in Hex format (Default: #ffffff). |
Request Examples
Section titled “Request Examples”curl -X POST https://heavstal.com.ng/api/v1/qrcode \-H "Content-Type: application/json" \-H "x-api-key: <YOUR_API_KEY>" \-d '{"text": "https://google.com", "color": "#ff0000"}'const response = await fetch('https://heavstal.com.ng/api/v1/qrcode', { method: 'POST', headers: { 'Content-Type': 'application/json', 'x-api-key': '<YOUR_API_KEY>' }, body: JSON.stringify({ text: 'https://google.com', color: '#ff0000' // Red QR Code })});
const res = await response.json();console.log(res.data.link);import { tools } from '@heavstal/api';
// text, dot_color, background_colorconst qr = await tools.qrcode("https://heavstal.com.ng", "#ff0000", "#ffffff");console.log(qr.data.link);import requests
url = "https://heavstal.com.ng/api/v1/qrcode"headers = { "Content-Type": "application/json", "x-api-key": "<YOUR_API_KEY>"}payload = { "text": "https://google.com", "color": "#ff0000"}
response = requests.post(url, headers=headers, json=payload)print(response.json()["data"]["link"])Response Examples
Section titled “Response Examples”{ "status": "success", "creator": "HEAVSTAL TECH", "data": { "text": "https://google.com", "link": "https://files.catbox.moe/qrcode.png" }}{ "status": "error", "error": "Failed to generate or upload QR code."}