Tools API
Each tool is an endpoint of its own, for any job: call it from your code, a script, or anything that can send a web request. Nothing needs to be set up in the app first. You can try every tool from Tools in the app, which shows the request it makes, and agents use the same tools as steps.
All requests need a Bearer token, as for the rest of the API:
Authorization: Bearer dg_your_api_keyTools
| Tool | Endpoint | What it does |
|---|---|---|
| Read a document | POST /api/v1/tools/read | The text of a document: a PDF page by page (scanned pages are read with OCR), a spreadsheet or CSV as rows, a Word or text file as text. |
| Extract data | POST /api/v1/tools/extract | Reads a document into the fields you ask for, with the page each value came from. |
| Decide | POST /api/v1/tools/decide | Chooses from your options, scores against levels, or answers yes or no, with how sure it is. |
| Compare | POST /api/v1/tools/compare | Checks two to five documents against each other, field by field and line by line. |
| Split a PDF | POST /api/v1/tools/split | Splits one PDF into separate documents, by page ranges, a number pattern or a description. |
| Generate an image | POST /api/v1/tools/generate_image | A new picture made by AI from a description. |
| Edit an image | POST /api/v1/tools/edit_image | Changes a picture as described, keeping the rest of it. |
| Merge PDFs | POST /api/v1/tools/merge_pdfs | Joins two to twenty PDFs into one, in order. |
| PDF to images | POST /api/v1/tools/pdf_to_images | Turns a PDF's pages into PNG or JPG pictures, one per page. |
| Images to PDF | POST /api/v1/tools/images_to_pdf | Puts PNG or JPG pictures into one PDF, one per page. |
| Compress a PDF | POST /api/v1/tools/compress_pdf | Makes a PDF smaller by shrinking its pictures. |
| Flatten a PDF | POST /api/v1/tools/flatten_pdf | Turns a PDF form's fields into fixed text that can no longer be changed. |
| Short link | POST /api/v1/tools/short_link | Makes a short link and a QR code for one of your public forms or documents. |
GET /api/v1/tools lists them all, with what each one takes in data as JSON Schema.
To make documents from your templates, use renders instead.
Sending files
The request
The tool's parameters go in data, as a render's template fields do. Two optional fields sit beside it:
{
"data": { "instructions": "The invoice number and total" },
"async": false,
"webhook_url": "https://example.com/hooks/automette"
}| Field | What it does |
|---|---|
data | The tool's parameters, as listed on its reference page. Required. |
async | true answers straight away with the job, before the tool has run. Leave it out to wait for the result. |
webhook_url | An https URL that receives the finished job, as tool_job.completed or tool_job.failed. |
Sending files
A file goes in data as its name and either its bytes or a link:
{ "data": { "file": { "name": "invoice.pdf", "content_base64": "JVBERi0xLjcK..." } } }{ "data": { "file": { "name": "invoice.pdf", "url": "https://example.com/invoice.pdf" } } }A link must start with https://. Each file can be up to 25 MB.
What comes back
Every call is a job. Without async, the call waits for the result, up to 60 seconds. A tool still working after that answers 202 and carries on, and you fetch the job from its self link until status is completed or failed. With async: true you always get 202 and the job straight away.
The job holds what the tool returned in result, as described on its reference page, and credits_used: what the call cost, including any AI it used. A file a tool makes, such as a picture or part of a split PDF, comes with a url that works for 24 hours.
Every job stays available with GET /api/v1/tool_jobs/{id}, and in Tools → Logs in the app.
For example, extracting two fields:
curl https://automette.com/api/v1/tools/extract \
-H "Authorization: Bearer dg_your_api_key" \
-H "Content-Type: application/json" \
-d '{"data": {"file": {"name": "invoice.pdf", "url": "https://example.com/invoice.pdf"}, "instructions": "The invoice number and total"}}'{
"id": "cmvkp8n880000qpv40qq5fk59",
"self": "https://automette.com/api/v1/tool_jobs/cmvkp8n880000qpv40qq5fk59",
"tool": "extract",
"status": "completed",
"origin": "api",
"data": { "file": { "name": "invoice.pdf", "mime_type": "application/pdf", "url": "https://..." }, "instructions": "The invoice number and total" },
"result": {
"data": { "invoice_number": "INV-104", "total": "1250.00" },
"pages": { "invoice_number": 1, "total": 1 },
"missing": []
},
"error": null,
"code": null,
"credits_used": 0.42,
"created_at": "2026-10-23T08:19:45.728Z",
"started_at": "2026-10-23T08:19:45.977Z",
"completed_at": "2026-10-23T08:19:49.102Z"
}Errors
A request that cannot start comes back as { "error": "...", "code": "..." }. A tool that ran and failed returns its job, with status: "failed" and the same error and code:
| Status | code | Meaning |
|---|---|---|
| 401 | The API key is missing or not valid. | |
| 402 | no_credits | Not enough credits for this call. |
| 404 | not_found | Something the request names does not exist. |
| 422 | invalid_input | A parameter is missing or not valid, or a file is over 25 MB. error says which. |
| 500 | service_error | A problem on Automette's side. Try again in a little while. |
Last updated on