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_urls": [
    "<string>"
  ],
  "export_formats": [
    "link"
  ],
  "presentation_options": {
    "title": "API Generated Presentation",
    "theme_id": "AMETHYST_LIGHT",
    "slide_range": "auto",
    "existing_presentation_id": "<string>",
    "total_variants_per_slide": 1
  },
  "text_options": {
    "language": "English (US)",
    "tone": "DEFAULT",
    "tone_instructions": "<string>",
    "content_mode": "preserve",
    "content_instructions": "<string>",
    "amount_mode": "essential",
    "amount_instructions": "<string>"
  },
  "image_options": {
    "include_ai_images": true,
    "style": "auto",
    "style_instructions": "<string>",
    "num_image_variants": 0
  }
}
'
{
  "generation_id": "<string>"
}
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.

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”AMETHYST_LIGHT”Visual theme (see available themes)
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)

Text Options

ParameterTypeDefaultDescription
text_options.languagestring(auto)Output language
text_options.tonestring”DEFAULT”Writing style: DEFAULT, PROFESSIONAL, CASUAL, TECHNICAL, EDUCATIONAL, INSPIRATIONAL, NARRATIVE, PERSUASIVE, AUTHORITATIVE, EMPATHETIC, CUSTOM
text_options.tone_instructionsstring-Required when tone is CUSTOM
text_options.content_modestring”PRESERVE”How to handle input: PRESERVE, CONDENSE, ENHANCE, CUSTOM
text_options.amount_modestring”ESSENTIAL”Text density: MINIMAL, ESSENTIAL, BALANCED, DETAILED, CUSTOM

Image Options

ParameterTypeDefaultDescription
image_options.include_ai_imagesbooleantrueGenerate AI images
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_variantsinteger0Image slide variants (0-2)

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

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": "NEBULA_DARK",
      "slide_range": "6-10"
    },
    "text_options": {
      "tone": "PROFESSIONAL"
    }
  }'

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_urls
string[] | null

URLs of 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}