Generate a Slide

AI-designed slides from natural language. Use this when you need a custom layout no template covers. For KPI dashboards, timelines, comparisons, and other known slide types, use POST /v1/renderinstead — it's faster and cheaper.

POST/v1/generate

Design a custom slide from a natural language brief. The AI picks the optimal layout, writes python-pptx code, validates against 33 quality heuristics, and optionally iterates with visual QA. Always async — returns 202 with job_id for polling.

Parameters

NameTypeRequiredDescription
briefstringrequiredNatural language description of the slide to generate. Describe the layout, content, and visual style you want.
modestringoptionalIgnored — always pro quality ($0.20, ~30s). Kept for backward compat.
theme_idstringoptionalTheme identifier. Built-in: "consulting_blue", "consulting_dark", "consulting_light". Or a saved custom theme ID.
chromeobjectoptionalSlide chrome overrides: {title, subtitle, kicker, footer, source, page_number, classification}.
auto_iterationsintegeroptionalNumber of visual QA rounds (0-3). Each round uses a vision LLM to review and improve. Default: 0.
namestringoptionalHuman-readable name for the slide. Auto-generated if omitted.
from_imageobjectoptionalImage analysis mode: {image (base64), instructions?, slide_count?}. Vision LLM analyzes the image and generates a slide recreating its layout.

Response

202
{
  "job_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
  "status": "queued",
  "name": "Build vs Buy Matrix"
}

Examples

curl -X POST https://api.slideforge.dev/v1/generate \
  -H "Authorization: Bearer sf_live_YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "brief": "2x2 matrix comparing build vs buy with cost and speed dimensions",
    "theme_id": "consulting_blue",
    "auto_iterations": 1
  }'

From Image mode

Pass a from_image object with a base64-encoded image. The AI analyzes the image and generates a slide recreating its layout, content, and visual style.

Use from_image.instructionsto customize the output (e.g., "apply corporate blue theme"). Set from_image.slide_count > 1 to generate a deck from the image.