Authentication
Send a token as Authorization: Bearer <token>. Read API conventions.
Endpoints
| Method | Path | Purpose | Role |
|---|---|---|---|
| POST | /api/v1/presentations/generate | Make a presentation from a prompt | Any |
| GET | /api/v1/presentations | List presentations | Any |
| GET | /api/v1/presentations/stats | Presentation statistics | Any |
| GET | /api/v1/presentations/{pres_id} | Get a presentation | Any |
| DELETE | /api/v1/presentations/{pres_id} | Delete a presentation | admin |
| POST | /api/v1/presentations/batch-delete | Delete more than one presentation | admin |
| POST | /api/v1/presentations/{pres_id}/duplicate | Copy a presentation | Any |
| POST | /api/v1/presentations/{pres_id}/clone | Copy a presentation | Any |
| PUT | /api/v1/presentations/{pres_id}/reorder | Change the order of the slides | Any |
| POST | /api/v1/presentations/{pres_id}/slides/{slide_idx}/edit | Change one slide with an instruction | Any |
| POST | /api/v1/presentations/{pres_id}/export/pptx | Export to PPTX | Any |
| POST | /api/v1/presentations/{pres_id}/export/pdf | Export to PDF | Any |
| POST | /api/v1/presentations/{pres_id}/comments | Add a comment | Any |
| GET | /api/v1/presentations/{pres_id}/comments | List comments | Any |
| GET | /api/v1/templates | List templates | Any |
| POST | /api/v1/templates/upload | Upload a PPTX template | admin |
| POST | /api/v1/templates | Save a presentation as a template | admin |
| POST | /api/v1/templates/{template_id}/use | Start a presentation from a template | Any |
| GET | /api/v1/health | Health check | None |
Make a deck
curl https://present.example.gov/api/v1/presentations/generate \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{"prompt": "Quarterly update on digital service adoption for the executive committee", "slide_count": 10, "language": "ar"}'
| Field | Type | Required | Meaning |
|---|---|---|---|
prompt | string | Yes | 1 to 5,000 characters |
template_id | string | No | The template to use |
slide_count | integer | No | 1 to 30. The default is 8. |
language | string | No | en or ar. The default is en. |
The call returns when the deck is ready. The response has the status ready.
Export
POST /api/v1/presentations/{pres_id}/export/pptx and POST /api/v1/presentations/{pres_id}/export/pdf return the file.
Errors
| Status | Cause |
|---|---|
| 400 | The template file is not PPTX |
| 403 | Your role cannot upload templates or delete decks |
| 404 | The deck or template does not exist |
| 502 | The model did not return a usable result. Try again later. |
| 503 | Slide generation is not set up |