Generate Presentation
curl --request POST \
--url https://slides-api.getalai.com/api/modern/v1/presentations/{presentation_id}/generate \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"content": "<string>",
"instructions": "<string>",
"slide_count": 25,
"asset_ids": [
"<string>"
],
"model": {
"fallback_policy": "deny"
},
"idempotency_key": "<string>"
}
'import requests
url = "https://slides-api.getalai.com/api/modern/v1/presentations/{presentation_id}/generate"
payload = {
"content": "<string>",
"instructions": "<string>",
"slide_count": 25,
"asset_ids": ["<string>"],
"model": { "fallback_policy": "deny" },
"idempotency_key": "<string>"
}
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({
content: '<string>',
instructions: '<string>',
slide_count: 25,
asset_ids: ['<string>'],
model: {fallback_policy: 'deny'},
idempotency_key: '<string>'
})
};
fetch('https://slides-api.getalai.com/api/modern/v1/presentations/{presentation_id}/generate', 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/modern/v1/presentations/{presentation_id}/generate",
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([
'content' => '<string>',
'instructions' => '<string>',
'slide_count' => 25,
'asset_ids' => [
'<string>'
],
'model' => [
'fallback_policy' => 'deny'
],
'idempotency_key' => '<string>'
]),
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/modern/v1/presentations/{presentation_id}/generate"
payload := strings.NewReader("{\n \"content\": \"<string>\",\n \"instructions\": \"<string>\",\n \"slide_count\": 25,\n \"asset_ids\": [\n \"<string>\"\n ],\n \"model\": {\n \"fallback_policy\": \"deny\"\n },\n \"idempotency_key\": \"<string>\"\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/modern/v1/presentations/{presentation_id}/generate")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"content\": \"<string>\",\n \"instructions\": \"<string>\",\n \"slide_count\": 25,\n \"asset_ids\": [\n \"<string>\"\n ],\n \"model\": {\n \"fallback_policy\": \"deny\"\n },\n \"idempotency_key\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://slides-api.getalai.com/api/modern/v1/presentations/{presentation_id}/generate")
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 \"content\": \"<string>\",\n \"instructions\": \"<string>\",\n \"slide_count\": 25,\n \"asset_ids\": [\n \"<string>\"\n ],\n \"model\": {\n \"fallback_policy\": \"deny\"\n },\n \"idempotency_key\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"operation_type": "generate",
"presentation_id": "<string>",
"status": "queued",
"progress": {},
"result": {},
"error": "<string>",
"created_at": "<string>",
"started_at": "<string>",
"completed_at": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}AI Operations
Generate Presentation
POST
/
api
/
modern
/
v1
/
presentations
/
{presentation_id}
/
generate
Generate Presentation
curl --request POST \
--url https://slides-api.getalai.com/api/modern/v1/presentations/{presentation_id}/generate \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"content": "<string>",
"instructions": "<string>",
"slide_count": 25,
"asset_ids": [
"<string>"
],
"model": {
"fallback_policy": "deny"
},
"idempotency_key": "<string>"
}
'import requests
url = "https://slides-api.getalai.com/api/modern/v1/presentations/{presentation_id}/generate"
payload = {
"content": "<string>",
"instructions": "<string>",
"slide_count": 25,
"asset_ids": ["<string>"],
"model": { "fallback_policy": "deny" },
"idempotency_key": "<string>"
}
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({
content: '<string>',
instructions: '<string>',
slide_count: 25,
asset_ids: ['<string>'],
model: {fallback_policy: 'deny'},
idempotency_key: '<string>'
})
};
fetch('https://slides-api.getalai.com/api/modern/v1/presentations/{presentation_id}/generate', 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/modern/v1/presentations/{presentation_id}/generate",
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([
'content' => '<string>',
'instructions' => '<string>',
'slide_count' => 25,
'asset_ids' => [
'<string>'
],
'model' => [
'fallback_policy' => 'deny'
],
'idempotency_key' => '<string>'
]),
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/modern/v1/presentations/{presentation_id}/generate"
payload := strings.NewReader("{\n \"content\": \"<string>\",\n \"instructions\": \"<string>\",\n \"slide_count\": 25,\n \"asset_ids\": [\n \"<string>\"\n ],\n \"model\": {\n \"fallback_policy\": \"deny\"\n },\n \"idempotency_key\": \"<string>\"\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/modern/v1/presentations/{presentation_id}/generate")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"content\": \"<string>\",\n \"instructions\": \"<string>\",\n \"slide_count\": 25,\n \"asset_ids\": [\n \"<string>\"\n ],\n \"model\": {\n \"fallback_policy\": \"deny\"\n },\n \"idempotency_key\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://slides-api.getalai.com/api/modern/v1/presentations/{presentation_id}/generate")
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 \"content\": \"<string>\",\n \"instructions\": \"<string>\",\n \"slide_count\": 25,\n \"asset_ids\": [\n \"<string>\"\n ],\n \"model\": {\n \"fallback_policy\": \"deny\"\n },\n \"idempotency_key\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"operation_type": "generate",
"presentation_id": "<string>",
"status": "queued",
"progress": {},
"result": {},
"error": "<string>",
"created_at": "<string>",
"started_at": "<string>",
"completed_at": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Generate the initial Modern artifact using Alai’s agentic presentation workflow. The request returns
Poll
202 Accepted with an operation to poll.
slide_count is exact when supplied. asset_ids must refer to assets uploaded to this presentation. Use a model ID returned by GET /models, or omit model to use the default.
{
"content": "Pitch content and source material...",
"instructions": "Create a polished client pitch for a radio station.",
"slide_count": 8,
"asset_ids": ["LOGO_ASSET_ID"],
"model": {
"id": "anthropic/claude-opus-4.8",
"fallback_policy": "deny"
},
"idempotency_key": "futuri-job-123"
}
GET /operations/{operation_id} until the operation reaches succeeded or failed.Authorizations
Your Alai API key. Get one from your account settings at app.getalai.com
Path Parameters
Body
application/json
Required string length:
1 - 100000Maximum string length:
10000Required range:
1 <= x <= 50Maximum array length:
20Show child attributes
Show child attributes
Required string length:
1 - 128Response
Successful Response
Available options:
generate, edit, export Available options:
queued, running, succeeded, failed Was this page helpful?