Export Presentation
curl --request POST \
--url https://slides-api.getalai.com/api/modern/v1/presentations/{presentation_id}/exports \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"formats": [],
"filename": "<string>",
"scale": 1,
"disable_shadows": false,
"compress_pdf": false,
"base_commit_sha": "<string>",
"idempotency_key": "<string>"
}
'import requests
url = "https://slides-api.getalai.com/api/modern/v1/presentations/{presentation_id}/exports"
payload = {
"formats": [],
"filename": "<string>",
"scale": 1,
"disable_shadows": False,
"compress_pdf": False,
"base_commit_sha": "<string>",
"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({
formats: [],
filename: '<string>',
scale: 1,
disable_shadows: false,
compress_pdf: false,
base_commit_sha: '<string>',
idempotency_key: '<string>'
})
};
fetch('https://slides-api.getalai.com/api/modern/v1/presentations/{presentation_id}/exports', 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}/exports",
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([
'formats' => [
],
'filename' => '<string>',
'scale' => 1,
'disable_shadows' => false,
'compress_pdf' => false,
'base_commit_sha' => '<string>',
'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}/exports"
payload := strings.NewReader("{\n \"formats\": [],\n \"filename\": \"<string>\",\n \"scale\": 1,\n \"disable_shadows\": false,\n \"compress_pdf\": false,\n \"base_commit_sha\": \"<string>\",\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}/exports")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"formats\": [],\n \"filename\": \"<string>\",\n \"scale\": 1,\n \"disable_shadows\": false,\n \"compress_pdf\": false,\n \"base_commit_sha\": \"<string>\",\n \"idempotency_key\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://slides-api.getalai.com/api/modern/v1/presentations/{presentation_id}/exports")
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 \"formats\": [],\n \"filename\": \"<string>\",\n \"scale\": 1,\n \"disable_shadows\": false,\n \"compress_pdf\": false,\n \"base_commit_sha\": \"<string>\",\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
Export Presentation
POST
/
api
/
modern
/
v1
/
presentations
/
{presentation_id}
/
exports
Export Presentation
curl --request POST \
--url https://slides-api.getalai.com/api/modern/v1/presentations/{presentation_id}/exports \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"formats": [],
"filename": "<string>",
"scale": 1,
"disable_shadows": false,
"compress_pdf": false,
"base_commit_sha": "<string>",
"idempotency_key": "<string>"
}
'import requests
url = "https://slides-api.getalai.com/api/modern/v1/presentations/{presentation_id}/exports"
payload = {
"formats": [],
"filename": "<string>",
"scale": 1,
"disable_shadows": False,
"compress_pdf": False,
"base_commit_sha": "<string>",
"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({
formats: [],
filename: '<string>',
scale: 1,
disable_shadows: false,
compress_pdf: false,
base_commit_sha: '<string>',
idempotency_key: '<string>'
})
};
fetch('https://slides-api.getalai.com/api/modern/v1/presentations/{presentation_id}/exports', 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}/exports",
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([
'formats' => [
],
'filename' => '<string>',
'scale' => 1,
'disable_shadows' => false,
'compress_pdf' => false,
'base_commit_sha' => '<string>',
'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}/exports"
payload := strings.NewReader("{\n \"formats\": [],\n \"filename\": \"<string>\",\n \"scale\": 1,\n \"disable_shadows\": false,\n \"compress_pdf\": false,\n \"base_commit_sha\": \"<string>\",\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}/exports")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"formats\": [],\n \"filename\": \"<string>\",\n \"scale\": 1,\n \"disable_shadows\": false,\n \"compress_pdf\": false,\n \"base_commit_sha\": \"<string>\",\n \"idempotency_key\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://slides-api.getalai.com/api/modern/v1/presentations/{presentation_id}/exports")
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 \"formats\": [],\n \"filename\": \"<string>\",\n \"scale\": 1,\n \"disable_shadows\": false,\n \"compress_pdf\": false,\n \"base_commit_sha\": \"<string>\",\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>"
}
]
}Export the current Modern artifact to one or more formats:
Use
pdf, pptx, and png. The request returns an asynchronous operation. When it succeeds, result.formats contains signed download URLs valid for 24 hours. A multi-page PNG export may be returned as a ZIP archive.
{
"formats": ["pdf", "pptx", "png"],
"filename": "station-pitch",
"scale": 1.0,
"disable_shadows": false,
"compress_pdf": false,
"base_commit_sha": "CURRENT_COMMIT_SHA",
"idempotency_key": "futuri-export-123"
}
base_commit_sha when the export must correspond to a specific presentation revision.Authorizations
Your Alai API key. Get one from your account settings at app.getalai.com
Path Parameters
Body
application/json
Required array length:
1 - 3 elementsAvailable options:
pdf, pptx, png Required string length:
1 - 160Required range:
0.5 <= x <= 2Required string length:
7 - 64Required string length:
1 - 128Response
Successful Response
Available options:
generate, edit, export Available options:
queued, running, succeeded, failed Was this page helpful?