Generate a finished editable Pekto presentation
curl --request POST \
--url https://fwpvfpysaskvlxgwcaxk.supabase.co/functions/v1/api-v1/presentations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"topic": "<string>",
"title": "<string>",
"content": "<string>",
"instructions": "<string>",
"slide_count": 8,
"language": "Auto",
"format": "presentation",
"template_family": "<string>",
"aspect_ratio": "16:9",
"include_stock_images": false,
"use_web_search": false
}
'import requests
url = "https://fwpvfpysaskvlxgwcaxk.supabase.co/functions/v1/api-v1/presentations"
payload = {
"topic": "<string>",
"title": "<string>",
"content": "<string>",
"instructions": "<string>",
"slide_count": 8,
"language": "Auto",
"format": "presentation",
"template_family": "<string>",
"aspect_ratio": "16:9",
"include_stock_images": False,
"use_web_search": False
}
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({
topic: '<string>',
title: '<string>',
content: '<string>',
instructions: '<string>',
slide_count: 8,
language: 'Auto',
format: 'presentation',
template_family: '<string>',
aspect_ratio: '16:9',
include_stock_images: false,
use_web_search: false
})
};
fetch('https://fwpvfpysaskvlxgwcaxk.supabase.co/functions/v1/api-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://fwpvfpysaskvlxgwcaxk.supabase.co/functions/v1/api-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([
'topic' => '<string>',
'title' => '<string>',
'content' => '<string>',
'instructions' => '<string>',
'slide_count' => 8,
'language' => 'Auto',
'format' => 'presentation',
'template_family' => '<string>',
'aspect_ratio' => '16:9',
'include_stock_images' => false,
'use_web_search' => false
]),
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://fwpvfpysaskvlxgwcaxk.supabase.co/functions/v1/api-v1/presentations"
payload := strings.NewReader("{\n \"topic\": \"<string>\",\n \"title\": \"<string>\",\n \"content\": \"<string>\",\n \"instructions\": \"<string>\",\n \"slide_count\": 8,\n \"language\": \"Auto\",\n \"format\": \"presentation\",\n \"template_family\": \"<string>\",\n \"aspect_ratio\": \"16:9\",\n \"include_stock_images\": false,\n \"use_web_search\": false\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://fwpvfpysaskvlxgwcaxk.supabase.co/functions/v1/api-v1/presentations")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"topic\": \"<string>\",\n \"title\": \"<string>\",\n \"content\": \"<string>\",\n \"instructions\": \"<string>\",\n \"slide_count\": 8,\n \"language\": \"Auto\",\n \"format\": \"presentation\",\n \"template_family\": \"<string>\",\n \"aspect_ratio\": \"16:9\",\n \"include_stock_images\": false,\n \"use_web_search\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://fwpvfpysaskvlxgwcaxk.supabase.co/functions/v1/api-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 \"topic\": \"<string>\",\n \"title\": \"<string>\",\n \"content\": \"<string>\",\n \"instructions\": \"<string>\",\n \"slide_count\": 8,\n \"language\": \"Auto\",\n \"format\": \"presentation\",\n \"template_family\": \"<string>\",\n \"aspect_ratio\": \"16:9\",\n \"include_stock_images\": false,\n \"use_web_search\": false\n}"
response = http.request(request)
puts response.read_bodyAPI Reference
Generate a finished editable Pekto presentation
Checks and reserves 2.5 credits, generates the complete deck on the server, saves an editable project, and returns its direct editor URL. Failed generations are refunded automatically.
POST
/
presentations
Generate a finished editable Pekto presentation
curl --request POST \
--url https://fwpvfpysaskvlxgwcaxk.supabase.co/functions/v1/api-v1/presentations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"topic": "<string>",
"title": "<string>",
"content": "<string>",
"instructions": "<string>",
"slide_count": 8,
"language": "Auto",
"format": "presentation",
"template_family": "<string>",
"aspect_ratio": "16:9",
"include_stock_images": false,
"use_web_search": false
}
'import requests
url = "https://fwpvfpysaskvlxgwcaxk.supabase.co/functions/v1/api-v1/presentations"
payload = {
"topic": "<string>",
"title": "<string>",
"content": "<string>",
"instructions": "<string>",
"slide_count": 8,
"language": "Auto",
"format": "presentation",
"template_family": "<string>",
"aspect_ratio": "16:9",
"include_stock_images": False,
"use_web_search": False
}
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({
topic: '<string>',
title: '<string>',
content: '<string>',
instructions: '<string>',
slide_count: 8,
language: 'Auto',
format: 'presentation',
template_family: '<string>',
aspect_ratio: '16:9',
include_stock_images: false,
use_web_search: false
})
};
fetch('https://fwpvfpysaskvlxgwcaxk.supabase.co/functions/v1/api-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://fwpvfpysaskvlxgwcaxk.supabase.co/functions/v1/api-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([
'topic' => '<string>',
'title' => '<string>',
'content' => '<string>',
'instructions' => '<string>',
'slide_count' => 8,
'language' => 'Auto',
'format' => 'presentation',
'template_family' => '<string>',
'aspect_ratio' => '16:9',
'include_stock_images' => false,
'use_web_search' => false
]),
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://fwpvfpysaskvlxgwcaxk.supabase.co/functions/v1/api-v1/presentations"
payload := strings.NewReader("{\n \"topic\": \"<string>\",\n \"title\": \"<string>\",\n \"content\": \"<string>\",\n \"instructions\": \"<string>\",\n \"slide_count\": 8,\n \"language\": \"Auto\",\n \"format\": \"presentation\",\n \"template_family\": \"<string>\",\n \"aspect_ratio\": \"16:9\",\n \"include_stock_images\": false,\n \"use_web_search\": false\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://fwpvfpysaskvlxgwcaxk.supabase.co/functions/v1/api-v1/presentations")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"topic\": \"<string>\",\n \"title\": \"<string>\",\n \"content\": \"<string>\",\n \"instructions\": \"<string>\",\n \"slide_count\": 8,\n \"language\": \"Auto\",\n \"format\": \"presentation\",\n \"template_family\": \"<string>\",\n \"aspect_ratio\": \"16:9\",\n \"include_stock_images\": false,\n \"use_web_search\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://fwpvfpysaskvlxgwcaxk.supabase.co/functions/v1/api-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 \"topic\": \"<string>\",\n \"title\": \"<string>\",\n \"content\": \"<string>\",\n \"instructions\": \"<string>\",\n \"slide_count\": 8,\n \"language\": \"Auto\",\n \"format\": \"presentation\",\n \"template_family\": \"<string>\",\n \"aspect_ratio\": \"16:9\",\n \"include_stock_images\": false,\n \"use_web_search\": false\n}"
response = http.request(request)
puts response.read_bodyAuthorizations
Body
application/json
- Option 1
- Option 2
- Option 3
Response
Finished presentation project and editor URL

