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| Field | Type | Required | What it does |
|---|
operation | string | Required | One of info, extract_text, merge, split, extract_pages, rotate, to_png. |
|---|
url | string | Optional | A public http(s) PDF URL, for every operation except merge. |
|---|
file_base64 | string | Optional | The PDF as base64, for every operation except merge. |
|---|
files | array | Optional | The PDFs to merge, each as a url or file_base64 entry. merge only. |
|---|
pages | string | Optional | A page selection such as 1-3,7. Required for extract_pages; optional for extract_text, split, rotate and to_png. |
|---|
rotate | integer | Optional | Degrees to rotate, for operation rotate. |
|---|
scale | number | Optional | Render 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| Field | What it holds |
|---|
operation | The operation that ran. |
|---|
source | Whether the input came from a url or file_base64. |
|---|
bytes_in | Bytes read. |
|---|
pages | Page count and page sizes, for operation info. |
|---|
text | The extracted text, for operation extract_text. |
|---|
file_base64 | The produced PDF, for merge, extract_pages and rotate. |
|---|
files | The produced parts, for split and to_png. |
|---|
truncated | Whether the output stopped at the response cap, with the parts that fit returned. |
|---|
effective_max_input_bytes | The limit that actually binds this operation. |
|---|
effective_input_note | Why 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| Code | Status | Meaning |
|---|
operation_required | 400 | No operation was named. |
|---|
invalid_operation | 400 | operation is not supported; the response lists the allowed names. |
|---|
source_required | 400 | Neither url nor file_base64 was sent. |
|---|
source_conflict | 400 | Both url and file_base64 were sent. |
|---|
files_required | 400 | merge was called without files. |
|---|
too_few_files | 400 | merge needs more than one file. |
|---|
too_many_files | 400 | More files were sent than merge accepts. |
|---|
pages_required | 400 | extract_pages was called without a page selection. |
|---|
page_out_of_range | 400 | The page selection names a page the document does not have. |
|---|
rotate_required | 400 | rotate was called without a rotation. |
|---|
invalid_rotate | 400 | rotate is not a quarter-turn this service applies. |
|---|
pdf_encrypted | 400 | The document is encrypted. |
|---|
invalid_pdf | 400 | The bytes are not a readable PDF. |
|---|
output_too_large | 413 | The produced file is past the response cap. |
|---|
source_http_error | 502 | The PDF URL did not answer. Not charged. |
|---|
On every service
Scroll the table horizontally to see all fields.
Code / Status / Meaning| Code | Status | Meaning |
|---|
invalid_api_key | 401 | The authorization header is missing or the key is unknown. |
|---|
insufficient_credits | 402 | The balance is below this call's cost. The response carries credits_required and credits_remaining. |
|---|
rate_limit_exceeded | 429 | Free keys share 10 calls a minute across every service. The response carries limit and window_seconds. |
|---|
services_unavailable | 503 | The credit store could not be reached. Retry once after 30 seconds. |
|---|
4 worked examples
Examples
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