Skip to main content
REST API · v1

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 header
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.

EndpointLimitWindow
POST /generate10 req1 minute
POST /templates/:id/generate10 req1 minute
GET endpoints60 req1 minute

Endpoints

POST/v1/generate

Generate a presentation from a text prompt using AI.

Request
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"
  }'
Response (200)
{
  "project_id": "uuid",
  "slides": [
    { "title": "Slide 1", "html": "<section>...</section>" }
  ]
}
GET/v1/templates

List your templates. Add ?include_public=true to include public templates.

Request
curl https://pyntra.ai/api/v1/templates \
  -H "Authorization: Bearer pyntra_YOUR_KEY"
Response (200)
{
  "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..."
    }
  ]
}
GET/v1/templates/:id

Get a single template with its field schema and slide data.

Request
curl https://pyntra.ai/api/v1/templates/TEMPLATE_ID \
  -H "Authorization: Bearer pyntra_YOUR_KEY"
POST/v1/templates/:id/generate

Generate a project by filling template fields with your values.

Request
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"
  }'
Response (200)
{
  "project_id": "uuid",
  "template_id": "uuid",
  "slides_count": 12
}
GET/v1/projects

List your projects, ordered by last updated.

Request
curl https://pyntra.ai/api/v1/projects \
  -H "Authorization: Bearer pyntra_YOUR_KEY"
Response (200)
{
  "projects": [
    {
      "id": "uuid",
      "name": "Q3 Strategy Deck",
      "created_at": "2026-03-29T...",
      "updated_at": "2026-03-29T..."
    }
  ]
}
GET/v1/projects/:id

Get a project with all its slides.

Request
curl https://pyntra.ai/api/v1/projects/PROJECT_ID \
  -H "Authorization: Bearer pyntra_YOUR_KEY"
Response (200)
{
  "project": {
    "id": "uuid",
    "name": "Q3 Strategy Deck",
    "slides": [
      { "id": "uuid", "html": "<section>...</section>", "metadata": {} }
    ]
  }
}

Error codes

StatusMeaning
400Invalid request body or missing required fields
401Missing or invalid API key
403API access requires Pro plan
404Resource not found or not owned by you
429Rate limit exceeded — check the Retry-After header
500Internal server error
503Billing is briefly unavailable — try again after the Retry-After header
Error response format
{
  "error": "Human-readable error message",
  "missing": ["field_key"]  // only for 400 with missing template fields
}