Send a POST request to /api/quote with a username, message, and optional avatar to generate a Telegram-style quote image.
POST /api/quote
| Parameter | Type | Required | Description |
|---|---|---|---|
| username | string | Yes | Display name shown on the quote |
| text | string | Yes | Quote message content |
| avatar | string | No | Avatar URL or Base64 data URI. Defaults to initials. |
URL: Public image URL
"avatar": "https://example.com/avatar.jpg"
Base64: Data URI format
"avatar": "data:image/jpeg;base64,/9j/4AAQSkZJRg..."
Default: If omitted, the first letter of the username is used.
With URL avatar:
curl -X POST "https://zquote-tau.vercel.app/api/quote" \
-H "Content-Type: application/json" \
-d '{
"username": "DEV ZIKKY",
"text": "Peak anime updates.",
"avatar": "https://example.com/avatar.jpg"
}'
With Base64 avatar:
curl -X POST "https://zquote-tau.vercel.app/api/quote" \
-H "Content-Type: application/json" \
-d '{
"username": "DEV ZIKKY",
"text": "Hello from ZQuote!",
"avatar": "data:image/jpeg;base64,BASE64_DATA_HERE"
}'
⚠️ Replace BASE64_DATA_HERE with your actual Base64-encoded image data.
const response = await fetch('https://zquote-tau.vercel.app/api/quote', {
method: 'POST',
headers: {
'Content-Type': 'application/json'
},
body: JSON.stringify({
username: 'DEV ZIKKY',
text: 'Hello from ZQuote!',
avatar: 'https://example.com/avatar.jpg'
})
});
const data = await response.json();
if (data.success) {
console.log('Image URL:', data.data.image.url);
console.log('Expires in:', data.data.image.expiresIn, 'seconds');
} else {
console.error('Error:', data.error);
}
import requests
url = 'https://zquote-tau.vercel.app/api/quote'
payload = {
"username": "DEV ZIKKY",
"text": "Hello from ZQuote!",
"avatar": "https://example.com/avatar.jpg"
}
response = requests.post(url, json=payload)
data = response.json()
if data.get("success"):
print("Image URL:", data["data"]["image"]["url"])
print("Expires in:", data["data"]["image"]["expiresIn"], "seconds")
else:
print("Error:", data.get("error"))
Success:
{
"success": true,
"data": {
"image": {
"url": "https://...",
"expiresIn": 60
}
}
}
Error:
{
"success": false,
"error": "Error message describing what went wrong"
}
400 — Invalid request (missing parameters, invalid data)500 — Server error (rendering failed, ImgBB upload failed)┌─────────────┐
│ 1. Request │ POST /api/quote with username, text, avatar
└──────┬──────┘
▼
┌─────────────┐
│ 2. Render │ Generate quote image using Satori
└──────┬──────┘
▼
┌─────────────┐
│ 3. Upload │ Upload to ImgBB for hosting
└──────┬──────┘
▼
┌─────────────┐
│ 4. Response │ Return image URL with 60s expiry
└─────────────┘
♥ ZQuote v1.1 is fully open source.
The complete source code is publicly available on GitHub. You can inspect the code, learn from the implementation, modify it, deploy your own instance, and contribute improvements.
Source Code:
github.com/zikky0001-droid/zquote
The repository contains the API server, quote renderer, frontend, storage implementation, fonts, configuration, and project documentation.
The ImgBB key must not be placed inside index.html or exposed to the browser. It belongs on the server side as an environment variable. The repository itself also recommends keeping the key private and using a server-side environment variable for production deployments.
Add IMGBB_API_KEY to Vercel
Name: IMGBB_API_KEYValue: YOUR_IMGBB_API_KEY
If you're deploying from your own fork, use your own ImgBB API key rather than sharing the key from another deployment.