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": {},
"image_options": {
"include_ai_images": true,
"include_web_images": true,
"style": "auto",
"style_instructions": "<string>",
"num_image_variants": 0
}
}
'import requests
url = "https://slides-api.getalai.com/api/v1/generations"
payload = {
"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": {},
"image_options": {
"include_ai_images": True,
"include_web_images": True,
"style": "auto",
"style_instructions": "<string>",
"num_image_variants": 0
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
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: {},
image_options: {
include_ai_images: true,
include_web_images: true,
style: 'auto',
style_instructions: '<string>',
num_image_variants: 0
}
})
};
fetch('https://slides-api.getalai.com/api/v1/generations', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://slides-api.getalai.com/api/v1/generations",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'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' => [
],
'image_options' => [
'include_ai_images' => true,
'include_web_images' => true,
'style' => 'auto',
'style_instructions' => '<string>',
'num_image_variants' => 0
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://slides-api.getalai.com/api/v1/generations"
payload := strings.NewReader("{\n \"input_text\": \"<string>\",\n \"additional_instructions\": \"<string>\",\n \"image_ids\": [\n \"<string>\"\n ],\n \"export_formats\": [\n \"link\"\n ],\n \"presentation_options\": {\n \"title\": \"API Generated Presentation\",\n \"theme_id\": \"27874e6b-8c1c-4301-bce7-d22e6e8df7d6\",\n \"slide_range\": \"auto\",\n \"existing_presentation_id\": \"<string>\",\n \"total_variants_per_slide\": 1,\n \"vibe_id\": \"<string>\"\n },\n \"text_options\": {},\n \"image_options\": {\n \"include_ai_images\": true,\n \"include_web_images\": true,\n \"style\": \"auto\",\n \"style_instructions\": \"<string>\",\n \"num_image_variants\": 0\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://slides-api.getalai.com/api/v1/generations")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"input_text\": \"<string>\",\n \"additional_instructions\": \"<string>\",\n \"image_ids\": [\n \"<string>\"\n ],\n \"export_formats\": [\n \"link\"\n ],\n \"presentation_options\": {\n \"title\": \"API Generated Presentation\",\n \"theme_id\": \"27874e6b-8c1c-4301-bce7-d22e6e8df7d6\",\n \"slide_range\": \"auto\",\n \"existing_presentation_id\": \"<string>\",\n \"total_variants_per_slide\": 1,\n \"vibe_id\": \"<string>\"\n },\n \"text_options\": {},\n \"image_options\": {\n \"include_ai_images\": true,\n \"include_web_images\": true,\n \"style\": \"auto\",\n \"style_instructions\": \"<string>\",\n \"num_image_variants\": 0\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://slides-api.getalai.com/api/v1/generations")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"input_text\": \"<string>\",\n \"additional_instructions\": \"<string>\",\n \"image_ids\": [\n \"<string>\"\n ],\n \"export_formats\": [\n \"link\"\n ],\n \"presentation_options\": {\n \"title\": \"API Generated Presentation\",\n \"theme_id\": \"27874e6b-8c1c-4301-bce7-d22e6e8df7d6\",\n \"slide_range\": \"auto\",\n \"existing_presentation_id\": \"<string>\",\n \"total_variants_per_slide\": 1,\n \"vibe_id\": \"<string>\"\n },\n \"text_options\": {},\n \"image_options\": {\n \"include_ai_images\": true,\n \"include_web_images\": true,\n \"style\": \"auto\",\n \"style_instructions\": \"<string>\",\n \"num_image_variants\": 0\n }\n}"
response = http.request(request)
puts response.read_body{
"generation_id": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Generate Presentation
Create a new presentation from text content. This is an async operation.
Workflow:
- Submit your content and options
- Receive a
generation_idimmediately - Poll
GET /generations/{generation_id}until status iscompletedorfailed - Access your presentation via the URLs in the response
Rate limit: Max 5 concurrent generations per user.
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": {},
"image_options": {
"include_ai_images": true,
"include_web_images": true,
"style": "auto",
"style_instructions": "<string>",
"num_image_variants": 0
}
}
'import requests
url = "https://slides-api.getalai.com/api/v1/generations"
payload = {
"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": {},
"image_options": {
"include_ai_images": True,
"include_web_images": True,
"style": "auto",
"style_instructions": "<string>",
"num_image_variants": 0
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
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: {},
image_options: {
include_ai_images: true,
include_web_images: true,
style: 'auto',
style_instructions: '<string>',
num_image_variants: 0
}
})
};
fetch('https://slides-api.getalai.com/api/v1/generations', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://slides-api.getalai.com/api/v1/generations",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'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' => [
],
'image_options' => [
'include_ai_images' => true,
'include_web_images' => true,
'style' => 'auto',
'style_instructions' => '<string>',
'num_image_variants' => 0
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://slides-api.getalai.com/api/v1/generations"
payload := strings.NewReader("{\n \"input_text\": \"<string>\",\n \"additional_instructions\": \"<string>\",\n \"image_ids\": [\n \"<string>\"\n ],\n \"export_formats\": [\n \"link\"\n ],\n \"presentation_options\": {\n \"title\": \"API Generated Presentation\",\n \"theme_id\": \"27874e6b-8c1c-4301-bce7-d22e6e8df7d6\",\n \"slide_range\": \"auto\",\n \"existing_presentation_id\": \"<string>\",\n \"total_variants_per_slide\": 1,\n \"vibe_id\": \"<string>\"\n },\n \"text_options\": {},\n \"image_options\": {\n \"include_ai_images\": true,\n \"include_web_images\": true,\n \"style\": \"auto\",\n \"style_instructions\": \"<string>\",\n \"num_image_variants\": 0\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://slides-api.getalai.com/api/v1/generations")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"input_text\": \"<string>\",\n \"additional_instructions\": \"<string>\",\n \"image_ids\": [\n \"<string>\"\n ],\n \"export_formats\": [\n \"link\"\n ],\n \"presentation_options\": {\n \"title\": \"API Generated Presentation\",\n \"theme_id\": \"27874e6b-8c1c-4301-bce7-d22e6e8df7d6\",\n \"slide_range\": \"auto\",\n \"existing_presentation_id\": \"<string>\",\n \"total_variants_per_slide\": 1,\n \"vibe_id\": \"<string>\"\n },\n \"text_options\": {},\n \"image_options\": {\n \"include_ai_images\": true,\n \"include_web_images\": true,\n \"style\": \"auto\",\n \"style_instructions\": \"<string>\",\n \"num_image_variants\": 0\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://slides-api.getalai.com/api/v1/generations")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"input_text\": \"<string>\",\n \"additional_instructions\": \"<string>\",\n \"image_ids\": [\n \"<string>\"\n ],\n \"export_formats\": [\n \"link\"\n ],\n \"presentation_options\": {\n \"title\": \"API Generated Presentation\",\n \"theme_id\": \"27874e6b-8c1c-4301-bce7-d22e6e8df7d6\",\n \"slide_range\": \"auto\",\n \"existing_presentation_id\": \"<string>\",\n \"total_variants_per_slide\": 1,\n \"vibe_id\": \"<string>\"\n },\n \"text_options\": {},\n \"image_options\": {\n \"include_ai_images\": true,\n \"include_web_images\": true,\n \"style\": \"auto\",\n \"style_instructions\": \"<string>\",\n \"num_image_variants\": 0\n }\n}"
response = http.request(request)
puts response.read_body{
"generation_id": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}generation_id immediately and poll for results.
Workflow
- Submit your content with
POST /generations - Receive a
generation_idimmediately - Poll
GET /generations/{generation_id}untilstatusiscompletedorfailed - Access your presentation via URLs in the
formatsfield
Request Body
Required
| Parameter | Type | Description |
|---|---|---|
input_text | string | Content to transform into slides. Can be plain text, markdown, or structured notes. |
Optional Top-Level Fields
| Parameter | Type | Description |
|---|---|---|
additional_instructions | string | Extra guidance for the AI on style, focus areas, or specific requirements not captured by other options. |
image_ids | array of strings | IDs (UUIDs) of previously uploaded images from POST /upload-images. Images are matched to relevant slides automatically. |
Export Formats
| Parameter | Type | Default | Description |
|---|---|---|---|
export_formats | array | ["link"] | Formats to export: link, pdf, ppt. Can request multiple. |
Presentation Options
| Parameter | Type | Default | Description |
|---|---|---|---|
presentation_options.title | string | ”API Generated Presentation” | Title shown on title slide and in exports |
presentation_options.theme_id | string | "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_range | string | ”auto” | Target slide count: auto, 1, 2-5, 6-10, 11-15, 16-20, 21-25, 26-50 |
presentation_options.existing_presentation_id | string | - | Append slides to existing presentation |
presentation_options.total_variants_per_slide | integer | 1 | Variants per slide (1-4) |
presentation_options.vibe_id | string | - | 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
| Parameter | Type | Default | Description |
|---|---|---|---|
text_options.language | string | (auto) | Output language |
Image Options
| Parameter | Type | Default | Description |
|---|---|---|---|
image_options.include_ai_images | boolean | true | Generate AI images |
image_options.include_web_images | boolean | true | Search the web for relevant images to include in slides |
image_options.style | string | ”auto” | Image style: auto, realistic, artistic, cartoon, three_d, custom |
image_options.style_instructions | string | - | Required when style is custom |
image_options.num_image_variants | integer | 0 | Number 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..."
}
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 withGET /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
}
}'
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"
}
}'
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
Your Alai API key. Get one from your account settings at app.getalai.com
Body
Content to transform into slides. Can be plain text, markdown, or structured notes. Longer input typically produces more slides.
Guidance for the AI on style, focus areas, or specific requirements not captured in other options.
IDs of previously uploaded images (from POST /upload-images) to incorporate. Images are matched to relevant slides automatically.
Formats to export upon completion. 'link' is a shareable web URL. 'pdf' and 'ppt' provide downloadable files.
link, pdf, ppt Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Response
Successful Response
Unique identifier to poll for generation status via GET /generations/{generation_id}
Was this page helpful?