API Reference

Generate slide decks programmatically — connect from Zapier, n8n, or your own app.

← Get your API key in the dashboard

Authentication

All requests require an Authorization: Bearer sdk_… header. Generate keys in your dashboard under API Access.

Endpoints

POST/api/v1/decks

Generate a deck from a text prompt. Returns the deck ID, share URL, and full slide content.

Request body

FieldTypeRequiredDescription
promptstringYes10–1000 chars. What the deck should be about.
themestringNoStyle hint, e.g. "professional", "creative", "minimal". Default: professional.

cURL

curl -X POST https://slide-deck.io/api/v1/decks \
  -H "Authorization: Bearer sdk_••••••••••••••••••••••••••••••••••••••" \
  -H "Content-Type: application/json" \
  -d '{"prompt": "Q4 marketing strategy for a SaaS startup", "theme": "professional"}'

JavaScript

const res = await fetch("https://slide-deck.io/api/v1/decks", {
  method: "POST",
  headers: {
    Authorization: "Bearer " + apiKey,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    prompt: "Q4 marketing strategy for a SaaS startup",
    theme: "professional",
  }),
});
const { id, title, shareUrl, slides } = await res.json();
console.log(shareUrl); // https://slide-deck.io/share/abc123

Response (201)

{
  "id": "abc123",
  "title": "Q4 Marketing Strategy",
  "shareUrl": "https://slide-deck.io/share/abc123",
  "slides": [
    {
      "index": 0,
      "layout": "title",
      "heading": "Q4 Marketing Strategy",
      "elements": [{ "type": "text", "content": "SaaS Growth Plan" }],
      "speaker_notes": "Welcome everyone..."
    }
  ]
}
GET/api/v1/decks/:id

Fetch a deck you previously generated. Only decks owned by your API key's account are accessible.

cURL

curl https://slide-deck.io/api/v1/decks/DECK_ID \
  -H "Authorization: Bearer sdk_••••••••••••••••••••••••••••••••••••••"

Key Management

Create, list, and revoke API keys in the dashboard under API Access. Keys are shown only once at creation — store them securely.

Error codes

StatusMeaning
400Bad request — invalid JSON or prompt out of range
401Missing or invalid API key
404Deck not found or not owned by this key
502AI service error
503AI provider not configured