Festival Post Generator API
Create stunning, brand-ready festival and holiday promotional posts with product integration.
GET/api/image/festival-post-generator-prompts
Retrieve a list of pre-defined festival themes and styles.
Example Request
curl -X GET 'https://codingmantra.com/api/image/festival-post-generator-prompts'Example Response
{
"data": [
{
"id": "diwali-premium",
"title": "Premium Diwali Celebration",
"categoryId": "indian-festivals",
"categoryTitle": "Indian Festivals",
"demoImageUrl": "https://..."
},
// ... more prompts
]
}POST/api/image/festival-post-generator
Generate a customized marketing post with optional product placement.
Request Body
| Field | Type | Description |
|---|---|---|
| promptId | string | Optional. Theme style ID. Fetch IDs via `/api/image/festival-post-generator-prompts`. |
| festivalPrompt | string | Optional. Scene instructions. Required if `promptId` is omitted. |
| productImage | string | Optional. Data URI/URL to integrate a product seamlessly into the scene. |
| logoImage | string | Optional. Data URI/URL of a brand logo. |
| logoPlacement | string | Optional. Instructions for logo placement (e.g. "bottom-right corner"). |
| logoSize | number | Optional. Numeric scale for logo (e.g. 0.15 for 15% height). |
| overlayText | string | Optional. Short promotional copy (e.g. "50% Off!"). |
| marketingText | string | Optional. Extended tagline or slogan. |
| model | string | Optional. `'standard'` (default) or `'pro'`. |
| aspectRatio | string | Optional. Default `'1:1'`. |
| outputResult | string | Optional. `'base64'` (default) or `'url'`. |
Example Request
curl -X POST 'https://codingmantra.com/api/image/festival-post-generator' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer YOUR_API_KEY' \
-d '{
"promptId": "diwali-premium",
"productImage": "https://example.com/perfume.png",
"logoImage": "https://example.com/logo.png",
"overlayText": "FESTIVE SALE 50% OFF",
"aspectRatio": "1:1"
}'Example Response
{
"data": {
"photoDataUri": "data:image/png;base64,..."
}
}