# Adflow
> HTML ad builder with AI image generation, design systems, and multi-format export.
## What Adflow does
Adflow creates display ads (banners, social posts, video frames) in multiple formats:
- Square (1080x1080), Portrait (1080x1350), Vertical (1080x1920), Landscape (1920x1080), Wide (1200x628)
- Each project contains scenes with headlines, CTAs, background images, SVG overlays
- AI-powered: text-to-image generation, image extension (outpainting), upscaling, retouching (erase + inpaint), SVG generation
- Design systems store brand colours, fonts, and logos for consistent output
- Export to Figma-ready HTML or PNG screenshots
## API
Base URL: https://adflow.design
OpenAPI spec: https://adflow.design/openapi.yaml
Interactive docs: https://adflow.design/docs
Auth: X-API-Key header on every request. Keys start with "adk_".
## Key endpoints
- POST /api/genai/generate — AI image generation (flux-dev, gpt-image-1, imagen4, ideogram-v3)
- POST /api/genai/outpaint — Extend image edges with AI
- POST /api/genai/enhance — Upscale images (aura-sr, creative-upscaler, clarity-upscaler)
- POST /api/genai/retouch — Erase or inpaint regions of an image with AI
- POST /api/genai/vector — Generate SVG illustrations
- GET /api/design-systems/list — List brand design systems
- GET /api/projects/list — List ad projects
- POST /api/projects/save — Create or update a project
- POST /api/renders/figma-html — Export scenes as HTML for Figma
- POST /api/renders/screenshot — Render HTML to PNG
## Quick start
1. Get an API key at adflow.design (Settings > API Keys) or POST /api/auth/api-keys
2. Set header: X-API-Key: adk_your_key_here
3. Generate an image: POST /api/genai/generate { "prompt": "sunset over mountains", "model": "flux-dev" }
4. Response: { "ok": true, "path": "https://...blob.vercel-storage.com/...", "filename": "generated.png" }