Skip to main content
Alai transforms how teams create presentations. Instead of spending hours in PowerPoint, describe what you need and get professionally designed slides in seconds. The Alai API brings this power to your applications. Generate presentations programmatically, integrate with your workflows, and automate slide creation at scale. API Introduction

What You Can Build

Generate Presentations

Turn text, notes, or documents into complete slide decks with AI-powered design

Add & Edit Slides

Programmatically add new slides to existing presentations

Export Anywhere

Get shareable links, PDFs, or PowerPoint files

Extract Content

Get structured content and layout information from slides

How It Works

1

Get Your API Key

Sign up at app.getalai.com and generate an API key from your account settings.
2

Submit Your Content

POST to /generations with your text content. You’ll receive a generation_id immediately.
3

Poll for Completion

Check GET /generations/{id} every few seconds until status is completed.
4

Access Your Presentation

Get shareable links, download PDFs, or export to PowerPoint from the response.

Quick Example

import requests
import time

API_KEY = "your_api_key"
BASE_URL = "https://slides-api.getalai.com/api/v1"

# 1. Generate presentation
response = requests.post(
    f"{BASE_URL}/generations",
    headers={"Authorization": f"Bearer {API_KEY}"},
    json={
        "input_text": "Q4 revenue grew 25%. Key wins: Enterprise deals and product launches.",
        "presentation_options": {"title": "Q4 Results", "slide_range": "6-10"},
        "export_formats": ["link", "pdf"]
    }
)
generation_id = response.json()["generation_id"]

# 2. Poll until complete
while True:
    status = requests.get(
        f"{BASE_URL}/generations/{generation_id}",
        headers={"Authorization": f"Bearer {API_KEY}"}
    ).json()

    if status["status"] == "completed":
        print(f"View: {status['formats']['link']['url']}")
        print(f"PDF: {status['formats']['pdf']['url']}")
        break
    elif status["status"] == "failed":
        raise Exception(status.get("error"))

    time.sleep(3)

Get Your API Key

  1. Sign up at app.getalai.com
  2. Click on your name in the left sidebar
  3. Select “API” from the dropdown menu
  4. Click “Add new API key” to generate your key
  5. Copy and securely store your API key
Keep your API key secure and never share it publicly. Treat it like a password.

Authentication

All requests require a Bearer token in the Authorization header:
Authorization: Bearer YOUR_API_KEY
Base URL:
https://slides-api.getalai.com/api/v1

Available Endpoints

Async Operations

These endpoints return a generation_id. Poll GET /generations/{id} until complete.
EndpointMethodDescription
/generationsPOSTGenerate a presentation from text
/presentations/{id}/slidesPOSTAdd a slide to a presentation
/presentations/{id}/exportsPOSTExport to PDF, PPT, or shareable link
/presentations/{id}/transcriptsPOSTExtract slide content and layout

Synchronous Operations

These endpoints return results immediately.
EndpointMethodDescription
/pingGETVerify your API key
/generations/{id}GETCheck generation status
/upload-imagesPOSTUpload images for presentations
/presentations/{id}/slides/{slide_id}DELETEDelete a slide
/presentations/{id}DELETEDelete a presentation

Generation Status

When polling, you’ll see one of these status values:
StatusDescription
pendingQueued, not yet started
in_progressCurrently processing
completedFinished successfully
failedError occurred (check error field)
Poll every 5 seconds. Most generations complete within 1-3 minutes depending on slide count.

Available Themes

Choose from 12 professionally designed themes:
ThemeStyle
AMETHYST_LIGHTLight purple, modern (default)
NEBULA_DARKDark blue, professional
FLAT_WHITEClean, minimalist
DESERT_BLOOMWarm, earthy tones
LAPIS_DAWNBlue gradient, corporate
EMERALD_FORESTGreen, natural
COSMIC_THREADDark, cosmic
DONUTPlayful, colorful
OAKWarm wood tones
OBSIDIAN_FLOWDark, sleek
MIDNIGHT_EMBERDark with red accents
AURORA_FLUXGradient, dynamic

Rate Limits

  • Max 5 concurrent generations per user
  • Recommended polling interval: 5 seconds
Need higher rate limits? Reach out to the Alai team at [email protected].

Credits

API generations consume the same credits as the Alai app. To check your balance or purchase more credits:

Error Handling

CodeDescription
200Success
400Bad Request - Invalid parameters
401Unauthorized - Invalid or missing API key
402Payment Required - Insufficient credits
404Not Found - Resource doesn’t exist
422Validation Error - Check request body
429Rate limit exceeded
500Internal Server Error
Error responses include details:
{
  "message": "Error description",
  "status_code": 400
}

Next Steps