Skip to main content

How to get your API Key

Before you can use the Alai API, you’ll need to generate an 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 - you’ll need it for authentication
Keep your API key secure and never share it publicly. Treat it like a password.
API Introduction

Generations Endpoint

curl -X POST "https://slides-api.getalai.com/api/v1/generations" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -F "input_text=Quarterly sales increased 25% YoY. Key drivers: enterprise segment growth, new product launches, expanded market reach." \
  -F "additional_instructions=Make it infographic" \
  -F "presentation_title=Q4 2024 Sales Report" \
  -F "theme_id=flat_white" \
  -F "slide_range=6-10" \
  -F "language=English (UK)" \
  -F "choices_per_slide=1" \
  -F "tone_type=PROFESSIONAL" \
  -F "text_content_mode=preserve" \
  -F "text_amount_mode=essential" \
  -F "include_ai_images=true" \
  -F "ai_image_style_type=three_d"

What are the input parameters?

  1. input_text - The main content that drives your presentation generation. This text forms the foundation of all slides created.
  2. additional_instructions - Custom generation instructions for ai that fine tune how content is delivered on the presentation
  3. presentation_title - Sets the title displayed in your presentation.
  4. theme_id - Defines which theme from alai will be used for presentation Supported themes -
    `flat_white`, `desert_bloom`, `lapis_dawn`, `emerald_forest`, `cosmic_thread`, `donut`
    
  5. slide_range - Controls the target number of slides generated from your content.
    `auto`,`1`,`2-5`, `6-10`, `11-15`, `16-20`, `21-25`
    
  6. language - Specifies the language for generated content and AI-generated elements.
