Automette docs

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_key

Tools

ToolEndpointWhat it does
Read a documentPOST /api/v1/tools/readThe 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 dataPOST /api/v1/tools/extractReads a document into the fields you ask for, with the page each value came from.
DecidePOST /api/v1/tools/decideChooses from your options, scores against levels, or answers yes or no, with how sure it is.
ComparePOST /api/v1/tools/compareChecks two to five documents against each other, field by field and line by line.
Split a PDFPOST /api/v1/tools/splitSplits one PDF into separate documents, by page ranges, a number pattern or a description.
Generate an imagePOST /api/v1/tools/generate_imageA new picture made by AI from a description.
Edit an imagePOST /api/v1/tools/edit_imageChanges a picture as described, keeping the rest of it.
Merge PDFsPOST /api/v1/tools/merge_pdfsJoins two to twenty PDFs into one, in order.
PDF to imagesPOST /api/v1/tools/pdf_to_imagesTurns a PDF's pages into PNG or JPG pictures, one per page.
Images to PDFPOST /api/v1/tools/images_to_pdfPuts PNG or JPG pictures into one PDF, one per page.
Compress a PDFPOST /api/v1/tools/compress_pdfMakes a PDF smaller by shrinking its pictures.
Flatten a PDFPOST /api/v1/tools/flatten_pdfTurns a PDF form's fields into fixed text that can no longer be changed.
Short linkPOST /api/v1/tools/short_linkMakes 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"
}
FieldWhat it does
dataThe tool's parameters, as listed on its reference page. Required.
asynctrue answers straight away with the job, before the tool has run. Leave it out to wait for the result.
webhook_urlAn 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:

StatuscodeMeaning
401The API key is missing or not valid.
402no_creditsNot enough credits for this call.
404not_foundSomething the request names does not exist.
422invalid_inputA parameter is missing or not valid, or a file is over 25 MB. error says which.
500service_errorA problem on Automette's side. Try again in a little while.

Last updated on

On this page