Base URL
http://localhost:8011/api/v1
All endpoints require Bearer token authentication in the Authorization header.
Presentations
Generate Presentation
/api/v1/presentations/generateGenerate a complete presentation from a natural language prompt.
Request Body:
{
"prompt": "Government AI adoption strategy for 2025",
"template_id": "tmpl-a1b2c3",
"slide_count": 10,
"language": "en"
}
| Field | Type | Required | Description |
|---|---|---|---|
prompt | string | Yes | Presentation description (1-5,000 characters) |
template_id | string | No | Template ID for branding |
slide_count | integer | No | Number of slides (1-30, default: 8) |
language | string | No | en or ar (default: en) |
Response:
{
"pres_id": "pres-a1b2c3",
"title": "Government AI Adoption Strategy 2025",
"prompt": "Government AI adoption strategy for 2025",
"status": "completed",
"slide_count": 10,
"template_id": "tmpl-a1b2c3",
"created_at": "2024-01-15T10:30:00Z",
"updated_at": "2024-01-15T10:30:05Z"
}
List Presentations
/api/v1/presentationsReturns all presentations with their status and metadata.
Get Presentation
/api/v1/presentations/{pres_id}Returns full presentation details.
Delete Presentation
/api/v1/presentations/{pres_id}Permanently delete a presentation and its associated data.
Slide Editing
Edit Slide
/api/v1/presentations/{pres_id}/slides/{slide_idx}/editApply a natural language editing instruction to a specific slide. The slide_idx parameter is zero-indexed.
Request Body:
{
"instruction": "Add a comparison table showing Q3 vs Q4 performance metrics"
}
| Field | Type | Required | Description |
|---|---|---|---|
instruction | string | Yes | Editing instruction (1-2,000 characters) |
Export
Export PPTX
/api/v1/presentations/{pres_id}/export/pptxExport the presentation as a PowerPoint file. Returns a binary PPTX file download.
Export PDF
/api/v1/presentations/{pres_id}/export/pdfExport the presentation as a PDF document. Returns a binary PDF file download.
Templates
Upload Template
/api/v1/templates/uploadUpload a PPTX file as a reusable template. Accepts multipart/form-data.
Form Fields:
| Field | Type | Required | Description |
|---|---|---|---|
file | binary | Yes | PPTX template file |
name | string | Yes | Template name |
description | string | No | Template description |
Response:
{
"template_id": "tmpl-a1b2c3",
"name": "Ministry Branded Template",
"description": "Official template with ministry branding",
"created_at": "2024-01-15T10:30:00Z"
}
List Templates
/api/v1/templatesReturns all available templates.
Comments
Create Comment
/api/v1/presentations/{pres_id}/commentsAdd a review comment to a specific slide.
Request Body:
{
"slide_index": 3,
"element_id": "",
"text": "Please update the budget figures",
"author": "Ahmed Al Mansoori"
}
| Field | Type | Required | Description |
|---|---|---|---|
slide_index | integer | Yes | Zero-indexed slide number |
element_id | string | No | Specific element on the slide |
text | string | Yes | Comment text (1-2,000 characters) |
author | string | No | Comment author name |
List Comments
/api/v1/presentations/{pres_id}/commentsReturns all comments for a presentation, optionally filtered by slide.
Query Parameters:
| Parameter | Type | Description |
|---|---|---|
slide_index | integer | Filter comments to a specific slide |
Health
Health Check
/healthReturns service health status.
Metrics
/metricsReturns service metrics including uptime and request counts.