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.
/v1/generateDesign 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
| Name | Type | Required | Description |
|---|---|---|---|
| brief | string | required | Natural language description of the slide to generate. Describe the layout, content, and visual style you want. |
| mode | string | optional | Ignored — always pro quality ($0.20, ~30s). Kept for backward compat. |
| theme_id | string | optional | Theme identifier. Built-in: "consulting_blue", "consulting_dark", "consulting_light". Or a saved custom theme ID. |
| chrome | object | optional | Slide chrome overrides: {title, subtitle, kicker, footer, source, page_number, classification}. |
| auto_iterations | integer | optional | Number of visual QA rounds (0-3). Each round uses a vision LLM to review and improve. Default: 0. |
| name | string | optional | Human-readable name for the slide. Auto-generated if omitted. |
| from_image | object | optional | Image analysis mode: {image (base64), instructions?, slide_count?}. Vision LLM analyzes the image and generates a slide recreating its layout. |
Response
{
"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.