API Reference
Programmatically generate presentations, manage templates, and retrieve project data.
Authentication
All API requests require a valid API key passed in the Authorization header. Create API keys in Settings → API (Pro plan required).
Authorization: Bearer pyntra_YOUR_API_KEY
Keep your API key secret
Never expose it in client-side code or public repositories. Revoke compromised keys immediately in Settings.
Base URL
https://pyntra.ai/api/v1
Rate limits
Rate limits are enforced per API key. When exceeded, you'll receive a 429 response with a Retry-After header.
| Endpoint | Limit | Window |
|---|---|---|
| POST /generate | 10 req | 1 minute |
| POST /templates/:id/generate | 10 req | 1 minute |
| GET endpoints | 60 req | 1 minute |
Endpoints
/v1/generateGenerate a presentation from a text prompt using AI.
curl https://pyntra.ai/api/v1/generate \
-H "Authorization: Bearer pyntra_YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{
"prompt": "Pitch deck for an AI-powered fitness app",
"slideCount": 10,
"brandKitId": "optional-uuid"
}'{
"project_id": "uuid",
"slides": [
{ "title": "Slide 1", "html": "<section>...</section>" }
]
}/v1/templatesList your templates. Add ?include_public=true to include public templates.
curl https://pyntra.ai/api/v1/templates \ -H "Authorization: Bearer pyntra_YOUR_KEY"
{
"templates": [
{
"id": "uuid",
"name": "Sales Deck",
"description": "...",
"category": "sales",
"field_schema": {
"fields": [
{ "key": "company_name", "label": "Company Name", "type": "text", "required": true },
{ "key": "logo_url", "label": "Logo", "type": "image", "required": false }
]
},
"use_count": 42,
"created_at": "2026-03-29T..."
}
]
}/v1/templates/:idGet a single template with its field schema and slide data.
curl https://pyntra.ai/api/v1/templates/TEMPLATE_ID \ -H "Authorization: Bearer pyntra_YOUR_KEY"
/v1/templates/:id/generateGenerate a project by filling template fields with your values.
curl https://pyntra.ai/api/v1/templates/TEMPLATE_ID/generate \
-H "Authorization: Bearer pyntra_YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{
"parameters": {
"company_name": "Acme Inc",
"tagline": "Move fast, ship faster",
"logo_url": "https://acme.com/logo.png"
},
"project_name": "Acme Pitch Deck"
}'{
"project_id": "uuid",
"template_id": "uuid",
"slides_count": 12
}/v1/projectsList your projects, ordered by last updated.
curl https://pyntra.ai/api/v1/projects \ -H "Authorization: Bearer pyntra_YOUR_KEY"
{
"projects": [
{
"id": "uuid",
"name": "Q3 Strategy Deck",
"created_at": "2026-03-29T...",
"updated_at": "2026-03-29T..."
}
]
}/v1/projects/:idGet a project with all its slides.
curl https://pyntra.ai/api/v1/projects/PROJECT_ID \ -H "Authorization: Bearer pyntra_YOUR_KEY"
{
"project": {
"id": "uuid",
"name": "Q3 Strategy Deck",
"slides": [
{ "id": "uuid", "html": "<section>...</section>", "metadata": {} }
]
}
}Error codes
| Status | Meaning |
|---|---|
| 400 | Invalid request body or missing required fields |
| 401 | Missing or invalid API key |
| 403 | API access requires Pro plan |
| 404 | Resource not found or not owned by you |
| 429 | Rate limit exceeded — check the Retry-After header |
| 500 | Internal server error |
| 503 | Billing is briefly unavailable — try again after the Retry-After header |
{
"error": "Human-readable error message",
"missing": ["field_key"] // only for 400 with missing template fields
}