Export a presentation
curl --request POST \
--url https://slides-api.getalai.com/api/v1/presentations/{presentation_id}/exports \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"formats": [
"link"
]
}
'import requests
url = "https://slides-api.getalai.com/api/v1/presentations/{presentation_id}/exports"
payload = { "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({formats: ['link']})
};
fetch('https://slides-api.getalai.com/api/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/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' => [
'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}/exports"
payload := strings.NewReader("{\n \"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}/exports")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"formats\": [\n \"link\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://slides-api.getalai.com/api/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 \"link\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"generation_id": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Presentations
Export Presentation
Export an existing presentation to one or more formats (PDF, PPTX). This is an async operation.
Poll GET /generations/{generation_id} until status is completed, then access download URLs in the formats field.
POST
/
api
/
v1
/
presentations
/
{presentation_id}
/
exports
Export a presentation
curl --request POST \
--url https://slides-api.getalai.com/api/v1/presentations/{presentation_id}/exports \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"formats": [
"link"
]
}
'import requests
url = "https://slides-api.getalai.com/api/v1/presentations/{presentation_id}/exports"
payload = { "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({formats: ['link']})
};
fetch('https://slides-api.getalai.com/api/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/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' => [
'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}/exports"
payload := strings.NewReader("{\n \"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}/exports")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"formats\": [\n \"link\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://slides-api.getalai.com/api/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 \"link\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"generation_id": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Export an existing presentation to PDF, PPT, or get a shareable link. This is an async operation.
Poll
Path Parameters
| Parameter | Type | Description |
|---|---|---|
presentation_id | string | ID of the presentation to export |
Request Body
| Parameter | Type | Default | Description |
|---|---|---|---|
formats | array | ["link"] | Formats to export: link, pdf, ppt |
Response
{
"generation_id": "abc123-def456-..."
}
GET /generations/{generation_id} until status is completed.
Example
Export to Multiple Formats
curl -X POST "https://slides-api.getalai.com/api/v1/presentations/xyz789-.../exports" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"formats": ["link", "pdf", "ppt"]
}'
Status Response
{
"generation_id": "abc123-...",
"generation_type": "presentation_export",
"status": "completed",
"presentation_id": "xyz789-...",
"formats": {
"link": {
"status": "completed",
"url": "https://app.getalai.com/view/..."
},
"pdf": {
"status": "completed",
"url": "https://storage.../presentation.pdf"
},
"ppt": {
"status": "completed",
"url": "https://storage.../presentation.pptx"
}
}
}
Download URLs are signed and valid for 24 hours. Download promptly or
call this endpoint again to get fresh URLs.
Authorizations
Your Alai API key. Get one from your account settings at app.getalai.com
Path Parameters
Body
application/json
Formats to export: 'link' (shareable URL), 'pdf', 'ppt'
Available options:
link, pdf, ppt Response
Successful Response
Unique identifier to poll for generation status via GET /generations/{generation_id}
Was this page helpful?
⌘I