Edit Presentation
curl --request POST \
--url https://slides-api.getalai.com/api/modern/v1/presentations/{presentation_id}/edits \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"instruction": "<string>",
"slide_ids": [
"<string>"
],
"asset_ids": [
"<string>"
],
"model": {
"fallback_policy": "deny"
},
"base_commit_sha": "<string>",
"idempotency_key": "<string>"
}
'import requests
url = "https://slides-api.getalai.com/api/modern/v1/presentations/{presentation_id}/edits"
payload = {
"instruction": "<string>",
"slide_ids": ["<string>"],
"asset_ids": ["<string>"],
"model": { "fallback_policy": "deny" },
"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({
instruction: '<string>',
slide_ids: ['<string>'],
asset_ids: ['<string>'],
model: {fallback_policy: 'deny'},
base_commit_sha: '<string>',
idempotency_key: '<string>'
})
};
fetch('https://slides-api.getalai.com/api/modern/v1/presentations/{presentation_id}/edits', 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}/edits",
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([
'instruction' => '<string>',
'slide_ids' => [
'<string>'
],
'asset_ids' => [
'<string>'
],
'model' => [
'fallback_policy' => 'deny'
],
'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}/edits"
payload := strings.NewReader("{\n \"instruction\": \"<string>\",\n \"slide_ids\": [\n \"<string>\"\n ],\n \"asset_ids\": [\n \"<string>\"\n ],\n \"model\": {\n \"fallback_policy\": \"deny\"\n },\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}/edits")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"instruction\": \"<string>\",\n \"slide_ids\": [\n \"<string>\"\n ],\n \"asset_ids\": [\n \"<string>\"\n ],\n \"model\": {\n \"fallback_policy\": \"deny\"\n },\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}/edits")
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 \"instruction\": \"<string>\",\n \"slide_ids\": [\n \"<string>\"\n ],\n \"asset_ids\": [\n \"<string>\"\n ],\n \"model\": {\n \"fallback_policy\": \"deny\"\n },\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
Edit Presentation
POST
/
api
/
modern
/
v1
/
presentations
/
{presentation_id}
/
edits
Edit Presentation
curl --request POST \
--url https://slides-api.getalai.com/api/modern/v1/presentations/{presentation_id}/edits \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"instruction": "<string>",
"slide_ids": [
"<string>"
],
"asset_ids": [
"<string>"
],
"model": {
"fallback_policy": "deny"
},
"base_commit_sha": "<string>",
"idempotency_key": "<string>"
}
'import requests
url = "https://slides-api.getalai.com/api/modern/v1/presentations/{presentation_id}/edits"
payload = {
"instruction": "<string>",
"slide_ids": ["<string>"],
"asset_ids": ["<string>"],
"model": { "fallback_policy": "deny" },
"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({
instruction: '<string>',
slide_ids: ['<string>'],
asset_ids: ['<string>'],
model: {fallback_policy: 'deny'},
base_commit_sha: '<string>',
idempotency_key: '<string>'
})
};
fetch('https://slides-api.getalai.com/api/modern/v1/presentations/{presentation_id}/edits', 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}/edits",
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([
'instruction' => '<string>',
'slide_ids' => [
'<string>'
],
'asset_ids' => [
'<string>'
],
'model' => [
'fallback_policy' => 'deny'
],
'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}/edits"
payload := strings.NewReader("{\n \"instruction\": \"<string>\",\n \"slide_ids\": [\n \"<string>\"\n ],\n \"asset_ids\": [\n \"<string>\"\n ],\n \"model\": {\n \"fallback_policy\": \"deny\"\n },\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}/edits")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"instruction\": \"<string>\",\n \"slide_ids\": [\n \"<string>\"\n ],\n \"asset_ids\": [\n \"<string>\"\n ],\n \"model\": {\n \"fallback_policy\": \"deny\"\n },\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}/edits")
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 \"instruction\": \"<string>\",\n \"slide_ids\": [\n \"<string>\"\n ],\n \"asset_ids\": [\n \"<string>\"\n ],\n \"model\": {\n \"fallback_policy\": \"deny\"\n },\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>"
}
]
}Revise a generated Modern artifact with natural-language instructions. Omit
slide_ids for a deck-wide edit or include up to 50 slide IDs to scope the change. Uploaded assets can be introduced or reused through asset_ids.
Pass the latest repo_commit_sha as base_commit_sha to ensure the edit applies to the revision you read. If the deck has changed, the operation fails instead of overwriting newer work.
{
"instruction": "Make the opening more energetic and retain the station logo.",
"slide_ids": ["slide-1"],
"asset_ids": ["LOGO_ASSET_ID"],
"model": {
"id": "anthropic/claude-opus-4.8",
"fallback_policy": "deny"
},
"base_commit_sha": "CURRENT_COMMIT_SHA",
"idempotency_key": "futuri-edit-123"
}
Authorizations
Your Alai API key. Get one from your account settings at app.getalai.com
Path Parameters
Body
application/json
Required string length:
1 - 20000Maximum array length:
50Maximum array length:
20Show child attributes
Show child attributes
Required 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?