uploads
Get a pre-signed URL to download an exported document without proxying through the agent.
Returns a short-lived (15-minute) GET URL plus a ready-to-run curl_example. An agent with shell access can run the curl_example directly to save the exported file to the working directory, so the bytes never pass through its context window; clients without shell execution (or callers who only want the link) can use the signed URL directly. Generates the document in the requested format and returns a time-limited signed download URL. Specify format as ‘pdf’, ‘docx’, ‘html’, ‘markdown’, or ‘txt’ (legacy ‘doc’ also accepted).
POST
/
v1
/
downloads
Get a pre-signed URL to download an exported document without proxying through the agent.
curl --request POST \
--url https://api.superdocs.app/v1/downloads \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"session_id": "<string>",
"format": "docx",
"filename": "<string>",
"options": {
"paper_size": "Letter",
"orientation": "portrait",
"margins": "normal",
"custom_margins_inches": {},
"filename": "<string>",
"embed_images": false,
"watermark_text": "<string>",
"watermark_opacity": 0.3
}
}
'import requests
url = "https://api.superdocs.app/v1/downloads"
payload = {
"session_id": "<string>",
"format": "docx",
"filename": "<string>",
"options": {
"paper_size": "Letter",
"orientation": "portrait",
"margins": "normal",
"custom_margins_inches": {},
"filename": "<string>",
"embed_images": False,
"watermark_text": "<string>",
"watermark_opacity": 0.3
}
}
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({
session_id: '<string>',
format: 'docx',
filename: '<string>',
options: {
paper_size: 'Letter',
orientation: 'portrait',
margins: 'normal',
custom_margins_inches: {},
filename: '<string>',
embed_images: false,
watermark_text: '<string>',
watermark_opacity: 0.3
}
})
};
fetch('https://api.superdocs.app/v1/downloads', 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.superdocs.app/v1/downloads",
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([
'session_id' => '<string>',
'format' => 'docx',
'filename' => '<string>',
'options' => [
'paper_size' => 'Letter',
'orientation' => 'portrait',
'margins' => 'normal',
'custom_margins_inches' => [
],
'filename' => '<string>',
'embed_images' => false,
'watermark_text' => '<string>',
'watermark_opacity' => 0.3
]
]),
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://api.superdocs.app/v1/downloads"
payload := strings.NewReader("{\n \"session_id\": \"<string>\",\n \"format\": \"docx\",\n \"filename\": \"<string>\",\n \"options\": {\n \"paper_size\": \"Letter\",\n \"orientation\": \"portrait\",\n \"margins\": \"normal\",\n \"custom_margins_inches\": {},\n \"filename\": \"<string>\",\n \"embed_images\": false,\n \"watermark_text\": \"<string>\",\n \"watermark_opacity\": 0.3\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://api.superdocs.app/v1/downloads")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"session_id\": \"<string>\",\n \"format\": \"docx\",\n \"filename\": \"<string>\",\n \"options\": {\n \"paper_size\": \"Letter\",\n \"orientation\": \"portrait\",\n \"margins\": \"normal\",\n \"custom_margins_inches\": {},\n \"filename\": \"<string>\",\n \"embed_images\": false,\n \"watermark_text\": \"<string>\",\n \"watermark_opacity\": 0.3\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.superdocs.app/v1/downloads")
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 \"session_id\": \"<string>\",\n \"format\": \"docx\",\n \"filename\": \"<string>\",\n \"options\": {\n \"paper_size\": \"Letter\",\n \"orientation\": \"portrait\",\n \"margins\": \"normal\",\n \"custom_margins_inches\": {},\n \"filename\": \"<string>\",\n \"embed_images\": false,\n \"watermark_text\": \"<string>\",\n \"watermark_opacity\": 0.3\n }\n}"
response = http.request(request)
puts response.read_body{
"download_url": "<string>",
"expires_at": "<string>",
"expires_in_seconds": 123,
"curl_example": "<string>",
"filename": "<string>",
"format": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Authorizations
Body
application/json
⌘I
Get a pre-signed URL to download an exported document without proxying through the agent.
curl --request POST \
--url https://api.superdocs.app/v1/downloads \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"session_id": "<string>",
"format": "docx",
"filename": "<string>",
"options": {
"paper_size": "Letter",
"orientation": "portrait",
"margins": "normal",
"custom_margins_inches": {},
"filename": "<string>",
"embed_images": false,
"watermark_text": "<string>",
"watermark_opacity": 0.3
}
}
'import requests
url = "https://api.superdocs.app/v1/downloads"
payload = {
"session_id": "<string>",
"format": "docx",
"filename": "<string>",
"options": {
"paper_size": "Letter",
"orientation": "portrait",
"margins": "normal",
"custom_margins_inches": {},
"filename": "<string>",
"embed_images": False,
"watermark_text": "<string>",
"watermark_opacity": 0.3
}
}
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({
session_id: '<string>',
format: 'docx',
filename: '<string>',
options: {
paper_size: 'Letter',
orientation: 'portrait',
margins: 'normal',
custom_margins_inches: {},
filename: '<string>',
embed_images: false,
watermark_text: '<string>',
watermark_opacity: 0.3
}
})
};
fetch('https://api.superdocs.app/v1/downloads', 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.superdocs.app/v1/downloads",
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([
'session_id' => '<string>',
'format' => 'docx',
'filename' => '<string>',
'options' => [
'paper_size' => 'Letter',
'orientation' => 'portrait',
'margins' => 'normal',
'custom_margins_inches' => [
],
'filename' => '<string>',
'embed_images' => false,
'watermark_text' => '<string>',
'watermark_opacity' => 0.3
]
]),
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://api.superdocs.app/v1/downloads"
payload := strings.NewReader("{\n \"session_id\": \"<string>\",\n \"format\": \"docx\",\n \"filename\": \"<string>\",\n \"options\": {\n \"paper_size\": \"Letter\",\n \"orientation\": \"portrait\",\n \"margins\": \"normal\",\n \"custom_margins_inches\": {},\n \"filename\": \"<string>\",\n \"embed_images\": false,\n \"watermark_text\": \"<string>\",\n \"watermark_opacity\": 0.3\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://api.superdocs.app/v1/downloads")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"session_id\": \"<string>\",\n \"format\": \"docx\",\n \"filename\": \"<string>\",\n \"options\": {\n \"paper_size\": \"Letter\",\n \"orientation\": \"portrait\",\n \"margins\": \"normal\",\n \"custom_margins_inches\": {},\n \"filename\": \"<string>\",\n \"embed_images\": false,\n \"watermark_text\": \"<string>\",\n \"watermark_opacity\": 0.3\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.superdocs.app/v1/downloads")
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 \"session_id\": \"<string>\",\n \"format\": \"docx\",\n \"filename\": \"<string>\",\n \"options\": {\n \"paper_size\": \"Letter\",\n \"orientation\": \"portrait\",\n \"margins\": \"normal\",\n \"custom_margins_inches\": {},\n \"filename\": \"<string>\",\n \"embed_images\": false,\n \"watermark_text\": \"<string>\",\n \"watermark_opacity\": 0.3\n }\n}"
response = http.request(request)
puts response.read_body{
"download_url": "<string>",
"expires_at": "<string>",
"expires_in_seconds": 123,
"curl_example": "<string>",
"filename": "<string>",
"format": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}