[
    "English (US)",
    "English (UK)",
    "Spanish (Latin America)",
    "Spanish (Mexico)",
    "Spanish (Spain)",
    "French",
    "German",
    "Italian",
    "Portuguese (Brazil)",
    "Portuguese (Portugal)",
    "Dutch",
    "Polish",
    "Russian",
    "Japanese",
    "Korean",
    "Chinese (Simplified)",
    "Hindi",
    "Swedish",
    "Norwegian",
    "Danish",
    "Finnish",
    "Greek",
    "Turkish",
    "Czech",
    "Hungarian",
    "Romanian",
    "Bulgarian",
    "Ukrainian",
    "Vietnamese",
    "Thai",
    "Indonesian"
]
  1. choices_per_slide - The number of choices you’d like to have per slide, We usually generate 4 variants per slide on the product but we want to give the freedom to decide the number of variants youd like to have on api. (The range is from 1 to 4)
  2. tone_type - Defines the writing voice, style, and perspective applied to generated content.
    `DEFAULT`, `PROFESSIONAL`, `CASUAL`, `TECHNICAL`, `EDUCATIONAL`, `INSPIRATIONAL`, `NARRATIVE`, `PERSUASIVE`, `AUTHORITATIVE`, `EMPATHETIC`, `CUSTOM`
    
  3. tone_instructions - Custom tone directives when no preset tone matches your needs. (Set only when the tone_type is CUSTOM)
  4. text_content_mode - Controls how input text is processed and adapted for presentation format.
    PRESERVE`, `ENHANCE`, `CONDENSE`, `CUSTOM`
    
  5. text_content_instructions - Custom directives for text processing when no preset mode fits. (Set only when the text_content_mode is CUSTOM)
  6. text_amount_mode - Controls the density of text appearing on each slide.
    `MINIMAL`, `ESSENTIAL`, `BALANCED`, `DETAILED`, `CUSTOM`
    
  7. text_amount_instructions - Custom text density directives for specialized requirements. (Set only when the text_amount_mode is CUSTOM)
  8. include_ai_images - Whether to generate AI-powered illustrations alongside your content. (true/false)
  9. ai_image_style_type - Controls the visual style of AI-generated images.
    `AUTO`, `REALISTIC`, `ARTISTIC`, `CARTOON`, `THREE_D`, `CUSTOM`
    
  10. ai_image_style_instructions - Custom image generation directives for specialized visual requirements. (Set only when the ai_image_art_style_type is CUSTOM)

Response

On successful generation, the API returns a JSON object:
{
  "presentation_url": "https://app.getalai.com/presentation/<presentation_uuid>",
  "presentation_id": "<presentation_uuid>"
}

OpenAPI Schema

openapi: 3.0.3
info:
  title: Alai API
  description: Transform text content into fully designed presentations
  version: 1.0.0
servers:
  - url: https://slides-api.getalai.com/api/v1
paths:
  /generations:
    post:
      summary: Generate a presentation
      description: Creates a new presentation from the provided text content and customization options
      security:
        - bearerAuth: []
      requestBody:
        required: true
        content:
          multipart/form-data:
            schema:
              type: object
              required:
                - input_text
              properties:
                input_text:
                  type: string
                  description: The main content that drives your presentation generation
                additional_instructions:
                  type: string
                  description: Custom generation instructions for AI
                presentation_title:
                  type: string
                  description: Title displayed in your presentation
                theme_id:
                  type: string
                  enum:
                    [
                      FLAT_WHITE,
                      DESERT_BLOOM,
                      LAPIS_DAWN,
                      EMERALD_FOREST,
                      COSMIC_THREAD,
                      DONUT,
                    ]
                  description: Theme used for the presentation
                slide_range:
                  type: string
                  enum: ["auto", "1", "2-5", "6-10", "11-15", "16-20", "21-25"]
                  description: Target number of slides
                language:
                  type: string
                  enum:
                    - English (US)
                    - English (UK)
                    - Spanish (Latin America)
                    - Spanish (Mexico)
                    - Spanish (Spain)
                    - French
                    - German
                    - Italian
                    - Portuguese (Brazil)
                    - Portuguese (Portugal)
                    - Dutch
                    - Polish
                    - Russian
                    - Japanese
                    - Korean
                    - Chinese (Simplified)
                    - Hindi
                    - Swedish
                    - Norwegian
                    - Danish
                    - Finnish
                    - Greek
                    - Turkish
                    - Czech
                    - Hungarian
                    - Romanian
                    - Bulgarian
                    - Ukrainian
                    - Vietnamese
                    - Thai
                    - Indonesian
                  description: Language for generated content
                choices_per_slide:
                  type: integer
                  minimum: 1
                  maximum: 4
                  description: Number of slide variants to generate (1-4)
                tone_type:
                  type: string
                  enum:
                    [
                      DEFAULT,
                      PROFESSIONAL,
                      CASUAL,
                      TECHNICAL,
                      EDUCATIONAL,
                      INSPIRATIONAL,
                      NARRATIVE,
                      PERSUASIVE,
                      AUTHORITATIVE,
                      EMPATHETIC,
                      CUSTOM,
                    ]
                  description: Writing voice and style
                tone_instructions:
                  type: string
                  description: Custom tone directives (used when tone_type is CUSTOM)
                text_content_mode:
                  type: string
                  enum: [PRESERVE, ENHANCE, CONDENSE, CUSTOM]
                  description: How input text is processed
                text_content_instructions:
                  type: string
                  description: Custom text processing directives (used when text_content_mode is CUSTOM)
                text_amount_mode:
                  type: string
                  enum: [MINIMAL, ESSENTIAL, BALANCED, DETAILED, CUSTOM]
                  description: Text density on each slide
                text_amount_instructions:
                  type: string
                  description: Custom text density directives (used when text_amount_mode is CUSTOM)
                include_ai_images:
                  type: boolean
                  description: Whether to generate AI-powered illustrations
                ai_image_style_type:
                  type: string
                  enum: [AUTO, REALISTIC, ARTISTIC, CARTOON, THREE_D, CUSTOM]
                  description: Visual style of AI-generated images
                ai_image_style_instructions:
                  type: string
                  description: Custom image generation directives (used when ai_image_style_type is CUSTOM)
      responses:
        "200":
          description: Presentation generated successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  presentation_url:
                    type: string
                    format: uri
                    description: Direct URL to view the generated presentation
                    example: "https://app.getalai.com/presentation/9c5301d1-46bd-490b-888d-84a155685e82"
                  presentation_id:
                    type: string
                    format: uuid
                    description: Unique identifier for the presentation
                    example: "9c5301d1-46bd-490b-888d-84a155685e82"
                required:
                  - presentation_url
                  - presentation_id
        "401":
          description: Unauthorized - Invalid or missing API key
        "400":
          description: Bad Request - Invalid parameters
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: API key passed as Bearer token