Upload Presentation
curl --request POST \
--url https://api.trugen.ai/v1/ext/presentation \
--header 'Content-Type: multipart/form-data' \
--header 'x-api-key: <api-key>' \
--form 'name=Q3 Sales Deck' \
--form input=@example-file \
--form 'description=Quarterly sales presentation for 2025'import requests
url = "https://api.trugen.ai/v1/ext/presentation"
files = { "input": ("example-file", open("example-file", "rb")) }
payload = {
"name": "Q3 Sales Deck",
"description": "Quarterly sales presentation for 2025"
}
headers = {"x-api-key": "<api-key>"}
response = requests.post(url, data=payload, files=files, headers=headers)
print(response.text)const form = new FormData();
form.append('name', 'Q3 Sales Deck');
form.append('input', '<string>');
form.append('description', 'Quarterly sales presentation for 2025');
const options = {method: 'POST', headers: {'x-api-key': '<api-key>'}};
options.body = form;
fetch('https://api.trugen.ai/v1/ext/presentation', 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://api.trugen.ai/v1/ext/presentation",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"name\"\r\n\r\nQ3 Sales Deck\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"input\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"description\"\r\n\r\nQuarterly sales presentation for 2025\r\n-----011000010111000001101001--",
CURLOPT_HTTPHEADER => [
"Content-Type: multipart/form-data",
"x-api-key: <api-key>"
],
]);
$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://api.trugen.ai/v1/ext/presentation"
payload := strings.NewReader("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"name\"\r\n\r\nQ3 Sales Deck\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"input\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"description\"\r\n\r\nQuarterly sales presentation for 2025\r\n-----011000010111000001101001--")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.trugen.ai/v1/ext/presentation")
.header("x-api-key", "<api-key>")
.body("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"name\"\r\n\r\nQ3 Sales Deck\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"input\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"description\"\r\n\r\nQuarterly sales presentation for 2025\r\n-----011000010111000001101001--")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.trugen.ai/v1/ext/presentation")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request.body = "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"name\"\r\n\r\nQ3 Sales Deck\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"input\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"description\"\r\n\r\nQuarterly sales presentation for 2025\r\n-----011000010111000001101001--"
response = http.request(request)
puts response.read_body{
"id": "1411f164-fe94-4a4b-9b1b-027a9929f95d",
"message": "Presentation uploaded successfully"
}{
"error": "Unauthorized: not a valid authorization api key"
}{
"error": "Failed to upload presentation"
}Visual Presentations
Upload Presentation
Upload a presentation deck (.pdf or .pptx) to your library. When attached to an agent, the agent semantically searches the deck to present matching slides visually during live conversations.
POST
/
ext
/
presentation
Upload Presentation
curl --request POST \
--url https://api.trugen.ai/v1/ext/presentation \
--header 'Content-Type: multipart/form-data' \
--header 'x-api-key: <api-key>' \
--form 'name=Q3 Sales Deck' \
--form input=@example-file \
--form 'description=Quarterly sales presentation for 2025'import requests
url = "https://api.trugen.ai/v1/ext/presentation"
files = { "input": ("example-file", open("example-file", "rb")) }
payload = {
"name": "Q3 Sales Deck",
"description": "Quarterly sales presentation for 2025"
}
headers = {"x-api-key": "<api-key>"}
response = requests.post(url, data=payload, files=files, headers=headers)
print(response.text)const form = new FormData();
form.append('name', 'Q3 Sales Deck');
form.append('input', '<string>');
form.append('description', 'Quarterly sales presentation for 2025');
const options = {method: 'POST', headers: {'x-api-key': '<api-key>'}};
options.body = form;
fetch('https://api.trugen.ai/v1/ext/presentation', 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://api.trugen.ai/v1/ext/presentation",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"name\"\r\n\r\nQ3 Sales Deck\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"input\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"description\"\r\n\r\nQuarterly sales presentation for 2025\r\n-----011000010111000001101001--",
CURLOPT_HTTPHEADER => [
"Content-Type: multipart/form-data",
"x-api-key: <api-key>"
],
]);
$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://api.trugen.ai/v1/ext/presentation"
payload := strings.NewReader("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"name\"\r\n\r\nQ3 Sales Deck\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"input\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"description\"\r\n\r\nQuarterly sales presentation for 2025\r\n-----011000010111000001101001--")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.trugen.ai/v1/ext/presentation")
.header("x-api-key", "<api-key>")
.body("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"name\"\r\n\r\nQ3 Sales Deck\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"input\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"description\"\r\n\r\nQuarterly sales presentation for 2025\r\n-----011000010111000001101001--")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.trugen.ai/v1/ext/presentation")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request.body = "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"name\"\r\n\r\nQ3 Sales Deck\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"input\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"description\"\r\n\r\nQuarterly sales presentation for 2025\r\n-----011000010111000001101001--"
response = http.request(request)
puts response.read_body{
"id": "1411f164-fe94-4a4b-9b1b-027a9929f95d",
"message": "Presentation uploaded successfully"
}{
"error": "Unauthorized: not a valid authorization api key"
}{
"error": "Failed to upload presentation"
}Upload a presentation deck (
Response:
See Attaching to Agents for detailed setup.
.pdf or .pptx) to your library. When attached to an agent, the agent semantically searches the deck to present matching slides visually during live conversations.
When to upload a presentation
Upload visual slide decks for content that requires visual demonstration alongside spoken explanations:- Sales & Pitch Decks: product feature decks, pricing slides, competitive comparisons
- Architecture & Technical Diagrams: system architecture, data flow diagrams, technical setup
- Tutorials & Product Demos: step-by-step onboarding slides, feature walkthroughs
Supported formats & size limits
| Media | Formats | Max Size | Processing Notes |
|---|---|---|---|
.pdf | 100 MB | Extracted page-by-page into slide images and indexed. | |
| PowerPoint | .pptx | 100 MB | Extracted slide-by-slide and indexed for semantic search. |
Required fields
name: a clear, descriptive title for the presentation deckinput: the.pdfor.pptxpresentation file (multipart/form-data)
Optional fields
description: detailed summary explaining when the agent should select this presentation deck
Example
curl --request POST \
--url https://api.trugen.ai/v1/ext/presentation \
--header 'x-api-key: YOUR_API_KEY' \
--form 'name="Q3 Sales Deck"' \
--form 'description="Quarterly sales presentation for 2025"' \
--form 'input=@/path/to/presentation.pdf'
{
"id": "1411f164-fe94-4a4b-9b1b-027a9929f95d",
"message": "Presentation uploaded successfully"
}
Next steps
After uploading, attach the presentation to an agent via thevisual_presentations array:
"visual_presentations": [
{ "id": "1411f164-fe94-4a4b-9b1b-027a9929f95d" }
]
Authorizations
Body
multipart/form-data
Was this page helpful?