Skip to main content
POST
/
api
/
v1
/
generations
Generate a presentation
curl --request POST \
  --url https://slides-api.getalai.com/api/v1/generations \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "input_text": "<string>",
  "additional_instructions": "<string>",
  "image_ids": [
    "<string>"
  ],
  "export_formats": [
    "link"
  ],
  "presentation_options": {
    "title": "API Generated Presentation",
    "theme_id": "27874e6b-8c1c-4301-bce7-d22e6e8df7d6",
    "slide_range": "auto",
    "existing_presentation_id": "<string>",
    "total_variants_per_slide": 1,
    "vibe_id": "<string>"
  },
  "text_options": {
    "language": "English (US)"
  },
  "image_options": {
    "include_ai_images": true,
    "include_web_images": true,
    "style": "auto",
    "style_instructions": "<string>",
    "num_image_variants": 0
  }
}
'
{
  "generation_id": "<string>"
}

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.

Generate a presentation from text content. This is an async operation - you receive a generation_id immediately and poll for results.

Workflow

  1. Submit your content with POST /generations
  2. Receive a generation_id immediately
  3. Poll GET /generations/{generation_id} until status is completed or failed
  4. Access your presentation via URLs in the formats field

Request Body

Required

ParameterTypeDescription
input_textstringContent to transform into slides. Can be plain text, markdown, or structured notes.

Optional Top-Level Fields

ParameterTypeDescription
additional_instructionsstringExtra guidance for the AI on style, focus areas, or specific requirements not captured by other options.
image_idsarray of stringsIDs (UUIDs) of previously uploaded images from POST /upload-images. Images are matched to relevant slides automatically.

Export Formats

ParameterTypeDefaultDescription
export_formatsarray["link"]Formats to export: link, pdf, ppt. Can request multiple.

Presentation Options

ParameterTypeDefaultDescription
presentation_options.titlestring”API Generated Presentation”Title shown on title slide and in exports
presentation_options.theme_idstring"27874e6b-8c1c-4301-bce7-d22e6e8df7d6"Theme ID controlling colors, fonts, and styling. Use GET /themes to discover available theme IDs. Legacy theme display names are still accepted for backward compatibility, but deprecated.
presentation_options.slide_rangestring”auto”Target slide count: auto, 1, 2-5, 6-10, 11-15, 16-20, 21-25, 26-50
presentation_options.existing_presentation_idstring-Append slides to existing presentation
presentation_options.total_variants_per_slideinteger1Variants per slide (1-4)
presentation_options.vibe_idstring-Vibe ID controlling the visual aesthetic of creative variants. Use GET /vibes to discover available vibe IDs. Requires image_options.num_image_variants >= 1 when set. If omitted, standard theme styling is used.

Text Options

ParameterTypeDefaultDescription
text_options.languagestring(auto)Output language

Image Options

ParameterTypeDefaultDescription
image_options.include_ai_imagesbooleantrueGenerate AI images
image_options.include_web_imagesbooleantrueSearch the web for relevant images to include in slides
image_options.stylestring”auto”Image style: auto, realistic, artistic, cartoon, three_d, custom
image_options.style_instructionsstring-Required when style is custom
image_options.num_image_variantsinteger0Number of creative image-led slide variants generated using Nano Banana Pro (0-2). Required (>=1) when presentation_options.vibe_id is set. Increases cost.

Response

{
  "generation_id": "abc123-def456-789..."
}
Use this generation_id to poll GET /generations/{generation_id} for status.

Examples

Basic Generation

curl -X POST "https://slides-api.getalai.com/api/v1/generations" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "input_text": "Our company achieved 25% revenue growth this quarter."
  }'

With Multiple Export Formats

# First, discover a theme ID with GET /themes
curl -X POST "https://slides-api.getalai.com/api/v1/generations" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "input_text": "Quarterly sales report content...",
    "export_formats": ["link", "pdf", "ppt"],
    "presentation_options": {
      "title": "Q4 Sales Report",
      "theme_id": "27874e6b-8c1c-4301-bce7-d22e6e8df7d6",
      "slide_range": "6-10"
    },
  }'
theme_id now primarily expects a theme ID from GET /themes. Legacy theme display names still work for backward compatibility, but they are deprecated.

With a Vibe

Vibes are visual aesthetic presets applied through creative image variants. Discover available vibe IDs with GET /vibes.
curl -X POST "https://slides-api.getalai.com/api/v1/generations" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "input_text": "Launch announcement for our new product line",
    "presentation_options": {
      "title": "Product Launch",
      "vibe_id": "f1c2d3e4-5678-90ab-cdef-1234567890ab",
      "slide_range": "6-10"
    },
    "image_options": {
      "num_image_variants": 1
    }
  }'
When vibe_id is set, image_options.num_image_variants must be >= 1. Vibes are applied through creative image variants.

Add to Existing Presentation

curl -X POST "https://slides-api.getalai.com/api/v1/generations" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "input_text": "Additional slides content...",
    "presentation_options": {
      "existing_presentation_id": "xyz789-...",
      "slide_range": "2-5"
    }
  }'
Request multiple export_formats in a single call to get link, PDF, and PPT all at once. Check the formats object in the status response for download URLs.

Authorizations

Authorization
string
header
required

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

Body

application/json
input_text
string
required

Content to transform into slides. Can be plain text, markdown, or structured notes. Longer input typically produces more slides.

additional_instructions
string | null

Guidance for the AI on style, focus areas, or specific requirements not captured in other options.

image_ids
string[] | null

IDs of previously uploaded images (from POST /upload-images) to incorporate. Images are matched to relevant slides automatically.

export_formats
enum<string>[]

Formats to export upon completion. 'link' is a shareable web URL. 'pdf' and 'ppt' provide downloadable files.

Available options:
link,
pdf,
ppt
presentation_options
PresentationOptions · object
text_options
TextOptions · object
image_options
ImageOptions · object

Response

Successful Response

generation_id
string
required

Unique identifier to poll for generation status via GET /generations/{generation_id}