Attest tools · pdf_tools

PDF tools

a task has a PDF to inspect or reshape without a desktop app: page count and page sizes, text extraction, merging several files, splitting or pulling out pages, rotating, or rendering pages to PNG.

1 credit per successful callPOST /api/v1/pdf

Bearer key · JSON

POST /api/v1/pdf

curl -s -X POST https://getattest.com.au/api/v1/pdf \
  -H "authorization: Bearer $ATTEST_API_KEY" \
  -H "content-type: application/json" \
  -d '{}'

Send the key as a bearer token in the authorization header. One key and one credit balance cover every service, including Attest Capture. A failed call is refunded automatically. No key yet? POST /api/v1/keys issues one with 25 free credits and no signup — see the key guide.

For agents

Use when

Use this when a task has a PDF to inspect or reshape without a desktop app: page count and page sizes, text extraction, merging several files, splitting or pulling out pages, rotating, or rendering pages to PNG.

Not documented yet: a captured example response. This page only shows what the module publishes about itself, so the missing parts are absent rather than guessed at.

7 fields

Input

Scroll the table horizontally to see all fields.

Field / Type / Required / What it does
FieldTypeRequiredWhat it does
operationstringRequiredOne of info, extract_text, merge, split, extract_pages, rotate, to_png.
urlstringOptionalA public http(s) PDF URL, for every operation except merge.
file_base64stringOptionalThe PDF as base64, for every operation except merge.
filesarrayOptionalThe PDFs to merge, each as a url or file_base64 entry. merge only.
pagesstringOptionalA page selection such as 1-3,7. Required for extract_pages; optional for extract_text, split, rotate and to_png.
rotateintegerOptionalDegrees to rotate, for operation rotate.
scalenumberOptionalRender scale, for operation to_png.

HTTP 200

Response

Every successful response also carries call_id (your receipt for the charge), credits_charged and credits_remaining.

Scroll the table horizontally to see all fields.

Field / What it holds
FieldWhat it holds
operationThe operation that ran.
sourceWhether the input came from a url or file_base64.
bytes_inBytes read.
pagesPage count and page sizes, for operation info.
textThe extracted text, for operation extract_text.
file_base64The produced PDF, for merge, extract_pages and rotate.
filesThe produced parts, for split and to_png.
truncatedWhether the output stopped at the response cap, with the parts that fit returned.
effective_max_input_bytesThe limit that actually binds this operation.
effective_input_noteWhy that limit binds, and what to do when a document is larger.

Machine-readable failures

Errors

Errors return JSON such as {"error":"invalid_api_key"}. A failed call is refunded automatically.

Scroll the table horizontally to see all fields.

Code / Status / Meaning
CodeStatusMeaning
operation_required400No operation was named.
invalid_operation400operation is not supported; the response lists the allowed names.
source_required400Neither url nor file_base64 was sent.
source_conflict400Both url and file_base64 were sent.
files_required400merge was called without files.
too_few_files400merge needs more than one file.
too_many_files400More files were sent than merge accepts.
pages_required400extract_pages was called without a page selection.
page_out_of_range400The page selection names a page the document does not have.
rotate_required400rotate was called without a rotation.
invalid_rotate400rotate is not a quarter-turn this service applies.
pdf_encrypted400The document is encrypted.
invalid_pdf400The bytes are not a readable PDF.
output_too_large413The produced file is past the response cap.
source_http_error502The PDF URL did not answer. Not charged.

On every service

Scroll the table horizontally to see all fields.

Code / Status / Meaning
CodeStatusMeaning
invalid_api_key401The authorization header is missing or the key is unknown.
insufficient_credits402The balance is below this call's cost. The response carries credits_required and credits_remaining.
rate_limit_exceeded429Free keys share 10 calls a minute across every service. The response carries limit and window_seconds.
services_unavailable503The credit store could not be reached. Retry once after 30 seconds.

Where the answer comes from

Source and scope

Read from the PDF itself - its page tree, Info dictionary and content streams. Metadata strings such as producer, creator, title and author are what the writing tool put there and are not checked against anything.

Attest reports what it read, with the source it read it from. It is general information, not advice, and not a legal record.

All Attest tools · Service list as JSON · OpenAPI

Same key as every Attest tool

One key. One balance. 1 credit a call.

Issue a free key, then use it here, on Attest Capture and on every other tool in the box.

Get a free key