Check generation status
curl --request GET \
--url https://slides-api.getalai.com/api/v1/generations/{generation_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://slides-api.getalai.com/api/v1/generations/{generation_id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://slides-api.getalai.com/api/v1/generations/{generation_id}', 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/generations/{generation_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://slides-api.getalai.com/api/v1/generations/{generation_id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://slides-api.getalai.com/api/v1/generations/{generation_id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://slides-api.getalai.com/api/v1/generations/{generation_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"generation_id": "<string>",
"status": "pending",
"created_at": "<string>",
"error": "<string>",
"completed_at": "<string>",
"generation_type": "presentation_generation",
"presentation_id": "<string>",
"formats": {}
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Presentations
Check Generation Status
Poll this endpoint to check the status of any async operation (presentation generation, slide creation, export, or transcript generation).
Status values:
pending- Queued, not yet startedin_progress- Currently processingcompleted- Finished successfully; results available in responsefailed- Error occurred; checkerrorfield for details
Recommended polling: Every 2-5 seconds. Most generations complete within 30-120 seconds.
GET
/
api
/
v1
/
generations
/
{generation_id}
Check generation status
curl --request GET \
--url https://slides-api.getalai.com/api/v1/generations/{generation_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://slides-api.getalai.com/api/v1/generations/{generation_id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://slides-api.getalai.com/api/v1/generations/{generation_id}', 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/generations/{generation_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://slides-api.getalai.com/api/v1/generations/{generation_id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://slides-api.getalai.com/api/v1/generations/{generation_id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://slides-api.getalai.com/api/v1/generations/{generation_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"generation_id": "<string>",
"status": "pending",
"created_at": "<string>",
"error": "<string>",
"completed_at": "<string>",
"generation_type": "presentation_generation",
"presentation_id": "<string>",
"formats": {}
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Poll this endpoint to check the status of any async operation (presentation generation, slide creation, export, or transcript generation).
Recommended polling: Every 5 seconds. Most operations complete within 1-3 minutes depending on slide count.
Each format has:
Status Values
| Status | Description |
|---|---|
pending | Queued, not yet started |
in_progress | Currently processing |
completed | Finished successfully; results available |
failed | Error occurred; check error field |
Response Fields
| Field | Type | Description |
|---|---|---|
generation_id | string | The generation ID you’re polling |
status | string | Current status |
error | string | Error message (when failed) |
created_at | string | ISO 8601 timestamp |
completed_at | string | When generation finished |
presentation_id | string | ID of the presentation |
formats | object | Export results (when completed) |
Format Results
When status iscompleted, the formats object contains results for each requested format:
{
"generation_id": "abc123-...",
"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"
}
}
}
status:completed,failed, orskippedurl: Signed download URL (valid for 24 hours)error: Error message if failed
Example
curl "https://slides-api.getalai.com/api/v1/generations/abc123-def456-..." \
-H "Authorization: Bearer YOUR_API_KEY"
Polling Example (Python)
import time
import requests
def wait_for_generation(generation_id, api_key, max_wait=300):
url = f"https://slides-api.getalai.com/api/v1/generations/{generation_id}"
headers = {"Authorization": f"Bearer {api_key}"}
start = time.time()
while time.time() - start < max_wait:
response = requests.get(url, headers=headers)
data = response.json()
if data["status"] == "completed":
return data
elif data["status"] == "failed":
raise Exception(data.get("error", "Generation failed"))
time.sleep(3) # Poll every 3 seconds
raise TimeoutError("Generation timed out")
# Usage
result = wait_for_generation("abc123-...", "YOUR_API_KEY")
print(result["formats"]["link"]["url"])
Download URLs in the
formats object are signed and valid for 24 hours.
Store the presentation_id if you need to export again later.Authorizations
Your Alai API key. Get one from your account settings at app.getalai.com
Path Parameters
Response
Successful Response
- PresentationGenerationStatus
- SlideCreationStatus
- ExportStatus
- TranscriptStatus
Current state: pending → in_progress → completed/failed
Available options:
pending, in_progress, completed, failed Human-readable error message when status is 'failed'
ISO 8601 timestamp when generation finished
Allowed value:
"presentation_generation"Available once generation starts. Use this ID for subsequent operations.
Export results keyed by format ('link', 'pdf', 'ppt'). Only present when completed.
Show child attributes
Show child attributes
Was this page helpful?