Developer API
Programmatic ad generation for Agency-plan accounts. Create an API key in the Studio, then authenticate every request with the X-Api-Key header.
Render an ad
POST https://adsgen.vantafloor.in/api/render
X-Api-Key: agk_...
Content-Type: application/json
{
"format": "newspaper", // newspaper | social | story | festival | flyer | card | status
"lang": "gu", // gu | hi | en (newspaper)
"phone": "91XXXXXXXXXX", // WhatsApp number for CTA + QR
"client_id": 12, // optional: render with a client workspace's brand
"hook": "From ₹499/month*", // optional headline
"content": { "brand": "YourBrand", "R1L": "Item", "R1P": "₹999" },
"overrides": [{ "i": 2, "text": "Any text element, by index" }]
}
→ 200 { "ok": true, "files": { "svg": "...", "png": "...", "pdf": "...", "pdf_cmyk": "..." } }
→ 200 { "ok": true, "jobId": "..." } // video formats are queued
Poll a queued job
GET /api/jobs/:jobId → { "status": "queued|running|done|error", "files": {...} }
Live preview (no files, ~10 ms)
POST /api/preview → { "ok": true, "svg": "<svg .../>" } // same body as /api/render
Webhooks
Set a webhook URL in the Studio (Business+). Every completed render POSTs:
POST <your-url>
X-AdsGen-Signature: hex(HMAC-SHA256(body, your_secret))
{ "event": "render.completed", "format": "newspaper", "client": "Patel Pumps",
"files": { "png": "..." }, "timestamp": "2026-..." }
// verify (node):
const ok = require('crypto').createHmac('sha256', SECRET).update(rawBody).digest('hex')
=== req.headers['x-adsgen-signature'];
Limits
Renders are metered monthly by plan (see Pricing) and rate-limited at the edge. Files are retained for 14 days — download or webhook-forward them promptly.