Create Presentation
curl --request POST \
--url https://slides-api.getalai.com/api/modern/v1/presentations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"title": "Untitled Presentation",
"artifact_format": "presentation",
"canvas": {
"preset": "16:9",
"width": 1250,
"height": 1670
},
"design_system_id": "<string>"
}
'import requests
url = "https://slides-api.getalai.com/api/modern/v1/presentations"
payload = {
"title": "Untitled Presentation",
"artifact_format": "presentation",
"canvas": {
"preset": "16:9",
"width": 1250,
"height": 1670
},
"design_system_id": "<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({
title: 'Untitled Presentation',
artifact_format: 'presentation',
canvas: {preset: '16:9', width: 1250, height: 1670},
design_system_id: '<string>'
})
};
fetch('https://slides-api.getalai.com/api/modern/v1/presentations', 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",
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([
'title' => 'Untitled Presentation',
'artifact_format' => 'presentation',
'canvas' => [
'preset' => '16:9',
'width' => 1250,
'height' => 1670
],
'design_system_id' => '<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"
payload := strings.NewReader("{\n \"title\": \"Untitled Presentation\",\n \"artifact_format\": \"presentation\",\n \"canvas\": {\n \"preset\": \"16:9\",\n \"width\": 1250,\n \"height\": 1670\n },\n \"design_system_id\": \"<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")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"title\": \"Untitled Presentation\",\n \"artifact_format\": \"presentation\",\n \"canvas\": {\n \"preset\": \"16:9\",\n \"width\": 1250,\n \"height\": 1670\n },\n \"design_system_id\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://slides-api.getalai.com/api/modern/v1/presentations")
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 \"title\": \"Untitled Presentation\",\n \"artifact_format\": \"presentation\",\n \"canvas\": {\n \"preset\": \"16:9\",\n \"width\": 1250,\n \"height\": 1670\n },\n \"design_system_id\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"title": "<string>",
"artifact_format": "presentation",
"canvas_width": 123,
"canvas_height": 123,
"design_system_id": "<string>",
"repo_commit_sha": "<string>",
"preview_url": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Presentations
Create Presentation
POST
/
api
/
modern
/
v1
/
presentations
Create Presentation
curl --request POST \
--url https://slides-api.getalai.com/api/modern/v1/presentations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"title": "Untitled Presentation",
"artifact_format": "presentation",
"canvas": {
"preset": "16:9",
"width": 1250,
"height": 1670
},
"design_system_id": "<string>"
}
'import requests
url = "https://slides-api.getalai.com/api/modern/v1/presentations"
payload = {
"title": "Untitled Presentation",
"artifact_format": "presentation",
"canvas": {
"preset": "16:9",
"width": 1250,
"height": 1670
},
"design_system_id": "<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({
title: 'Untitled Presentation',
artifact_format: 'presentation',
canvas: {preset: '16:9', width: 1250, height: 1670},
design_system_id: '<string>'
})
};
fetch('https://slides-api.getalai.com/api/modern/v1/presentations', 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",
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([
'title' => 'Untitled Presentation',
'artifact_format' => 'presentation',
'canvas' => [
'preset' => '16:9',
'width' => 1250,
'height' => 1670
],
'design_system_id' => '<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"
payload := strings.NewReader("{\n \"title\": \"Untitled Presentation\",\n \"artifact_format\": \"presentation\",\n \"canvas\": {\n \"preset\": \"16:9\",\n \"width\": 1250,\n \"height\": 1670\n },\n \"design_system_id\": \"<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")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"title\": \"Untitled Presentation\",\n \"artifact_format\": \"presentation\",\n \"canvas\": {\n \"preset\": \"16:9\",\n \"width\": 1250,\n \"height\": 1670\n },\n \"design_system_id\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://slides-api.getalai.com/api/modern/v1/presentations")
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 \"title\": \"Untitled Presentation\",\n \"artifact_format\": \"presentation\",\n \"canvas\": {\n \"preset\": \"16:9\",\n \"width\": 1250,\n \"height\": 1670\n },\n \"design_system_id\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"title": "<string>",
"artifact_format": "presentation",
"canvas_width": 123,
"canvas_height": 123,
"design_system_id": "<string>",
"repo_commit_sha": "<string>",
"preview_url": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Create an empty Modern presentation container. This synchronous request returns
Supported artifact formats are
201 Created; call the generate endpoint afterward to build its content.
For artifact_format: "presentation", provide the ID of a published design system. Canvas presets are 16:9, 4:3, 1:1, and custom. A custom canvas requires both width and height.
{
"title": "Futuri station pitch",
"artifact_format": "presentation",
"canvas": { "preset": "16:9" },
"design_system_id": "YOUR_PUBLISHED_DESIGN_SYSTEM_ID"
}
presentation, infographic, carousel, poster, and social_post.Authorizations
Your Alai API key. Get one from your account settings at app.getalai.com
Body
application/json
Response
Successful Response
Was this page helpful?