Skip to main content
A
Docs

Slide Generation

Generate structured presentations from natural language prompts with AI-powered content structuring.

Overview

Present's slide generation takes a natural language prompt and produces a complete presentation with structured slides. The AI analyzes the prompt, determines the optimal content structure, and generates slide titles, body content, and layout recommendations.

Generating a Presentation

The generation endpoint accepts a prompt, optional template reference, desired slide count, and language:

curl -X POST http://localhost:8011/api/v1/presentations/generate \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $TOKEN" \
  -d '{
    "prompt": "Quarterly report on AI model deployment across government ministries, including adoption metrics, cost analysis, performance benchmarks, and recommendations for next quarter",
    "slide_count": 12,
    "language": "en"
  }'

Response:

{
  "pres_id": "pres-a1b2c3",
  "title": "AI Model Deployment: Quarterly Report",
  "prompt": "Quarterly report on AI model deployment...",
  "status": "completed",
  "slide_count": 12,
  "template_id": null,
  "created_at": "2024-01-15T10:30:00Z",
  "updated_at": "2024-01-15T10:30:05Z"
}

Generation Parameters

ParameterTypeRequiredDescription
promptstringYesNatural language description of the presentation (1-5,000 characters)
template_idstringNoReference a saved template for branding
slide_countintegerNoNumber of slides to generate (1-30, default: 8)
languagestringNoContent language: en or ar (default: en)

Content Structuring

The AI structures presentations following standard government presentation patterns:

  1. Title Slide -- Presentation title, date, and organization
  2. Executive Summary -- High-level overview of key points
  3. Context/Background -- Setting the stage for the main content
  4. Main Content Slides -- Detailed analysis, data, and findings
  5. Recommendations -- Actionable next steps
  6. Conclusion -- Summary and call to action

The actual structure adapts to the prompt. A budget proposal emphasizes financial data and ROI analysis, while a strategy deck focuses on vision, pillars, and implementation phases.

Editing Individual Slides

After generation, refine any slide with natural language instructions:

curl -X POST http://localhost:8011/api/v1/presentations/{pres_id}/slides/3/edit \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $TOKEN" \
  -d '{
    "instruction": "Add a comparison table showing model performance across three providers, with columns for latency, accuracy, and cost per request"
  }'

The AI applies the instruction to the specified slide (zero-indexed) while maintaining consistency with the rest of the presentation.

Editing Tips

  • Be specific about what you want changed ("add a table with X columns" vs. "improve this slide")
  • Reference data points or metrics you want included
  • Specify layout preferences when they matter ("use bullet points" or "add a chart")

Iterative Refinement

Generate first, then refine. Start with a broad prompt to create the structure, then use slide-level editing to perfect individual slides. This is faster than trying to get everything right in the initial prompt.

Arabic Content Generation

Set language to ar for Arabic presentations. The AI generates content in Arabic with appropriate right-to-left text flow:

curl -X POST http://localhost:8011/api/v1/presentations/generate \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $TOKEN" \
  -d '{
    "prompt": "تقرير ربع سنوي عن تبني الذكاء الاصطناعي في الجهات الحكومية",
    "slide_count": 8,
    "language": "ar"
  }'

Arabic presentations are fully RTL-aware in both the generated content and the exported PPTX/PDF files.

Presentation Status

StatusDescription
pendingGeneration is queued
generatingAI is producing slide content
completedPresentation is ready for review and export
failedGeneration encountered an error