Skip to content

API Reference

Interactive OpenAPI docs are available at /docs when the server is running.

Authentication

All API endpoints require authentication via one of:

Method Header Example
API Key X-API-Key X-API-Key: sf_abc123
API Key (Bearer) Authorization Authorization: Bearer sf_abc123
JWT Authorization Authorization: Bearer eyJhbG...
Session Cookie Automatic (web UI)

REST Endpoints

Auth

Method Path Description
POST /api/auth/login Login, get JWT tokens
POST /api/auth/refresh Refresh JWT token
POST /api/auth/logout Logout
GET /api/auth/profile Get current user profile
PATCH /api/auth/profile Update profile
POST /api/auth/profile/password Change password
GET /auth/authorize Azure Entra OAuth start
GET /auth/callback Azure Entra OAuth callback

Presentations

Method Path Description
POST /api/presentations/generate Generate presentation (async)
GET /api/presentations List presentations
GET /api/presentations/{id} Get presentation details
POST /api/presentations/{id}/download Download presentation file
DELETE /api/presentations/{id} Delete presentation
GET /api/presentations/{id}/progress SSE progress stream

Templates

Method Path Description
GET /api/templates List templates
POST /api/templates/upload Upload template (.pptx)
GET /api/templates/{id} Get template details
GET /api/templates/{id}/placeholders Extract placeholders
POST /api/templates/{id}/download Download template file
DELETE /api/templates/{id} Delete template

Workflows

Method Path Description
GET /api/workflows/navigation-workflows Workflow list for dashboard
GET /api/workflows/available-workflows All available workflows
GET /api/workflows/{engine}/{id} Get workflow details
POST /api/workflows/{engine}/{id}/execute Execute workflow
GET /api/workflows/{engine}/{id}/preview N8N visualization

Context (RAG)

Method Path Description
POST /api/context/documents/upload Upload document
GET /api/context/documents List documents
GET /api/context/documents/{id} Get document details
POST /api/context/documents/{id}/search Vector similarity search
DELETE /api/context/documents/{id} Delete document

Results

Method Path Description
POST /api/results Store workflow result
GET /api/results List results
GET /api/results/{id} Get result
DELETE /api/results/{id} Delete result

Images

Method Path Description
POST /api/images/upload Upload image
GET /api/images List images
DELETE /api/images/{id} Delete image

Utilities

Method Path Description
GET /health Health check
GET /session Session info
GET /docs OpenAPI interactive docs
POST /v1/chat/completions OpenAI-compatible AI proxy

CLI Commands

The slidefactory CLI is installed with the package.

System

Command Description
slidefactory init all Initialize database + create admin user
slidefactory init check Verify prerequisites
slidefactory init database Run database migrations only
slidefactory status Show configuration and connection status
slidefactory status --full Detailed status with all services

Users

Command Description
slidefactory user list List all users
slidefactory user create-local EMAIL --name NAME --preset PRESET Create local user
slidefactory user show EMAIL Show user details

Presets: admin, standard, readonly

API Keys

Command Description
slidefactory api-key create NAME --user-id ID --scopes SCOPES Create API key
slidefactory api-key list List API keys
slidefactory api-key test KEY Test API key validity

Templates

Command Description
slidefactory template upload FILE --workflow-folder FOLDER Upload template
slidefactory template list [--workflow-folder FOLDER] List templates
slidefactory template placeholders ID Extract placeholders
slidefactory template download ID [--output FILE] Download template
slidefactory template delete ID Delete template

Presentations

Command Description
slidefactory presentation generate --template-id ID --data-file FILE Generate
slidefactory presentation status PROCESS_ID Check status
slidefactory presentation download PROCESS_ID --output FILE Download

Context

Command Description
slidefactory context ingest --file FILE --context-id ID Ingest document
slidefactory context search QUERY --context-id ID --top-k N Search

Maintenance

Command Description
slidefactory task active Show active Celery tasks
slidefactory vacuum --execute --retention-days N Clean up old data
slidefactory thumbnails generate Generate template thumbnails