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
| Parameter | Type | Required | Description |
|---|---|---|---|
prompt | string | Yes | Natural language description of the presentation (1-5,000 characters) |
template_id | string | No | Reference a saved template for branding |
slide_count | integer | No | Number of slides to generate (1-30, default: 8) |
language | string | No | Content language: en or ar (default: en) |
Content Structuring
The AI structures presentations following standard government presentation patterns:
- Title Slide -- Presentation title, date, and organization
- Executive Summary -- High-level overview of key points
- Context/Background -- Setting the stage for the main content
- Main Content Slides -- Detailed analysis, data, and findings
- Recommendations -- Actionable next steps
- 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
| Status | Description |
|---|---|
pending | Generation is queued |
generating | AI is producing slide content |
completed | Presentation is ready for review and export |
failed | Generation encountered an error |