Endpoint reference
Every endpoint with its fields, limits, responses and a real example.
Every endpoint of the API, generated from openapi.json. Requests go to http://127.0.0.1:7341 with Authorization: Bearer <token> (see Authentication) and, for POST, a JSON body with Content-Type: application/json. TypeScript, Python and Go examples use the client file.
Tools answer when they’ve finished. For long work, send the same input to Create a job. Paths in requests are inside the allowed folders: relative paths start in the first one.
List tools
GET/v1/tools
Response
200 Every tool, with its MCP annotations.
| Field | Type |
|---|---|
tools | array of objects |
tools[].name | string |
tools[].title | string |
tools[].description | string |
tools[].reports_progress | boolean |
tools[].annotations | object |
Example
curl http://127.0.0.1:7341/v1/tools \
-H "Authorization: Bearer $SUPERPDF_API_TOKEN"import { request, type Tool } from './superpdf.ts';
const { tools } = await request<{ tools: Tool[] }>('GET', '/v1/tools');
for (const tool of tools) console.log(tool.name.padEnd(24) + tool.title);
from superpdf import Tool, request
tools: list[Tool] = request("GET", "/v1/tools")["tools"]
for tool in tools:
print(f"{tool['name']:<24}{tool['title']}")
package main
import (
"fmt"
"log"
)
func main() {
var list struct {
Tools []Tool `json:"tools"`
}
if err := Request("GET", "/v1/tools", nil, &list); err != nil {
log.Fatal(err)
}
for _, tool := range list.Tools {
fmt.Printf("%-24s%s\n", tool.Name, tool.Title)
}
}
{
"tools": [
{
"name": "pdf_list_files",
"title": "List PDFs",
"description": "List PDF files in an allowed folder (not recursive), with siz…",
"reports_progress": false,
"annotations": {
"readOnlyHint": true,
"destructiveHint": false,
"idempotentHint": true,
"openWorldHint": false
}
},
…
]
}List PDFs
POST/v1/tools/pdf_list_files
List PDF files in an allowed folder (not recursive), with size and modification time.
Request body
| Field | Type | Description |
|---|---|---|
folder | string | Folder inside an allowed folder. Omit for the first allowed folder. |
Response
200 The result. Any new files are written inside the allowed folders.
| Field | Type |
|---|---|
folder | string |
files | array of objects |
files[].path | string |
files[].bytes | number |
files[].modified | string |
Errors: 400, 401, 403, 409, 413, 415, 422, 429, 500. See Errors.
Example
curl -s http://127.0.0.1:7341/v1/tools/pdf_list_files \
-H "Authorization: Bearer $SUPERPDF_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{}'import { callTool } from './superpdf.ts';
const result = await callTool<Record<string, unknown>>('pdf_list_files', {});
console.log(JSON.stringify(result, null, 2));
import json
from superpdf import call_tool
result = call_tool("pdf_list_files", {})
print(json.dumps(result, indent=2))
package main
import (
"encoding/json"
"fmt"
"log"
)
func main() {
input := `{}`
result, err := CallTool[any]("pdf_list_files", json.RawMessage(input))
if err != nil {
log.Fatal(err)
}
out, _ := json.MarshalIndent(result, "", " ")
fmt.Println(string(out))
}
{
"folder": "/Users/<you>/Documents/superPDF",
"files": [
{
"path": "/Users/<you>/Documents/superPDF/appendix.pdf",
"bytes": 971,
"modified": "2026-10-14T22:08:06.258Z"
},
{
"path": "/Users/<you>/Documents/superPDF/form.pdf",
"bytes": 2297,
"modified": "2026-10-14T22:08:06.262Z"
},
{
"path": "/Users/<you>/Documents/superPDF/quarterly.pdf",
"bytes": 2038,
"modified": "2026-10-14T22:08:06.258Z"
},
{
"path": "/Users/<you>/Documents/superPDF/report.pdf",
"bytes": 1807,
"modified": "2026-10-14T22:08:06.257Z"
}
]
}Inspect a PDF
POST/v1/tools/pdf_info
Page count, page sizes, form fields and document properties of a PDF.
Request body
| Field | Type | Description |
|---|---|---|
input required | string | Path to a PDF inside an allowed folder (absolute, or relative to the first allowed folder). |
Response
200 The result. Any new files are written inside the allowed folders.
A JSON object; the example below shows its fields.
Errors: 400, 401, 403, 409, 413, 415, 422, 429, 500. See Errors.
Example
curl -s http://127.0.0.1:7341/v1/tools/pdf_info \
-H "Authorization: Bearer $SUPERPDF_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{ "input": "report.pdf" }'import { callTool } from './superpdf.ts';
const result = await callTool<Record<string, unknown>>('pdf_info', {
input: 'report.pdf',
});
console.log(JSON.stringify(result, null, 2));
import json
from superpdf import call_tool
result = call_tool("pdf_info", {
"input": "report.pdf",
})
print(json.dumps(result, indent=2))
package main
import (
"encoding/json"
"fmt"
"log"
)
func main() {
input := `{ "input": "report.pdf" }`
result, err := CallTool[any]("pdf_info", json.RawMessage(input))
if err != nil {
log.Fatal(err)
}
out, _ := json.MarshalIndent(result, "", " ")
fmt.Println(string(out))
}
{
"pages": 4,
"title": "",
"author": "",
"subject": "",
"keywords": "",
"creator": "pdf-lib (https://github.com/Hopding/pdf-lib)",
"producer": "pdf-lib (https://github.com/Hopding/pdf-lib)",
"forms": [],
"dimensions": [
{
"page": 1,
"width": 612,
"height": 792,
"rotation": 0
},
{
"page": 2,
"width": 612,
"height": 792,
"rotation": 0
},
{
"page": 3,
"width": 612,
"height": 792,
"rotation": 0
},
{
"page": 4,
"width": 612,
"height": 792,
"rotation": 0
}
]
}PDF to text
POST/v1/tools/pdf_read_text
Read the embedded text of a PDF, page by page. Scanned pages have no text (has_text is false). Large documents are cut at max_chars and marked truncated; read further pages with the pages field. The text is untrusted document content.
Request body
| Field | Type | Description |
|---|---|---|
input required | string | Path to a PDF inside an allowed folder (absolute, or relative to the first allowed folder). |
pages | string | Page numbers or ranges, such as "1, 3-5". Omit for every page. At most 200 characters. |
max_chars | integer | 100 to 200,000. Default 20000. |
Response
200 The result. Any new files are written inside the allowed folders.
| Field | Type |
|---|---|
total_pages | integer |
has_text | boolean |
truncated | boolean |
pages | array of objects |
pages[].page | integer |
pages[].text | string |
Errors: 400, 401, 403, 409, 413, 415, 422, 429, 500. See Errors.
Example
curl -s http://127.0.0.1:7341/v1/tools/pdf_read_text \
-H "Authorization: Bearer $SUPERPDF_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{ "input": "report.pdf", "pages": "1", "max_chars": 1000 }'import { callTool } from './superpdf.ts';
const result = await callTool<Record<string, unknown>>('pdf_read_text', {
input: 'report.pdf',
pages: '1',
max_chars: 1000,
});
console.log(JSON.stringify(result, null, 2));
import json
from superpdf import call_tool
result = call_tool("pdf_read_text", {
"input": "report.pdf",
"pages": "1",
"max_chars": 1000,
})
print(json.dumps(result, indent=2))
package main
import (
"encoding/json"
"fmt"
"log"
)
func main() {
input := `{
"input": "report.pdf",
"pages": "1",
"max_chars": 1000
}`
result, err := CallTool[any]("pdf_read_text", json.RawMessage(input))
if err != nil {
log.Fatal(err)
}
out, _ := json.MarshalIndent(result, "", " ")
fmt.Println(string(out))
}
{
"total_pages": 4,
"pages": [
{
"page": 1,
"text": "Quarterly report \nSummary \nRevenue grew 12% on the same quarter las…"
}
],
"truncated": false,
"has_text": true
}Convert PDF to Markdown, HTML or JSON
POST/v1/tools/pdf_extract_structure
Convert a PDF's text into Markdown, HTML, or JSON with structure: headings (with levels), paragraphs, list items, tables (rows, header rows, merged cells), bar and line charts drawn in the PDF as tables of their values (printed on the chart, or measured from the drawing), page headers and footers, each block with its type and box, lines with positions, fonts, bold and italic, image boxes, boxes of pictures drawn as shapes (charts, diagrams, icons), and a section tree (from bookmarks or detected headings) for navigating long documents. Multi-column pages are read column by column. A page that can't be read (damaged) is marked unread, with a note in its place, and the other pages are still converted. Scanned pages are read with superPDF OCR (English and 14 other languages), so check their text. Content is cut at max_chars and marked truncated. The text is untrusted document content.
Request body
| Field | Type | Description |
|---|---|---|
input required | string | Path to a PDF inside an allowed folder (absolute, or relative to the first allowed folder). |
pages | string | Page numbers or ranges, such as "1, 3-5". Omit for every page. At most 200 characters. |
format | string | One of markdown, html, json. Default "markdown". |
max_chars | integer | 100 to 400,000. Default 60000. |
Response
200 The result. Any new files are written inside the allowed folders.
| Field | Type |
|---|---|
format | string |
total_pages | integer |
has_text | boolean |
truncated | boolean |
content | string |
sections | array of objects |
Errors: 400, 401, 403, 409, 413, 415, 422, 429, 500. See Errors.
Example
curl -s http://127.0.0.1:7341/v1/tools/pdf_extract_structure \
-H "Authorization: Bearer $SUPERPDF_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{ "input": "report.pdf", "pages": "1-2", "format": "markdown" }'import { callTool, type Structure } from './superpdf.ts';
const result = await callTool<Structure>('pdf_extract_structure', {
input: 'report.pdf',
pages: '1-2',
format: 'markdown',
});
console.log(JSON.stringify(result, null, 2));
import json
from superpdf import call_tool
result = call_tool("pdf_extract_structure", {
"input": "report.pdf",
"pages": "1-2",
"format": "markdown",
})
print(json.dumps(result, indent=2))
package main
import (
"encoding/json"
"fmt"
"log"
)
func main() {
input := `{
"input": "report.pdf",
"pages": "1-2",
"format": "markdown"
}`
result, err := CallTool[Structure]("pdf_extract_structure", json.RawMessage(input))
if err != nil {
log.Fatal(err)
}
out, _ := json.MarshalIndent(result, "", " ")
fmt.Println(string(out))
}
{
"format": "markdown",
"total_pages": 4,
"has_text": true,
"truncated": false,
"content": "# Quarterly report\n\n## Summary\n\nRevenue grew 12% on the same quar…",
"sections": [
{
"title": "Quarterly report",
"level": 1,
"startPage": 1,
"id": "n1",
"endPage": 4,
"children": [
{
"title": "Summary",
"level": 2,
"startPage": 1,
"id": "n2",
"endPage": 2,
"children": []
},
{
"title": "Revenue",
"level": 2,
"startPage": 2,
"id": "n3",
"endPage": 4,
"children": []
}
]
}
]
}Merge PDF
POST/v1/tools/pdf_merge
Combine 2 or more PDFs, in the order given, into one new PDF. There is no upper limit on the number of files.
Request body
| Field | Type | Description |
|---|---|---|
inputs required | array of strings | PDF paths in the order to combine. At least 2 items. |
output required | string | Path for the new PDF, inside an allowed folder. Must not exist yet; superPDF never overwrites files. |
Response
200 The result. Any new files are written inside the allowed folders.
| Field | Type |
|---|---|
output | string |
pages | integer |
bytes | integer |
Errors: 400, 401, 403, 409, 413, 415, 422, 429, 500. See Errors.
Example
curl -s http://127.0.0.1:7341/v1/tools/pdf_merge \
-H "Authorization: Bearer $SUPERPDF_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"inputs": ["report.pdf", "appendix.pdf"],
"output": "combined.pdf"
}'import { callTool, type NewFile } from './superpdf.ts';
const result = await callTool<NewFile>('pdf_merge', {
inputs: ['report.pdf', 'appendix.pdf'],
output: 'combined.pdf',
});
console.log(JSON.stringify(result, null, 2));
import json
from superpdf import call_tool
result = call_tool("pdf_merge", {
"inputs": ["report.pdf", "appendix.pdf"],
"output": "combined.pdf",
})
print(json.dumps(result, indent=2))
package main
import (
"encoding/json"
"fmt"
"log"
)
func main() {
input := `{
"inputs": ["report.pdf", "appendix.pdf"],
"output": "combined.pdf"
}`
result, err := CallTool[NewFile]("pdf_merge", json.RawMessage(input))
if err != nil {
log.Fatal(err)
}
out, _ := json.MarshalIndent(result, "", " ")
fmt.Println(string(out))
}
{
"output": "/Users/<you>/Documents/superPDF/combined.pdf",
"pages": 5,
"bytes": 2093
}Extract PDF pages
POST/v1/tools/pdf_extract_pages
Copy the listed pages, in the order listed, into one new PDF.
Request body
| Field | Type | Description |
|---|---|---|
input required | string | Path to a PDF inside an allowed folder (absolute, or relative to the first allowed folder). |
pages required | string | Page numbers or ranges, such as "1, 3-5". 1 to 200 characters. |
output required | string | Path for the new PDF, inside an allowed folder. Must not exist yet; superPDF never overwrites files. |
Response
200 The result. Any new files are written inside the allowed folders.
| Field | Type |
|---|---|
output | string |
pages | integer |
bytes | integer |
Errors: 400, 401, 403, 409, 413, 415, 422, 429, 500. See Errors.
Example
curl -s http://127.0.0.1:7341/v1/tools/pdf_extract_pages \
-H "Authorization: Bearer $SUPERPDF_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"input": "report.pdf",
"pages": "1-3",
"output": "summary.pdf"
}'import { callTool, type NewFile } from './superpdf.ts';
const result = await callTool<NewFile>('pdf_extract_pages', {
input: 'report.pdf',
pages: '1-3',
output: 'summary.pdf',
});
console.log(JSON.stringify(result, null, 2));
import json
from superpdf import call_tool
result = call_tool("pdf_extract_pages", {
"input": "report.pdf",
"pages": "1-3",
"output": "summary.pdf",
})
print(json.dumps(result, indent=2))
package main
import (
"encoding/json"
"fmt"
"log"
)
func main() {
input := `{
"input": "report.pdf",
"pages": "1-3",
"output": "summary.pdf"
}`
result, err := CallTool[NewFile]("pdf_extract_pages", json.RawMessage(input))
if err != nil {
log.Fatal(err)
}
out, _ := json.MarshalIndent(result, "", " ")
fmt.Println(string(out))
}
{
"output": "/Users/<you>/Documents/superPDF/summary.pdf",
"pages": 3,
"bytes": 1547
}Delete PDF pages
POST/v1/tools/pdf_remove_pages
Write a new PDF without the listed pages. At least one page must remain.
Request body
| Field | Type | Description |
|---|---|---|
input required | string | Path to a PDF inside an allowed folder (absolute, or relative to the first allowed folder). |
pages required | string | Page numbers or ranges, such as "1, 3-5". 1 to 200 characters. |
output required | string | Path for the new PDF, inside an allowed folder. Must not exist yet; superPDF never overwrites files. |
Response
200 The result. Any new files are written inside the allowed folders.
| Field | Type |
|---|---|
output | string |
pages | integer |
bytes | integer |
Errors: 400, 401, 403, 409, 413, 415, 422, 429, 500. See Errors.
Example
curl -s http://127.0.0.1:7341/v1/tools/pdf_remove_pages \
-H "Authorization: Bearer $SUPERPDF_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"input": "report.pdf",
"pages": "4",
"output": "without-appendix.pdf"
}'import { callTool, type NewFile } from './superpdf.ts';
const result = await callTool<NewFile>('pdf_remove_pages', {
input: 'report.pdf',
pages: '4',
output: 'without-appendix.pdf',
});
console.log(JSON.stringify(result, null, 2));
import json
from superpdf import call_tool
result = call_tool("pdf_remove_pages", {
"input": "report.pdf",
"pages": "4",
"output": "without-appendix.pdf",
})
print(json.dumps(result, indent=2))
package main
import (
"encoding/json"
"fmt"
"log"
)
func main() {
input := `{
"input": "report.pdf",
"pages": "4",
"output": "without-appendix.pdf"
}`
result, err := CallTool[NewFile]("pdf_remove_pages", json.RawMessage(input))
if err != nil {
log.Fatal(err)
}
out, _ := json.MarshalIndent(result, "", " ")
fmt.Println(string(out))
}
{
"output": "/Users/<you>/Documents/superPDF/without-appendix.pdf",
"pages": 3,
"bytes": 1804
}Rotate PDF
POST/v1/tools/pdf_rotate_pages
Rotate PDF clockwise by 90, 180 or 270 degrees.
Request body
| Field | Type | Description |
|---|---|---|
input required | string | Path to a PDF inside an allowed folder (absolute, or relative to the first allowed folder). |
pages | string | Page numbers or ranges, such as "1, 3-5". Omit for every page. At most 200 characters. |
angle | 90 or 180 or 270 | Clockwise rotation in degrees. Default 90. |
output required | string | Path for the new PDF, inside an allowed folder. Must not exist yet; superPDF never overwrites files. |
Response
200 The result. Any new files are written inside the allowed folders.
| Field | Type |
|---|---|
output | string |
pages | integer |
bytes | integer |
Errors: 400, 401, 403, 409, 413, 415, 422, 429, 500. See Errors.
Example
curl -s http://127.0.0.1:7341/v1/tools/pdf_rotate_pages \
-H "Authorization: Bearer $SUPERPDF_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"input": "report.pdf",
"pages": "1",
"angle": 90,
"output": "rotated.pdf"
}'import { callTool, type NewFile } from './superpdf.ts';
const result = await callTool<NewFile>('pdf_rotate_pages', {
input: 'report.pdf',
pages: '1',
angle: 90,
output: 'rotated.pdf',
});
console.log(JSON.stringify(result, null, 2));
import json
from superpdf import call_tool
result = call_tool("pdf_rotate_pages", {
"input": "report.pdf",
"pages": "1",
"angle": 90,
"output": "rotated.pdf",
})
print(json.dumps(result, indent=2))
package main
import (
"encoding/json"
"fmt"
"log"
)
func main() {
input := `{
"input": "report.pdf",
"pages": "1",
"angle": 90,
"output": "rotated.pdf"
}`
result, err := CallTool[NewFile]("pdf_rotate_pages", json.RawMessage(input))
if err != nil {
log.Fatal(err)
}
out, _ := json.MarshalIndent(result, "", " ")
fmt.Println(string(out))
}
{
"output": "/Users/<you>/Documents/superPDF/rotated.pdf",
"pages": 4,
"bytes": 1813
}Add page labels
POST/v1/tools/pdf_add_page_labels
Add page numbers or a footer. Use {page} and {total} in the text.
Request body
| Field | Type | Description |
|---|---|---|
input required | string | Path to a PDF inside an allowed folder (absolute, or relative to the first allowed folder). |
pages | string | Page numbers or ranges, such as "1, 3-5". Omit for every page. At most 200 characters. |
text | string | 1 to 120 characters. Default "{page} / {total}". |
position | string | Where on the page the label goes. One of top, bottom. Default "bottom". |
output required | string | Path for the new PDF, inside an allowed folder. Must not exist yet; superPDF never overwrites files. |
Response
200 The result. Any new files are written inside the allowed folders.
| Field | Type |
|---|---|
output | string |
pages | integer |
bytes | integer |
Errors: 400, 401, 403, 409, 413, 415, 422, 429, 500. See Errors.
Example
curl -s http://127.0.0.1:7341/v1/tools/pdf_add_page_labels \
-H "Authorization: Bearer $SUPERPDF_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"input": "report.pdf",
"text": "Page {page} of {total}",
"output": "numbered.pdf"
}'import { callTool, type NewFile } from './superpdf.ts';
const result = await callTool<NewFile>('pdf_add_page_labels', {
input: 'report.pdf',
text: 'Page {page} of {total}',
output: 'numbered.pdf',
});
console.log(JSON.stringify(result, null, 2));
import json
from superpdf import call_tool
result = call_tool("pdf_add_page_labels", {
"input": "report.pdf",
"text": "Page {page} of {total}",
"output": "numbered.pdf",
})
print(json.dumps(result, indent=2))
package main
import (
"encoding/json"
"fmt"
"log"
)
func main() {
input := `{
"input": "report.pdf",
"text": "Page {page} of {total}",
"output": "numbered.pdf"
}`
result, err := CallTool[NewFile]("pdf_add_page_labels", json.RawMessage(input))
if err != nil {
log.Fatal(err)
}
out, _ := json.MarshalIndent(result, "", " ")
fmt.Println(string(out))
}
{
"output": "/Users/<you>/Documents/superPDF/numbered.pdf",
"pages": 4,
"bytes": 2773
}Add a watermark
POST/v1/tools/pdf_add_watermark
Stamp text diagonally across pages, such as DRAFT or CONFIDENTIAL.
Request body
| Field | Type | Description |
|---|---|---|
input required | string | Path to a PDF inside an allowed folder (absolute, or relative to the first allowed folder). |
pages | string | Page numbers or ranges, such as "1, 3-5". Omit for every page. At most 200 characters. |
text required | string | 1 to 60 characters. |
output required | string | Path for the new PDF, inside an allowed folder. Must not exist yet; superPDF never overwrites files. |
Response
200 The result. Any new files are written inside the allowed folders.
| Field | Type |
|---|---|
output | string |
pages | integer |
bytes | integer |
Errors: 400, 401, 403, 409, 413, 415, 422, 429, 500. See Errors.
Example
curl -s http://127.0.0.1:7341/v1/tools/pdf_add_watermark \
-H "Authorization: Bearer $SUPERPDF_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"input": "report.pdf",
"text": "DRAFT",
"output": "draft.pdf"
}'import { callTool, type NewFile } from './superpdf.ts';
const result = await callTool<NewFile>('pdf_add_watermark', {
input: 'report.pdf',
text: 'DRAFT',
output: 'draft.pdf',
});
console.log(JSON.stringify(result, null, 2));
import json
from superpdf import call_tool
result = call_tool("pdf_add_watermark", {
"input": "report.pdf",
"text": "DRAFT",
"output": "draft.pdf",
})
print(json.dumps(result, indent=2))
package main
import (
"encoding/json"
"fmt"
"log"
)
func main() {
input := `{
"input": "report.pdf",
"text": "DRAFT",
"output": "draft.pdf"
}`
result, err := CallTool[NewFile]("pdf_add_watermark", json.RawMessage(input))
if err != nil {
log.Fatal(err)
}
out, _ := json.MarshalIndent(result, "", " ")
fmt.Println(string(out))
}
{
"output": "/Users/<you>/Documents/superPDF/draft.pdf",
"pages": 4,
"bytes": 2917
}Split a PDF
POST/v1/tools/pdf_split
Split one PDF into several new files: one per comma-separated range (mode "ranges"), or one per page (mode "pages"). Files are written to output_folder.
Request body
| Field | Type | Description |
|---|---|---|
input required | string | Path to a PDF inside an allowed folder (absolute, or relative to the first allowed folder). |
pages | string | Page numbers or ranges, such as "1, 3-5". Omit for every page. At most 200 characters. |
mode | string | One of ranges, pages. Default "ranges". |
output_folder required | string | Folder for the new files, inside an allowed folder; created if missing. |
Response
200 The result. Any new files are written inside the allowed folders.
| Field | Type |
|---|---|
outputs | array of objects |
outputs[].output | string |
outputs[].pages | integer |
outputs[].bytes | integer |
Errors: 400, 401, 403, 409, 413, 415, 422, 429, 500. See Errors.
Example
curl -s http://127.0.0.1:7341/v1/tools/pdf_split \
-H "Authorization: Bearer $SUPERPDF_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"input": "report.pdf",
"mode": "pages",
"output_folder": "pages"
}'import { callTool } from './superpdf.ts';
const result = await callTool<Record<string, unknown>>('pdf_split', {
input: 'report.pdf',
mode: 'pages',
output_folder: 'pages',
});
console.log(JSON.stringify(result, null, 2));
import json
from superpdf import call_tool
result = call_tool("pdf_split", {
"input": "report.pdf",
"mode": "pages",
"output_folder": "pages",
})
print(json.dumps(result, indent=2))
package main
import (
"encoding/json"
"fmt"
"log"
)
func main() {
input := `{
"input": "report.pdf",
"mode": "pages",
"output_folder": "pages"
}`
result, err := CallTool[any]("pdf_split", json.RawMessage(input))
if err != nil {
log.Fatal(err)
}
out, _ := json.MarshalIndent(result, "", " ")
fmt.Println(string(out))
}
{
"outputs": [
{
"output": "/Users/<you>/Documents/superPDF/pages/report-page-1.pdf",
"pages": 1,
"bytes": 1003
},
{
"output": "/Users/<you>/Documents/superPDF/pages/report-page-2.pdf",
"pages": 1,
"bytes": 954
},
{
"output": "/Users/<you>/Documents/superPDF/pages/report-page-3.pdf",
"pages": 1,
"bytes": 948
},
{
"output": "/Users/<you>/Documents/superPDF/pages/report-page-4.pdf",
"pages": 1,
"bytes": 937
}
]
}Convert an Office file to PDF
POST/v1/tools/pdf_from_office
Convert a Word, Excel, PowerPoint or OpenDocument file (.docx, .xlsx, .pptx, .odt, .ods, .odp) to a new PDF with LibreOffice installed on this computer. Fails with an install hint when LibreOffice isn't installed.
Request body
| Field | Type | Description |
|---|---|---|
input required | string | Path to the Office file inside an allowed folder (absolute, or relative to the first allowed folder). |
output required | string | Path for the new PDF, inside an allowed folder. Must not exist yet; superPDF never overwrites files. |
Response
200 The result. Any new files are written inside the allowed folders.
| Field | Type |
|---|---|
output | string |
pages | integer |
bytes | integer |
engine | "LibreOffice" |
Errors: 400, 401, 403, 409, 413, 415, 422, 429, 500. See Errors.
Example
curl -s http://127.0.0.1:7341/v1/tools/pdf_from_office \
-H "Authorization: Bearer $SUPERPDF_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{ "input": "budget.xlsx", "output": "budget.pdf" }'import { callTool } from './superpdf.ts';
const result = await callTool<Record<string, unknown>>('pdf_from_office', {
input: 'budget.xlsx',
output: 'budget.pdf',
});
console.log(JSON.stringify(result, null, 2));
import json
from superpdf import call_tool
result = call_tool("pdf_from_office", {
"input": "budget.xlsx",
"output": "budget.pdf",
})
print(json.dumps(result, indent=2))
package main
import (
"encoding/json"
"fmt"
"log"
)
func main() {
input := `{ "input": "budget.xlsx", "output": "budget.pdf" }`
result, err := CallTool[any]("pdf_from_office", json.RawMessage(input))
if err != nil {
log.Fatal(err)
}
out, _ := json.MarshalIndent(result, "", " ")
fmt.Println(string(out))
}
{
"output": "/Users/<you>/Documents/superPDF/budget.pdf",
"pages": 2,
"bytes": 28304,
"engine": "LibreOffice"
}Remove document properties
POST/v1/tools/pdf_remove_metadata
Write a copy without author, title, subject, keywords, creator and producer properties.
Request body
| Field | Type | Description |
|---|---|---|
input required | string | Path to a PDF inside an allowed folder (absolute, or relative to the first allowed folder). |
output required | string | Path for the new PDF, inside an allowed folder. Must not exist yet; superPDF never overwrites files. |
Response
200 The result. Any new files are written inside the allowed folders.
| Field | Type |
|---|---|
output | string |
pages | integer |
bytes | integer |
Errors: 400, 401, 403, 409, 413, 415, 422, 429, 500. See Errors.
Example
curl -s http://127.0.0.1:7341/v1/tools/pdf_remove_metadata \
-H "Authorization: Bearer $SUPERPDF_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{ "input": "report.pdf", "output": "clean.pdf" }'import { callTool, type NewFile } from './superpdf.ts';
const result = await callTool<NewFile>('pdf_remove_metadata', {
input: 'report.pdf',
output: 'clean.pdf',
});
console.log(JSON.stringify(result, null, 2));
import json
from superpdf import call_tool
result = call_tool("pdf_remove_metadata", {
"input": "report.pdf",
"output": "clean.pdf",
})
print(json.dumps(result, indent=2))
package main
import (
"encoding/json"
"fmt"
"log"
)
func main() {
input := `{ "input": "report.pdf", "output": "clean.pdf" }`
result, err := CallTool[NewFile]("pdf_remove_metadata", json.RawMessage(input))
if err != nil {
log.Fatal(err)
}
out, _ := json.MarshalIndent(result, "", " ")
fmt.Println(string(out))
}
{
"output": "/Users/<you>/Documents/superPDF/clean.pdf",
"pages": 4,
"bytes": 1759
}Repair a PDF
POST/v1/tools/pdf_repair
Rewrite a damaged PDF and rebuild its cross-reference table. Reports what was fixed.
Request body
| Field | Type | Description |
|---|---|---|
input required | string | Path to a PDF inside an allowed folder (absolute, or relative to the first allowed folder). |
output required | string | Path for the new PDF, inside an allowed folder. Must not exist yet; superPDF never overwrites files. |
Response
200 The result. Any new files are written inside the allowed folders.
| Field | Type |
|---|---|
output | string |
pages | integer |
bytes | integer |
fixed | array of strings |
Errors: 400, 401, 403, 409, 413, 415, 422, 429, 500. See Errors.
Example
curl -s http://127.0.0.1:7341/v1/tools/pdf_repair \
-H "Authorization: Bearer $SUPERPDF_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{ "input": "report.pdf", "output": "repaired.pdf" }'import { callTool } from './superpdf.ts';
const result = await callTool<Record<string, unknown>>('pdf_repair', {
input: 'report.pdf',
output: 'repaired.pdf',
});
console.log(JSON.stringify(result, null, 2));
import json
from superpdf import call_tool
result = call_tool("pdf_repair", {
"input": "report.pdf",
"output": "repaired.pdf",
})
print(json.dumps(result, indent=2))
package main
import (
"encoding/json"
"fmt"
"log"
)
func main() {
input := `{ "input": "report.pdf", "output": "repaired.pdf" }`
result, err := CallTool[any]("pdf_repair", json.RawMessage(input))
if err != nil {
log.Fatal(err)
}
out, _ := json.MarshalIndent(result, "", " ")
fmt.Println(string(out))
}
{
"output": "/Users/<you>/Documents/superPDF/repaired.pdf",
"pages": 4,
"bytes": 1872,
"fixed": []
}Password-protect a PDF
POST/v1/tools/pdf_protect
Encrypt a copy with AES-256 so it needs a password to open. Only use a password the user gave you for this purpose.
Request body
| Field | Type | Description |
|---|---|---|
input required | string | Path to a PDF inside an allowed folder (absolute, or relative to the first allowed folder). |
password required | string | 1 to 127 characters. |
output required | string | Path for the new PDF, inside an allowed folder. Must not exist yet; superPDF never overwrites files. |
Response
200 The result. Any new files are written inside the allowed folders.
| Field | Type |
|---|---|
output | string |
pages | integer |
bytes | integer |
Errors: 400, 401, 403, 409, 413, 415, 422, 429, 500. See Errors.
Example
curl -s http://127.0.0.1:7341/v1/tools/pdf_protect \
-H "Authorization: Bearer $SUPERPDF_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"input": "report.pdf",
"password": "correct horse battery",
"output": "protected.pdf"
}'import { callTool, type NewFile } from './superpdf.ts';
const result = await callTool<NewFile>('pdf_protect', {
input: 'report.pdf',
password: 'correct horse battery',
output: 'protected.pdf',
});
console.log(JSON.stringify(result, null, 2));
import json
from superpdf import call_tool
result = call_tool("pdf_protect", {
"input": "report.pdf",
"password": "correct horse battery",
"output": "protected.pdf",
})
print(json.dumps(result, indent=2))
package main
import (
"encoding/json"
"fmt"
"log"
)
func main() {
input := `{
"input": "report.pdf",
"password": "correct horse battery",
"output": "protected.pdf"
}`
result, err := CallTool[NewFile]("pdf_protect", json.RawMessage(input))
if err != nil {
log.Fatal(err)
}
out, _ := json.MarshalIndent(result, "", " ")
fmt.Println(string(out))
}
{
"output": "/Users/<you>/Documents/superPDF/protected.pdf",
"pages": 4,
"bytes": 2648
}Remove a PDF password
POST/v1/tools/pdf_unlock
Write a decrypted copy using a password the user knows. Never guesses passwords.
Request body
| Field | Type | Description |
|---|---|---|
input required | string | Path to a PDF inside an allowed folder (absolute, or relative to the first allowed folder). |
password | string | At most 127 characters. Default "". |
output required | string | Path for the new PDF, inside an allowed folder. Must not exist yet; superPDF never overwrites files. |
Response
200 The result. Any new files are written inside the allowed folders.
| Field | Type |
|---|---|
output | string |
pages | integer |
bytes | integer |
Errors: 400, 401, 403, 409, 413, 415, 422, 429, 500. See Errors.
Example
curl -s http://127.0.0.1:7341/v1/tools/pdf_unlock \
-H "Authorization: Bearer $SUPERPDF_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"input": "protected.pdf",
"password": "correct horse battery",
"output": "unlocked.pdf"
}'import { callTool, type NewFile } from './superpdf.ts';
const result = await callTool<NewFile>('pdf_unlock', {
input: 'protected.pdf',
password: 'correct horse battery',
output: 'unlocked.pdf',
});
console.log(JSON.stringify(result, null, 2));
import json
from superpdf import call_tool
result = call_tool("pdf_unlock", {
"input": "protected.pdf",
"password": "correct horse battery",
"output": "unlocked.pdf",
})
print(json.dumps(result, indent=2))
package main
import (
"encoding/json"
"fmt"
"log"
)
func main() {
input := `{
"input": "protected.pdf",
"password": "correct horse battery",
"output": "unlocked.pdf"
}`
result, err := CallTool[NewFile]("pdf_unlock", json.RawMessage(input))
if err != nil {
log.Fatal(err)
}
out, _ := json.MarshalIndent(result, "", " ")
fmt.Println(string(out))
}
{
"output": "/Users/<you>/Documents/superPDF/unlocked.pdf",
"pages": 4,
"bytes": 1976
}Run a pipeline
POST/v1/tools/pdf_run_pipeline
Apply 1–10 steps in order and write one new PDF. Step actions: extract, remove, rotate, crop, scale, flatten, labels, watermark, metadata-clear; options as in the matching tools (e.g. {"action":"rotate","options":{"pages":"1","angle":90}}).
Request body
| Field | Type | Description |
|---|---|---|
input required | string | Path to a PDF inside an allowed folder (absolute, or relative to the first allowed folder). |
steps required | array of objects | Steps run in order, such as [{"action":"rotate","options":{"pages":"1","angle":90}}]. 1 to 10 items. |
output required | string | Path for the new PDF, inside an allowed folder. Must not exist yet; superPDF never overwrites files. |
Response
200 The result. Any new files are written inside the allowed folders.
| Field | Type |
|---|---|
output | string |
pages | integer |
bytes | integer |
Errors: 400, 401, 403, 409, 413, 415, 422, 429, 500. See Errors.
Example
curl -s http://127.0.0.1:7341/v1/tools/pdf_run_pipeline \
-H "Authorization: Bearer $SUPERPDF_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"input": "report.pdf",
"steps": [
{"action": "extract", "options": {"pages": "1-2"}},
{"action": "labels", "options": {"text": "{page} / {total}"}}
],
"output": "brief.pdf"
}'import { callTool, type NewFile } from './superpdf.ts';
const result = await callTool<NewFile>('pdf_run_pipeline', {
input: 'report.pdf',
steps: [
{ action: 'extract', options: { pages: '1-2' } },
{ action: 'labels', options: { text: '{page} / {total}' } },
],
output: 'brief.pdf',
});
console.log(JSON.stringify(result, null, 2));
import json
from superpdf import call_tool
result = call_tool("pdf_run_pipeline", {
"input": "report.pdf",
"steps": [
{"action": "extract", "options": {"pages": "1-2"}},
{"action": "labels", "options": {"text": "{page} / {total}"}},
],
"output": "brief.pdf",
})
print(json.dumps(result, indent=2))
package main
import (
"encoding/json"
"fmt"
"log"
)
func main() {
input := `{
"input": "report.pdf",
"steps": [
{"action": "extract", "options": {"pages": "1-2"}},
{"action": "labels", "options": {"text": "{page} / {total}"}}
],
"output": "brief.pdf"
}`
result, err := CallTool[NewFile]("pdf_run_pipeline", json.RawMessage(input))
if err != nil {
log.Fatal(err)
}
out, _ := json.MarshalIndent(result, "", " ")
fmt.Println(string(out))
}
{
"output": "/Users/<you>/Documents/superPDF/brief.pdf",
"pages": 2,
"bytes": 1843
}Run a batch
POST/v1/tools/pdf_run_batch
Apply the same 1–10 pipeline steps to each of 1–50 PDFs, one file at a time. Each result is written to output_folder as <name>-<suffix>.pdf. A file that fails is skipped and listed in failed with the reason; the rest continue.
Request body
| Field | Type | Description |
|---|---|---|
inputs required | array of strings | PDF paths to process. 1 to 50 items. |
steps required | array of objects | Steps run in order, such as [{"action":"rotate","options":{"pages":"1","angle":90}}]. 1 to 10 items. |
output_folder required | string | Folder for the new files, inside an allowed folder; created if missing. |
suffix | string | Added to each output file name. Matches ^[A-Za-z0-9_-]{1,40}$. Default "processed". |
Response
200 The result. Any new files are written inside the allowed folders.
| Field | Type |
|---|---|
outputs | array of objects |
outputs[].output | string |
outputs[].pages | integer |
outputs[].bytes | integer |
outputs[].input | string |
failed | array of objects |
failed[].input | string |
failed[].error | string |
Errors: 400, 401, 403, 409, 413, 415, 422, 429, 500. See Errors.
Example
curl -s http://127.0.0.1:7341/v1/tools/pdf_run_batch \
-H "Authorization: Bearer $SUPERPDF_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"inputs": ["report.pdf", "appendix.pdf"],
"steps": [{"action": "watermark", "options": {"text": "DRAFT"}}],
"output_folder": "drafts"
}'import { callTool, type BatchResult } from './superpdf.ts';
const result = await callTool<BatchResult>('pdf_run_batch', {
inputs: ['report.pdf', 'appendix.pdf'],
steps: [{ action: 'watermark', options: { text: 'DRAFT' } }],
output_folder: 'drafts',
});
console.log(JSON.stringify(result, null, 2));
import json
from superpdf import call_tool
result = call_tool("pdf_run_batch", {
"inputs": ["report.pdf", "appendix.pdf"],
"steps": [{"action": "watermark", "options": {"text": "DRAFT"}}],
"output_folder": "drafts",
})
print(json.dumps(result, indent=2))
package main
import (
"encoding/json"
"fmt"
"log"
)
func main() {
input := `{
"inputs": ["report.pdf", "appendix.pdf"],
"steps": [{"action": "watermark", "options": {"text": "DRAFT"}}],
"output_folder": "drafts"
}`
result, err := CallTool[BatchResult]("pdf_run_batch", json.RawMessage(input))
if err != nil {
log.Fatal(err)
}
out, _ := json.MarshalIndent(result, "", " ")
fmt.Println(string(out))
}
{
"outputs": [
{
"input": "/Users/<you>/Documents/superPDF/report.pdf",
"output": "/Users/<you>/Documents/superPDF/drafts/report-processed.pdf",
"pages": 4,
"bytes": 2917
},
{
"input": "/Users/<you>/Documents/superPDF/appendix.pdf",
"output": "/Users/<you>/Documents/superPDF/drafts/appendix-processed.pdf",
"pages": 1,
"bytes": 1405
}
],
"failed": []
}PDF to Word
POST/v1/tools/pdf_to_docx
Convert a PDF to an editable Word document (.docx): headings, paragraphs with bold and italic, lists and tables. Scanned pages are read with OCR. Page layout and images are not reconstructed.
Request body
| Field | Type | Description |
|---|---|---|
input required | string | Path to a PDF inside an allowed folder (absolute, or relative to the first allowed folder). |
pages | string | Page numbers or ranges, such as "1, 3-5". Omit for every page. At most 200 characters. |
output required | string | Path for the new Word document (ending in .docx), inside an allowed folder. Must not exist yet. |
Response
200 The result. Any new files are written inside the allowed folders.
| Field | Type |
|---|---|
output | string |
bytes | integer |
pages | integer |
paragraphs | integer |
tables | integer |
Errors: 400, 401, 403, 409, 413, 415, 422, 429, 500. See Errors.
Example
curl -s http://127.0.0.1:7341/v1/tools/pdf_to_docx \
-H "Authorization: Bearer $SUPERPDF_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{ "input": "quarterly.pdf", "output": "quarterly.docx" }'import { callTool } from './superpdf.ts';
const result = await callTool<Record<string, unknown>>('pdf_to_docx', {
input: 'quarterly.pdf',
output: 'quarterly.docx',
});
console.log(JSON.stringify(result, null, 2));
import json
from superpdf import call_tool
result = call_tool("pdf_to_docx", {
"input": "quarterly.pdf",
"output": "quarterly.docx",
})
print(json.dumps(result, indent=2))
package main
import (
"encoding/json"
"fmt"
"log"
)
func main() {
input := `{ "input": "quarterly.pdf", "output": "quarterly.docx" }`
result, err := CallTool[any]("pdf_to_docx", json.RawMessage(input))
if err != nil {
log.Fatal(err)
}
out, _ := json.MarshalIndent(result, "", " ")
fmt.Println(string(out))
}
{
"output": "/Users/<you>/Documents/superPDF/quarterly.docx",
"bytes": 10116,
"pages": 1,
"paragraphs": 3,
"tables": 2
}Extract tables from a PDF
POST/v1/tools/pdf_extract_tables
Find the tables in a PDF (ruled, shaded and borderless, plus charts drawn as vectors, as tables of their values) and write them as Excel (.xlsx, one sheet per table), CSV, JSON or Markdown. The output name must end in the format's extension (.xlsx, .csv, .json, .md).
Request body
| Field | Type | Description |
|---|---|---|
input required | string | Path to a PDF inside an allowed folder (absolute, or relative to the first allowed folder). |
pages | string | Page numbers or ranges, such as "1, 3-5". Omit for every page. At most 200 characters. |
format | string | One of xlsx, csv, json, markdown. Default "xlsx". |
output required | string | Path for the new file, ending in .xlsx, .csv, .json or .md to match the format, inside an allowed folder. Must not exist yet. |
Response
200 The result. Any new files are written inside the allowed folders.
| Field | Type |
|---|---|
output | string |
bytes | integer |
format | string |
tables | integer |
Errors: 400, 401, 403, 409, 413, 415, 422, 429, 500. See Errors.
Example
curl -s http://127.0.0.1:7341/v1/tools/pdf_extract_tables \
-H "Authorization: Bearer $SUPERPDF_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"input": "quarterly.pdf",
"format": "csv",
"output": "tables.csv"
}'import { callTool } from './superpdf.ts';
const result = await callTool<Record<string, unknown>>('pdf_extract_tables', {
input: 'quarterly.pdf',
format: 'csv',
output: 'tables.csv',
});
console.log(JSON.stringify(result, null, 2));
import json
from superpdf import call_tool
result = call_tool("pdf_extract_tables", {
"input": "quarterly.pdf",
"format": "csv",
"output": "tables.csv",
})
print(json.dumps(result, indent=2))
package main
import (
"encoding/json"
"fmt"
"log"
)
func main() {
input := `{
"input": "quarterly.pdf",
"format": "csv",
"output": "tables.csv"
}`
result, err := CallTool[any]("pdf_extract_tables", json.RawMessage(input))
if err != nil {
log.Fatal(err)
}
out, _ := json.MarshalIndent(result, "", " ")
fmt.Println(string(out))
}
{
"output": "/Users/<you>/Documents/superPDF/tables.csv",
"bytes": 115,
"format": "csv",
"tables": 2
}Fill a PDF form
POST/v1/tools/pdf_fill_form
Fill form fields by name (pdf_info lists them): text fields take text, check boxes true or false, choices one of their options. With flatten, the filled values become part of the page and can no longer be edited.
Request body
| Field | Type | Description |
|---|---|---|
input required | string | Path to a PDF inside an allowed folder (absolute, or relative to the first allowed folder). |
values required | object | Field name → value, such as {"Name": "Ada Lovelace", "Agree": true}. |
flatten | boolean | Make the filled values part of the page (no longer editable). Default false. |
output required | string | Path for the new PDF, inside an allowed folder. Must not exist yet; superPDF never overwrites files. |
Response
200 The result. Any new files are written inside the allowed folders.
| Field | Type |
|---|---|
output | string |
pages | integer |
bytes | integer |
Errors: 400, 401, 403, 409, 413, 415, 422, 429, 500. See Errors.
Example
curl -s http://127.0.0.1:7341/v1/tools/pdf_fill_form \
-H "Authorization: Bearer $SUPERPDF_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"input": "form.pdf",
"values": {"Name": "Ada Lovelace", "Agree": true},
"output": "filled.pdf"
}'import { callTool, type NewFile } from './superpdf.ts';
const result = await callTool<NewFile>('pdf_fill_form', {
input: 'form.pdf',
values: { Name: 'Ada Lovelace', Agree: true },
output: 'filled.pdf',
});
console.log(JSON.stringify(result, null, 2));
import json
from superpdf import call_tool
result = call_tool("pdf_fill_form", {
"input": "form.pdf",
"values": {"Name": "Ada Lovelace", "Agree": true},
"output": "filled.pdf",
})
print(json.dumps(result, indent=2))
package main
import (
"encoding/json"
"fmt"
"log"
)
func main() {
input := `{
"input": "form.pdf",
"values": {"Name": "Ada Lovelace", "Agree": true},
"output": "filled.pdf"
}`
result, err := CallTool[NewFile]("pdf_fill_form", json.RawMessage(input))
if err != nil {
log.Fatal(err)
}
out, _ := json.MarshalIndent(result, "", " ")
fmt.Println(string(out))
}
{
"output": "/Users/<you>/Documents/superPDF/filled.pdf",
"pages": 1,
"bytes": 2715
}Add text or a typed signature
POST/v1/tools/pdf_add_text
Draw text (such as a typed signature, a date or a note) at a position on the chosen pages. x and y are in points from the bottom-left corner of the page. Latin characters only.
Request body
| Field | Type | Description |
|---|---|---|
input required | string | Path to a PDF inside an allowed folder (absolute, or relative to the first allowed folder). |
pages | string | Page numbers or ranges, such as "1, 3-5". Omit for every page. At most 200 characters. |
text required | string | 1 to 200 characters. |
x | number | Points from the left edge. Default 36. |
y | number | Points from the bottom edge. Default 36. |
size | number | Font size in points. 6 to 72. Default 12. |
output required | string | Path for the new PDF, inside an allowed folder. Must not exist yet; superPDF never overwrites files. |
Response
200 The result. Any new files are written inside the allowed folders.
| Field | Type |
|---|---|
output | string |
pages | integer |
bytes | integer |
Errors: 400, 401, 403, 409, 413, 415, 422, 429, 500. See Errors.
Example
curl -s http://127.0.0.1:7341/v1/tools/pdf_add_text \
-H "Authorization: Bearer $SUPERPDF_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"input": "report.pdf",
"pages": "1",
"text": "Approved: Ada Lovelace",
"x": 72,
"y": 72,
"output": "approved.pdf"
}'import { callTool, type NewFile } from './superpdf.ts';
const result = await callTool<NewFile>('pdf_add_text', {
input: 'report.pdf',
pages: '1',
text: 'Approved: Ada Lovelace',
x: 72,
y: 72,
output: 'approved.pdf',
});
console.log(JSON.stringify(result, null, 2));
import json
from superpdf import call_tool
result = call_tool("pdf_add_text", {
"input": "report.pdf",
"pages": "1",
"text": "Approved: Ada Lovelace",
"x": 72,
"y": 72,
"output": "approved.pdf",
})
print(json.dumps(result, indent=2))
package main
import (
"encoding/json"
"fmt"
"log"
)
func main() {
input := `{
"input": "report.pdf",
"pages": "1",
"text": "Approved: Ada Lovelace",
"x": 72,
"y": 72,
"output": "approved.pdf"
}`
result, err := CallTool[NewFile]("pdf_add_text", json.RawMessage(input))
if err != nil {
log.Fatal(err)
}
out, _ := json.MarshalIndent(result, "", " ")
fmt.Println(string(out))
}
{
"output": "/Users/<you>/Documents/superPDF/approved.pdf",
"pages": 4,
"bytes": 2196
}Flatten a PDF
POST/v1/tools/pdf_flatten
Make form fields part of the page, so their values show everywhere and can no longer be edited.
Request body
| Field | Type | Description |
|---|---|---|
input required | string | Path to a PDF inside an allowed folder (absolute, or relative to the first allowed folder). |
output required | string | Path for the new PDF, inside an allowed folder. Must not exist yet; superPDF never overwrites files. |
Response
200 The result. Any new files are written inside the allowed folders.
| Field | Type |
|---|---|
output | string |
pages | integer |
bytes | integer |
Errors: 400, 401, 403, 409, 413, 415, 422, 429, 500. See Errors.
Example
curl -s http://127.0.0.1:7341/v1/tools/pdf_flatten \
-H "Authorization: Bearer $SUPERPDF_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{ "input": "form.pdf", "output": "flat.pdf" }'import { callTool, type NewFile } from './superpdf.ts';
const result = await callTool<NewFile>('pdf_flatten', {
input: 'form.pdf',
output: 'flat.pdf',
});
console.log(JSON.stringify(result, null, 2));
import json
from superpdf import call_tool
result = call_tool("pdf_flatten", {
"input": "form.pdf",
"output": "flat.pdf",
})
print(json.dumps(result, indent=2))
package main
import (
"encoding/json"
"fmt"
"log"
)
func main() {
input := `{ "input": "form.pdf", "output": "flat.pdf" }`
result, err := CallTool[NewFile]("pdf_flatten", json.RawMessage(input))
if err != nil {
log.Fatal(err)
}
out, _ := json.MarshalIndent(result, "", " ")
fmt.Println(string(out))
}
{
"output": "/Users/<you>/Documents/superPDF/flat.pdf",
"pages": 1,
"bytes": 2465
}Crop or scale pages
POST/v1/tools/pdf_resize_pages
Crop a margin from each edge (mode crop, margin in points) or scale page content (mode scale, factor 0.1–4).
Request body
| Field | Type | Description |
|---|---|---|
input required | string | Path to a PDF inside an allowed folder (absolute, or relative to the first allowed folder). |
pages | string | Page numbers or ranges, such as "1, 3-5". Omit for every page. At most 200 characters. |
mode required | string | One of crop, scale. |
margin | number | Points trimmed from each edge (crop). 0 to 500. Default 24. |
factor | number | Scale factor (scale). 0.1 to 4. Default 1. |
output required | string | Path for the new PDF, inside an allowed folder. Must not exist yet; superPDF never overwrites files. |
Response
200 The result. Any new files are written inside the allowed folders.
| Field | Type |
|---|---|
output | string |
pages | integer |
bytes | integer |
Errors: 400, 401, 403, 409, 413, 415, 422, 429, 500. See Errors.
Example
curl -s http://127.0.0.1:7341/v1/tools/pdf_resize_pages \
-H "Authorization: Bearer $SUPERPDF_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"input": "report.pdf",
"mode": "crop",
"margin": 36,
"output": "cropped.pdf"
}'import { callTool, type NewFile } from './superpdf.ts';
const result = await callTool<NewFile>('pdf_resize_pages', {
input: 'report.pdf',
mode: 'crop',
margin: 36,
output: 'cropped.pdf',
});
console.log(JSON.stringify(result, null, 2));
import json
from superpdf import call_tool
result = call_tool("pdf_resize_pages", {
"input": "report.pdf",
"mode": "crop",
"margin": 36,
"output": "cropped.pdf",
})
print(json.dumps(result, indent=2))
package main
import (
"encoding/json"
"fmt"
"log"
)
func main() {
input := `{
"input": "report.pdf",
"mode": "crop",
"margin": 36,
"output": "cropped.pdf"
}`
result, err := CallTool[NewFile]("pdf_resize_pages", json.RawMessage(input))
if err != nil {
log.Fatal(err)
}
out, _ := json.MarshalIndent(result, "", " ")
fmt.Println(string(out))
}
{
"output": "/Users/<you>/Documents/superPDF/cropped.pdf",
"pages": 4,
"bytes": 1818
}Images to PDF
POST/v1/tools/pdf_from_images
Make a PDF from JPG or PNG images, one page per image, in the order given.
Request body
| Field | Type | Description |
|---|---|---|
inputs required | array of strings | 1 to 200 items. |
output required | string | Path for the new PDF, inside an allowed folder. Must not exist yet; superPDF never overwrites files. |
Response
200 The result. Any new files are written inside the allowed folders.
| Field | Type |
|---|---|
output | string |
pages | integer |
bytes | integer |
Errors: 400, 401, 403, 409, 413, 415, 422, 429, 500. See Errors.
Example
curl -s http://127.0.0.1:7341/v1/tools/pdf_from_images \
-H "Authorization: Bearer $SUPERPDF_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{ "inputs": ["photo.jpg"], "output": "photo.pdf" }'import { callTool, type NewFile } from './superpdf.ts';
const result = await callTool<NewFile>('pdf_from_images', {
inputs: ['photo.jpg'],
output: 'photo.pdf',
});
console.log(JSON.stringify(result, null, 2));
import json
from superpdf import call_tool
result = call_tool("pdf_from_images", {
"inputs": ["photo.jpg"],
"output": "photo.pdf",
})
print(json.dumps(result, indent=2))
package main
import (
"encoding/json"
"fmt"
"log"
)
func main() {
input := `{ "inputs": ["photo.jpg"], "output": "photo.pdf" }`
result, err := CallTool[NewFile]("pdf_from_images", json.RawMessage(input))
if err != nil {
log.Fatal(err)
}
out, _ := json.MarshalIndent(result, "", " ")
fmt.Println(string(out))
}
{
"output": "/Users/<you>/Documents/superPDF/photo.pdf",
"pages": 1,
"bytes": 2165
}Markdown to PDF
POST/v1/tools/pdf_from_markdown
Typeset a Markdown file (headings, paragraphs, lists, tables, code, links) as a PDF on A4 or Letter pages.
Request body
| Field | Type | Description |
|---|---|---|
input required | string | Path to a Markdown file (.md) inside an allowed folder. |
page_size | string | One of A4, Letter. Default "A4". |
title | string | At most 200 characters. |
output required | string | Path for the new PDF, inside an allowed folder. Must not exist yet; superPDF never overwrites files. |
Response
200 The result. Any new files are written inside the allowed folders.
| Field | Type |
|---|---|
output | string |
pages | integer |
bytes | integer |
Errors: 400, 401, 403, 409, 413, 415, 422, 429, 500. See Errors.
Example
curl -s http://127.0.0.1:7341/v1/tools/pdf_from_markdown \
-H "Authorization: Bearer $SUPERPDF_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"input": "notes.md",
"page_size": "Letter",
"output": "notes.pdf"
}'import { callTool, type NewFile } from './superpdf.ts';
const result = await callTool<NewFile>('pdf_from_markdown', {
input: 'notes.md',
page_size: 'Letter',
output: 'notes.pdf',
});
console.log(JSON.stringify(result, null, 2));
import json
from superpdf import call_tool
result = call_tool("pdf_from_markdown", {
"input": "notes.md",
"page_size": "Letter",
"output": "notes.pdf",
})
print(json.dumps(result, indent=2))
package main
import (
"encoding/json"
"fmt"
"log"
)
func main() {
input := `{
"input": "notes.md",
"page_size": "Letter",
"output": "notes.pdf"
}`
result, err := CallTool[NewFile]("pdf_from_markdown", json.RawMessage(input))
if err != nil {
log.Fatal(err)
}
out, _ := json.MarshalIndent(result, "", " ")
fmt.Println(string(out))
}
{
"output": "/Users/<you>/Documents/superPDF/notes.pdf",
"pages": 1,
"bytes": 1318
}PDF to PowerPoint
POST/v1/tools/pdf_to_pptx
Convert a PDF to a PowerPoint file (.pptx) with one slide per page and its text as editable text boxes.
Request body
| Field | Type | Description |
|---|---|---|
input required | string | Path to a PDF inside an allowed folder (absolute, or relative to the first allowed folder). |
pages | string | Page numbers or ranges, such as "1, 3-5". Omit for every page. At most 200 characters. |
output required | string | Path for the new PowerPoint file (ending in .pptx), inside an allowed folder. Must not exist yet. |
Response
200 The result. Any new files are written inside the allowed folders.
| Field | Type |
|---|---|
output | string |
bytes | integer |
slides | integer |
empty_pages | array of integers |
Errors: 400, 401, 403, 409, 413, 415, 422, 429, 500. See Errors.
Example
curl -s http://127.0.0.1:7341/v1/tools/pdf_to_pptx \
-H "Authorization: Bearer $SUPERPDF_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{ "input": "quarterly.pdf", "output": "quarterly.pptx" }'import { callTool } from './superpdf.ts';
const result = await callTool<Record<string, unknown>>('pdf_to_pptx', {
input: 'quarterly.pdf',
output: 'quarterly.pptx',
});
console.log(JSON.stringify(result, null, 2));
import json
from superpdf import call_tool
result = call_tool("pdf_to_pptx", {
"input": "quarterly.pdf",
"output": "quarterly.pptx",
})
print(json.dumps(result, indent=2))
package main
import (
"encoding/json"
"fmt"
"log"
)
func main() {
input := `{ "input": "quarterly.pdf", "output": "quarterly.pptx" }`
result, err := CallTool[any]("pdf_to_pptx", json.RawMessage(input))
if err != nil {
log.Fatal(err)
}
out, _ := json.MarshalIndent(result, "", " ")
fmt.Println(string(out))
}
{
"output": "/Users/<you>/Documents/superPDF/quarterly.pptx",
"bytes": 68790,
"slides": 1,
"empty_pages": []
}PDF to EPUB
POST/v1/tools/pdf_to_epub
Convert a PDF's text into an EPUB 3 e-book, split into chapters at headings (or every few pages).
Request body
| Field | Type | Description |
|---|---|---|
input required | string | Path to a PDF inside an allowed folder (absolute, or relative to the first allowed folder). |
title | string | At most 200 characters. |
author | string | At most 200 characters. |
language | string | Language tag, such as en or pt-BR. Matches ^[a-zA-Z]{2,3}(-[a-zA-Z0-9]{2,8})*$. Default "en". |
split | string | One of headings, pages. Default "headings". |
output required | string | Path for the new e-book (ending in .epub), inside an allowed folder. Must not exist yet. |
Response
200 The result. Any new files are written inside the allowed folders.
| Field | Type |
|---|---|
output | string |
bytes | integer |
chapters | integer |
Errors: 400, 401, 403, 409, 413, 415, 422, 429, 500. See Errors.
Example
curl -s http://127.0.0.1:7341/v1/tools/pdf_to_epub \
-H "Authorization: Bearer $SUPERPDF_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"input": "report.pdf",
"author": "Finance team",
"output": "report.epub"
}'import { callTool } from './superpdf.ts';
const result = await callTool<Record<string, unknown>>('pdf_to_epub', {
input: 'report.pdf',
author: 'Finance team',
output: 'report.epub',
});
console.log(JSON.stringify(result, null, 2));
import json
from superpdf import call_tool
result = call_tool("pdf_to_epub", {
"input": "report.pdf",
"author": "Finance team",
"output": "report.epub",
})
print(json.dumps(result, indent=2))
package main
import (
"encoding/json"
"fmt"
"log"
)
func main() {
input := `{
"input": "report.pdf",
"author": "Finance team",
"output": "report.epub"
}`
result, err := CallTool[any]("pdf_to_epub", json.RawMessage(input))
if err != nil {
log.Fatal(err)
}
out, _ := json.MarshalIndent(result, "", " ")
fmt.Println(string(out))
}
{
"output": "/Users/<you>/Documents/superPDF/report.epub",
"bytes": 2572,
"chapters": 1
}Compare two PDFs
POST/v1/tools/pdf_compare
Compare the text of two versions of a PDF page by page: which pages changed, were added or removed, and the words that changed, marked [-removed-] and {+added+}.
Request body
| Field | Type | Description |
|---|---|---|
before required | string | Path to the earlier PDF inside an allowed folder. |
after required | string | Path to the revised PDF inside an allowed folder. |
max_chars | integer | Most characters of marked text returned per page. 100 to 400,000. Default 20000. |
Response
200 The result. Any new files are written inside the allowed folders.
| Field | Type | Description |
|---|---|---|
summary | string | None |
pages | array of objects | None |
pages[].page | integer | None |
pages[].status | string | One of same, changed, added, removed. |
pages[].words_removed | integer | None |
pages[].words_added | integer | None |
pages[].changes | string | None |
Errors: 400, 401, 403, 409, 413, 415, 422, 429, 500. See Errors.
Example
curl -s http://127.0.0.1:7341/v1/tools/pdf_compare \
-H "Authorization: Bearer $SUPERPDF_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{ "before": "report.pdf", "after": "approved.pdf" }'import { callTool } from './superpdf.ts';
const result = await callTool<Record<string, unknown>>('pdf_compare', {
before: 'report.pdf',
after: 'approved.pdf',
});
console.log(JSON.stringify(result, null, 2));
import json
from superpdf import call_tool
result = call_tool("pdf_compare", {
"before": "report.pdf",
"after": "approved.pdf",
})
print(json.dumps(result, indent=2))
package main
import (
"encoding/json"
"fmt"
"log"
)
func main() {
input := `{ "before": "report.pdf", "after": "approved.pdf" }`
result, err := CallTool[any]("pdf_compare", json.RawMessage(input))
if err != nil {
log.Fatal(err)
}
out, _ := json.MarshalIndent(result, "", " ")
fmt.Println(string(out))
}
{
"summary": "1 of 4 pages changed: page 1.",
"pages": [
{
"page": 1,
"status": "changed",
"words_removed": 0,
"words_added": 3,
"changes": "Quarterly report Summary Revenue grew 12% on the same quarter last…"
},
{
"page": 2,
"status": "same",
"words_removed": 0,
"words_added": 0,
"changes": ""
},
{
"page": 3,
"status": "same",
"words_removed": 0,
"words_added": 0,
"changes": ""
},
{
"page": 4,
"status": "same",
"words_removed": 0,
"words_added": 0,
"changes": ""
}
]
}Outline of a PDF
POST/v1/tools/pdf_outline
The document's outline (from bookmarks or detected headings) as a Markdown list or JSON tree, with the pages each section covers.
Request body
| Field | Type | Description |
|---|---|---|
input required | string | Path to a PDF inside an allowed folder (absolute, or relative to the first allowed folder). |
format | string | One of markdown, json. Default "markdown". |
Response
200 The result. Any new files are written inside the allowed folders.
| Field | Type |
|---|---|
format | string |
content | string |
sections | array of anys |
Errors: 400, 401, 403, 409, 413, 415, 422, 429, 500. See Errors.
Example
curl -s http://127.0.0.1:7341/v1/tools/pdf_outline \
-H "Authorization: Bearer $SUPERPDF_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{ "input": "report.pdf" }'import { callTool } from './superpdf.ts';
const result = await callTool<Record<string, unknown>>('pdf_outline', {
input: 'report.pdf',
});
console.log(JSON.stringify(result, null, 2));
import json
from superpdf import call_tool
result = call_tool("pdf_outline", {
"input": "report.pdf",
})
print(json.dumps(result, indent=2))
package main
import (
"encoding/json"
"fmt"
"log"
)
func main() {
input := `{ "input": "report.pdf" }`
result, err := CallTool[any]("pdf_outline", json.RawMessage(input))
if err != nil {
log.Fatal(err)
}
out, _ := json.MarshalIndent(result, "", " ")
fmt.Println(string(out))
}
{
"format": "markdown",
"content": "# report\n\n- Quarterly report (pp. 1–4)\n - Summary (pp. 1–2)\n - …",
"sections": [
{
"title": "Quarterly report",
"level": 1,
"startPage": 1,
"id": "n1",
"endPage": 4,
"children": [
{
"title": "Summary",
"level": 2,
"startPage": 1,
"id": "n2",
"endPage": 2,
"children": []
},
{
"title": "Revenue",
"level": 2,
"startPage": 2,
"id": "n3",
"endPage": 3,
"children": []
},
{
"title": "Outlook",
"level": 2,
"startPage": 3,
"id": "n4",
"endPage": 4,
"children": []
},
{
"title": "Appendix",
"level": 2,
"startPage": 4,
"id": "n5",
"endPage": 4,
"children": []
}
]
}
]
}Run a tool in the background
POST/v1/jobs
Queues a tool call and returns at once with the job. Jobs run one at a time. Poll GET /v1/jobs/{id}, or pass callback_url to receive a signed event when it finishes. Failed callback deliveries are retried up to 5 times with exponential backoff (1, 2, 4 and 8 seconds).
Request body
| Field | Type | Description |
|---|---|---|
tool required | string | The tool to run: any name from GET /v1/tools. |
input required | object | The tool’s input: the same fields as its own endpoint below. |
callback_url | string | Where to POST a signed event when the job finishes. Loopback addresses (127.0.0.1, localhost, [::1]) are allowed by default; other origins only when the API was started with --webhook-allow <origin>. At most 2,048 characters. |
Response
202 Queued.
| Field | Type | Description |
|---|---|---|
id | string | None |
tool | string | None |
status | string | One of queued, running, succeeded, failed. |
progress | object or null | Latest progress from tools that report it (merge, split, pipelines, batches). |
progress.progress | number | None |
progress.total | number | None |
progress.message | string | None |
created_at | string | ISO 8601 time. |
started_at | string or null | None |
finished_at | string or null | None |
result | any | Once succeeded: the same result POST /v1/tools/{tool} returns. |
error | problem details object | RFC 9457 Problem Details. |
callback | object | None |
callback.url | string | None |
callback.status | string | One of pending, delivering, delivered, failed. |
callback.attempts | integer | None |
callback.last_status | integer or null | HTTP status of the last attempt; null when the receiver could not be reached. |
Errors: 400, 401, 403, 413, 415, 422, 429. See Errors.
Example
curl http://127.0.0.1:7341/v1/jobs \
-H "Authorization: Bearer $SUPERPDF_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"tool": "pdf_run_batch",
"input": {
"inputs": ["report.pdf", "appendix.pdf"],
"steps": [{ "action": "watermark", "options": { "text": "DRAFT" } }],
"output_folder": "drafts"
},
"callback_url": "http://127.0.0.1:8080/hooks/superpdf"
}'import { request, type BatchResult, type Job } from './superpdf.ts';
const job = await request<Job<BatchResult>>('POST', '/v1/jobs', {
tool: 'pdf_run_batch',
input: {
inputs: ['report.pdf', 'appendix.pdf'],
steps: [{ action: 'watermark', options: { text: 'DRAFT' } }],
output_folder: 'drafts',
},
callback_url: 'http://127.0.0.1:8080/hooks/superpdf',
});
console.log(`${job.id} is ${job.status}`);
from superpdf import Job, request
job: Job = request("POST", "/v1/jobs", {
"tool": "pdf_run_batch",
"input": {
"inputs": ["report.pdf", "appendix.pdf"],
"steps": [{"action": "watermark", "options": {"text": "DRAFT"}}],
"output_folder": "drafts",
},
"callback_url": "http://127.0.0.1:8080/hooks/superpdf",
})
print(f"{job['id']} is {job['status']}")
package main
import (
"fmt"
"log"
)
func main() {
var job Job[BatchResult]
err := Request("POST", "/v1/jobs", map[string]any{
"tool": "pdf_run_batch",
"input": map[string]any{
"inputs": []string{"report.pdf", "appendix.pdf"},
"steps": []map[string]any{
{"action": "watermark", "options": map[string]string{"text": "DRAFT"}},
},
"output_folder": "drafts",
},
"callback_url": "http://127.0.0.1:8080/hooks/superpdf",
}, &job)
if err != nil {
log.Fatal(err)
}
fmt.Printf("%s is %s\n", job.ID, job.Status)
}
HTTP/1.1 202 Accepted
Content-Type: application/json
Location: /v1/jobs/job_f5a4c3fc-c43f-4655-8a35-f8821bf7cd4f
{
"id": "job_f5a4c3fc-c43f-4655-8a35-f8821bf7cd4f",
"tool": "pdf_run_batch",
"status": "running",
"progress": null,
"created_at": "2026-10-11T01:39:03.888Z",
"started_at": "2026-10-11T01:39:03.889Z",
"finished_at": null,
"callback": {
"url": "http://127.0.0.1:8080/hooks/superpdf",
"status": "pending",
"attempts": 0,
"last_status": null
}
}List jobs
GET/v1/jobs
Response
200 Jobs from this server process, newest first. Finished jobs are kept for an hour.
| Field | Type | Description |
|---|---|---|
jobs | array of objects | None |
jobs[].id | string | None |
jobs[].tool | string | None |
jobs[].status | string | One of queued, running, succeeded, failed. |
jobs[].progress | object or null | Latest progress from tools that report it (merge, split, pipelines, batches). |
jobs[].progress.progress | number | None |
jobs[].progress.total | number | None |
jobs[].progress.message | string | None |
jobs[].created_at | string | ISO 8601 time. |
jobs[].started_at | string or null | None |
jobs[].finished_at | string or null | None |
jobs[].result | any | Once succeeded: the same result POST /v1/tools/{tool} returns. |
jobs[].error | problem details object | RFC 9457 Problem Details. |
jobs[].callback | object | None |
jobs[].callback.url | string | None |
jobs[].callback.status | string | One of pending, delivering, delivered, failed. |
jobs[].callback.attempts | integer | None |
jobs[].callback.last_status | integer or null | HTTP status of the last attempt; null when the receiver could not be reached. |
Example
curl -s http://127.0.0.1:7341/v1/jobs \
-H "Authorization: Bearer $SUPERPDF_API_TOKEN"{
"jobs": [
{
"id": "job_c5ece8a8-5f0f-4121-97ec-9ca994a94c10",
"tool": "pdf_run_batch",
"status": "succeeded",
"progress": {
"progress": 2,
"total": 2,
"message": "2 of 2 files"
},
"created_at": "2026-10-11T01:55:36.410Z",
"started_at": "2026-10-11T01:55:36.410Z",
"finished_at": "2026-10-11T01:55:36.414Z",
"result": {
"outputs": [
{
"input": "/Users/<you>/Documents/superPDF/report.pdf",
"output": "/Users/<you>/Documents/superPDF/drafts/report-processed.pdf",
"pages": 4,
"bytes": 2916
},
{
"input": "/Users/<you>/Documents/superPDF/appendix.pdf",
"output": "/Users/<you>/Documents/superPDF/drafts/appendix-processed.pdf",
"pages": 1,
"bytes": 1405
}
],
"failed": []
}
}
]
}Get a job
GET/v1/jobs/{id}
Path parameters
| Parameter | Type | Description |
|---|---|---|
id | string | The job id from POST /v1/jobs. |
Response
200 The job, with its result once it has succeeded.
| Field | Type | Description |
|---|---|---|
id | string | None |
tool | string | None |
status | string | One of queued, running, succeeded, failed. |
progress | object or null | Latest progress from tools that report it (merge, split, pipelines, batches). |
progress.progress | number | None |
progress.total | number | None |
progress.message | string | None |
created_at | string | ISO 8601 time. |
started_at | string or null | None |
finished_at | string or null | None |
result | any | Once succeeded: the same result POST /v1/tools/{tool} returns. |
error | problem details object | RFC 9457 Problem Details. |
callback | object | None |
callback.url | string | None |
callback.status | string | One of pending, delivering, delivered, failed. |
callback.attempts | integer | None |
callback.last_status | integer or null | HTTP status of the last attempt; null when the receiver could not be reached. |
Errors: 401, 403, 404. See Errors.
Example
curl -s http://127.0.0.1:7341/v1/jobs/$JOB \
-H "Authorization: Bearer $SUPERPDF_API_TOKEN"{
"id": "job_c5ece8a8-5f0f-4121-97ec-9ca994a94c10",
"tool": "pdf_run_batch",
"status": "succeeded",
"progress": {
"progress": 2,
"total": 2,
"message": "2 of 2 files"
},
"created_at": "2026-10-11T01:55:36.410Z",
"started_at": "2026-10-11T01:55:36.410Z",
"finished_at": "2026-10-11T01:55:36.414Z",
"result": {
"outputs": [
{
"input": "/Users/<you>/Documents/superPDF/report.pdf",
"output": "/Users/<you>/Documents/superPDF/drafts/report-processed.pdf",
"pages": 4,
"bytes": 2916
},
{
"input": "/Users/<you>/Documents/superPDF/appendix.pdf",
"output": "/Users/<you>/Documents/superPDF/drafts/appendix-processed.pdf",
"pages": 1,
"bytes": 1405
}
],
"failed": []
}
}This document
GET/openapi.json
Response
200 The OpenAPI 3.1 document. No token needed.
A JSON object; the example below shows its fields.
Example
curl -s http://127.0.0.1:7341/openapi.json | jq .info{
"title": "superPDF local API",
"version": "0.4.1",
"description": "The superPDF tools over HTTP, served by `superpdf serve --allow-di…"
}