Skip to main content
GET
/
api
/
v1
/
generations
/
{generation_id}
Check generation status
curl --request GET \
  --url https://slides-api.getalai.com/api/v1/generations/{generation_id} \
  --header 'Authorization: Bearer <token>'
{
  "generation_id": "<string>",
  "status": "pending",
  "created_at": "<string>",
  "error": "<string>",
  "completed_at": "<string>",
  "generation_type": "presentation_generation",
  "presentation_id": "<string>",
  "formats": {}
}

Documentation Index

Fetch the complete documentation index at: https://docs.getalai.com/llms.txt

Use this file to discover all available pages before exploring further.

Poll this endpoint to check the status of any async operation (presentation generation, slide creation, export, or transcript generation).

Status Values

StatusDescription
pendingQueued, not yet started
in_progressCurrently processing
completedFinished successfully; results available
failedError occurred; check error field
Recommended polling: Every 5 seconds. Most operations complete within 1-3 minutes depending on slide count.

Response Fields

FieldTypeDescription
generation_idstringThe generation ID you’re polling
statusstringCurrent status
errorstringError message (when failed)
created_atstringISO 8601 timestamp
completed_atstringWhen generation finished
presentation_idstringID of the presentation
formatsobjectExport results (when completed)

Format Results

When status is completed, the formats object contains results for each requested format:
{
  "generation_id": "abc123-...",
  "status": "completed",
  "presentation_id": "xyz789-...",
  "formats": {
    "link": {
      "status": "completed",
      "url": "https://app.getalai.com/view/..."
    },
    "pdf": {
      "status": "completed",
      "url": "https://storage.../presentation.pdf"
    },
    "ppt": {
      "status": "completed",
      "url": "https://storage.../presentation.pptx"
    }
  }
}
Each format has:
  • status: completed, failed, or skipped
  • url: Signed download URL (valid for 24 hours)
  • error: Error message if failed

Example

curl "https://slides-api.getalai.com/api/v1/generations/abc123-def456-..." \
  -H "Authorization: Bearer YOUR_API_KEY"

Polling Example (Python)

import time
import requests

def wait_for_generation(generation_id, api_key, max_wait=300):
    url = f"https://slides-api.getalai.com/api/v1/generations/{generation_id}"
    headers = {"Authorization": f"Bearer {api_key}"}

    start = time.time()
    while time.time() - start < max_wait:
        response = requests.get(url, headers=headers)
        data = response.json()

        if data["status"] == "completed":
            return data
        elif data["status"] == "failed":
            raise Exception(data.get("error", "Generation failed"))

        time.sleep(3)  # Poll every 3 seconds

    raise TimeoutError("Generation timed out")

# Usage
result = wait_for_generation("abc123-...", "YOUR_API_KEY")
print(result["formats"]["link"]["url"])
Download URLs in the formats object are signed and valid for 24 hours. Store the presentation_id if you need to export again later.

Authorizations

Authorization
string
header
required

Your Alai API key. Get one from your account settings at app.getalai.com

Path Parameters

generation_id
string
required

Response

Successful Response

generation_id
string
required
status
enum<string>
required

Current state: pending → in_progress → completed/failed

Available options:
pending,
in_progress,
completed,
failed
created_at
string
required
error
string | null

Human-readable error message when status is 'failed'

completed_at
string | null

ISO 8601 timestamp when generation finished

generation_type
string
default:presentation_generation
Allowed value: "presentation_generation"
presentation_id
string | null

Available once generation starts. Use this ID for subsequent operations.

formats
Formats · object

Export results keyed by format ('link', 'pdf', 'ppt'). Only present when completed.