Add a slide to an existing presentation
curl --request POST \
--url https://slides-api.getalai.com/api/v1/presentations/{presentation_id}/slides \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"slide_context": "<string>",
"options": {
"additional_instructions": "<string>",
"slide_type": "classic",
"slide_order": 123,
"total_variants_per_slide": 1
},
"export_formats": [
"link"
]
}
'import requests
url = "https://slides-api.getalai.com/api/v1/presentations/{presentation_id}/slides"
payload = {
"slide_context": "<string>",
"options": {
"additional_instructions": "<string>",
"slide_type": "classic",
"slide_order": 123,
"total_variants_per_slide": 1
},
"export_formats": ["link"]
}
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({
slide_context: '<string>',
options: {
additional_instructions: '<string>',
slide_type: 'classic',
slide_order: 123,
total_variants_per_slide: 1
},
export_formats: ['link']
})
};
fetch('https://slides-api.getalai.com/api/v1/presentations/{presentation_id}/slides', 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/presentations/{presentation_id}/slides",
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([
'slide_context' => '<string>',
'options' => [
'additional_instructions' => '<string>',
'slide_type' => 'classic',
'slide_order' => 123,
'total_variants_per_slide' => 1
],
'export_formats' => [
'link'
]
]),
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/presentations/{presentation_id}/slides"
payload := strings.NewReader("{\n \"slide_context\": \"<string>\",\n \"options\": {\n \"additional_instructions\": \"<string>\",\n \"slide_type\": \"classic\",\n \"slide_order\": 123,\n \"total_variants_per_slide\": 1\n },\n \"export_formats\": [\n \"link\"\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/presentations/{presentation_id}/slides")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"slide_context\": \"<string>\",\n \"options\": {\n \"additional_instructions\": \"<string>\",\n \"slide_type\": \"classic\",\n \"slide_order\": 123,\n \"total_variants_per_slide\": 1\n },\n \"export_formats\": [\n \"link\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://slides-api.getalai.com/api/v1/presentations/{presentation_id}/slides")
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 \"slide_context\": \"<string>\",\n \"options\": {\n \"additional_instructions\": \"<string>\",\n \"slide_type\": \"classic\",\n \"slide_order\": 123,\n \"total_variants_per_slide\": 1\n },\n \"export_formats\": [\n \"link\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"generation_id": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Slides
Create Slide
Add a new slide to an existing presentation. This is an async operation—poll the returned generation_id for completion.
The slide content will be transformed into a professionally designed slide with AI-generated layout and optional images.
POST
/
api
/
v1
/
presentations
/
{presentation_id}
/
slides
Add a slide to an existing presentation
curl --request POST \
--url https://slides-api.getalai.com/api/v1/presentations/{presentation_id}/slides \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"slide_context": "<string>",
"options": {
"additional_instructions": "<string>",
"slide_type": "classic",
"slide_order": 123,
"total_variants_per_slide": 1
},
"export_formats": [
"link"
]
}
'import requests
url = "https://slides-api.getalai.com/api/v1/presentations/{presentation_id}/slides"
payload = {
"slide_context": "<string>",
"options": {
"additional_instructions": "<string>",
"slide_type": "classic",
"slide_order": 123,
"total_variants_per_slide": 1
},
"export_formats": ["link"]
}
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({
slide_context: '<string>',
options: {
additional_instructions: '<string>',
slide_type: 'classic',
slide_order: 123,
total_variants_per_slide: 1
},
export_formats: ['link']
})
};
fetch('https://slides-api.getalai.com/api/v1/presentations/{presentation_id}/slides', 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/presentations/{presentation_id}/slides",
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([
'slide_context' => '<string>',
'options' => [
'additional_instructions' => '<string>',
'slide_type' => 'classic',
'slide_order' => 123,
'total_variants_per_slide' => 1
],
'export_formats' => [
'link'
]
]),
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/presentations/{presentation_id}/slides"
payload := strings.NewReader("{\n \"slide_context\": \"<string>\",\n \"options\": {\n \"additional_instructions\": \"<string>\",\n \"slide_type\": \"classic\",\n \"slide_order\": 123,\n \"total_variants_per_slide\": 1\n },\n \"export_formats\": [\n \"link\"\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/presentations/{presentation_id}/slides")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"slide_context\": \"<string>\",\n \"options\": {\n \"additional_instructions\": \"<string>\",\n \"slide_type\": \"classic\",\n \"slide_order\": 123,\n \"total_variants_per_slide\": 1\n },\n \"export_formats\": [\n \"link\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://slides-api.getalai.com/api/v1/presentations/{presentation_id}/slides")
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 \"slide_context\": \"<string>\",\n \"options\": {\n \"additional_instructions\": \"<string>\",\n \"slide_type\": \"classic\",\n \"slide_order\": 123,\n \"total_variants_per_slide\": 1\n },\n \"export_formats\": [\n \"link\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"generation_id": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Add a slide to an existing presentation. This is an async operation - poll the returned
Poll
generation_id for completion.
Path Parameters
| Parameter | Type | Description |
|---|---|---|
presentation_id | string | ID of the presentation to add the slide to |
Request Body
| Parameter | Type | Default | Description |
|---|---|---|---|
slide_context | string | (required) | Content for this slide |
options.additional_instructions | string | - | Extra instructions for slide generation |
options.slide_type | string | "classic" | Slide style: classic for structured, editable text-led slides, or creative for image-led slides generated with Nano Banana Pro. |
options.slide_order | integer | (end) | Position in presentation (0-indexed) |
options.total_variants_per_slide | integer | 1 | Variants to generate (1-4) |
export_formats | array | ["link"] | Formats to export: link, pdf, ppt |
Response
{
"generation_id": "abc123-def456-..."
}
GET /generations/{generation_id} until status is completed. The response will include slide_id.
Example
curl -X POST "https://slides-api.getalai.com/api/v1/presentations/xyz789-.../slides" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"slide_context": "Key achievements: 25% revenue growth, 50 new clients",
"options": {
"additional_instructions": "Make it visual with icons"
}
}'
Creative (Image-Led) Slide
curl -X POST "https://slides-api.getalai.com/api/v1/presentations/xyz789-.../slides" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"slide_context": "Hero shot of our new product against a sunset backdrop",
"options": {
"slide_type": "creative"
}
}'
Status Response
When polling, the status response includesslide_id:
{
"generation_id": "abc123-...",
"generation_type": "slide_creation",
"status": "completed",
"presentation_id": "xyz789-...",
"slide_id": "slide123-...",
"formats": {
"link": {
"status": "completed",
"url": "https://app.getalai.com/view/..."
}
}
}
Authorizations
Your Alai API key. Get one from your account settings at app.getalai.com
Path Parameters
Body
application/json
Response
Successful Response
Unique identifier to poll for generation status via GET /generations/{generation_id}
Was this page helpful?
⌘I