Developer docs
Calligraphy Generator API documentation
Use API keys to generate transparent PNG calligraphy images for Arabic names, cursive names, tattoo previews, wedding stationery, and product personalization.
Authentication
Send your API key in either header. Dashboard endpoints use your Supabase access token; public render endpoints use `cg_live_...` API keys.
Authorization: Bearer cg_live_your_key
# or
x-api-key: cg_live_your_keyPOST /api/v1/generate
Required: `text`, `style`. Optional: `resolution`, `transparent_background`, `text_color`, `background_color`, `response_format` (`data_url` or `base64`).
curl https://www.calligraphy-generator.com/api/v1/generate \
-H "Authorization: Bearer cg_live_your_key" \
-H "Content-Type: application/json" \
-d '{
"text": "Layla",
"style": "Diwani",
"resolution": "SQUARE_HD",
"transparent_background": true,
"text_color": "#111827",
"response_format": "data_url"
}'const response = await fetch('https://www.calligraphy-generator.com/api/v1/generate', {
method: 'POST',
headers: {
Authorization: 'Bearer cg_live_your_key',
'Content-Type': 'application/json',
},
body: JSON.stringify({
text: 'Layla',
style: 'Diwani',
resolution: 'SQUARE_HD',
transparent_background: true,
response_format: 'data_url',
}),
});
const generation = await response.json();
console.log(generation.image.data_url);import requests
response = requests.post(
'https://www.calligraphy-generator.com/api/v1/generate',
headers={'Authorization': 'Bearer cg_live_your_key'},
json={
'text': 'Layla',
'style': 'Diwani',
'resolution': 'SQUARE_HD',
'transparent_background': True,
'response_format': 'data_url',
},
)
response.raise_for_status()
print(response.json()['image']['data_url'])GET /api/v1/styles
Returns supported styles and output sizes. Current styles: Diwani, Thuluth, Handwritten, Koufi, signature, calligraphy, bubble, Hanyi, Gen, Yrdzst. Resolutions: HD, SQUARE_HD, SQUARE_4K.
curl https://www.calligraphy-generator.com/api/v1/stylesPlans and limits
Free Test Mode
$0 路 100 renders/month 路 20/minute
Starter
$19/mo 路 1,000 renders/month 路 60/minute
Pro
$49/mo 路 5,000 renders/month 路 180/minute
Business
$149/mo 路 25,000 renders/month 路 600/minute
Errors
Errors include a stable code and request ID. Keep the request ID for support.
{
"error": {
"type": "quota_error",
"code": "quota_exceeded",
"message": "Monthly quota exceeded."
},
"request_id": "req_..."
}