AiResoviaPDF

AiResovia PDF API

Every tool in the workspace is available over HTTPS for your own systems: ERP, CRM, document pipelines or scripts. API keys are part of the Business plan. Create one in your account.

Authentication

Send your key as a bearer token. Keep keys on your server; never put them in a web page or app.

Authorization: Bearer ak_live_xxxxxxxxxxxxxxxxxxxxxxxx

Base URL: https://api.airesovia.com. Requests count towards the key owner's plan limits. Every response that has a limit returns X-Usage-Used and X-Usage-Limit.

Run a tool on a file

POST /api/process with multipart form data: file, action and options (JSON). The response is the resulting file; its name is in X-Output-Filename.

curl -X POST https://api.airesovia.com/api/process \
  -H "Authorization: Bearer $AIRESOVIA_KEY" \
  -F file=@contract.pdf -F action=compress -F 'options={"level":"high"}' \
  -o contract-compressed.pdf
actionoptions
compress{"level":"low|medium|high"}
mergeextra files as files parts, in order
split{"mode":"ranges","ranges":"1-3,4-6"} or {"mode":"every","every":2} (returns a zip)
rotate, delete_pages, extract_pages{"pages":"1-3","angle":90}
watermark{"text":"CONFIDENTIAL","opacity":0.25,"rotation":45}
page_numbers, header_footer, bates{"position":"bottom-center","format":"Page {n} of {total}"}
redact{"terms":["Asha Rao"],"presets":["email","phone","pan","aadhaar"]}
protect, unlock{"password":"…","allow_print":true}
ocr{"lang":"eng+hin"}
to_docx, to_xlsx, to_pptx, to_images, to_text, to_pdfconversions; to_images takes {"format":"png","dpi":150}
fill_form{"values":{"Name":"Asha"},"flatten":true}
detect_fields, flatten, repair, pdfa, metadatasee the workspace for the same settings
info, form_fieldsreturn JSON instead of a file

Batch

POST /api/batch with action, options and up to 50 files. Returns a zip with each result and report.txt.

curl -X POST https://api.airesovia.com/api/batch -H "Authorization: Bearer $AIRESOVIA_KEY" \
  -F action=to_docx -F files=@a.pdf -F files=@b.pdf -o converted.zip

AI

EndpointForm fieldsReturns
POST /api/ai/chatfile, question, optional history (JSON list of {"role","text"})JSON: answer, segments with cited pages
POST /api/ai/summarizefile, style (brief, bullets, actions, executive, detailed), languageJSON: summary, segments
POST /api/ai/translatefile, languageTranslated PDF with the same layout
POST /api/ai/comparefile (older), files (newer), ai_summaryJSON report and highlighted PDF (base64)
POST /api/ai/extractfile, preset (invoice, receipt, purchase_order, contract, resume, custom), fieldsJSON: data
POST /api/ai/transcribefile, output (pdf or text)Searchable PDF or text
POST /api/ai/outlinefilePDF with bookmarks
POST /api/ai/detect-sensitivefile, categoriesJSON list to pass to redact
curl -X POST https://api.airesovia.com/api/ai/extract -H "Authorization: Bearer $AIRESOVIA_KEY" \
  -F file=@invoice.pdf -F preset=invoice

Signature requests

POST /api/esign/requests with file and meta (JSON). Field coordinates are fractions of the page (0 to 1) from the top left; signer is the index in signers.

meta='{"title":"NDA","sequential":false,"signers":[{"name":"Ravi Kumar","email":"ravi@example.com"}],
"fields":[{"id":"s1","signer":0,"page":1,"x":0.1,"y":0.8,"w":0.3,"h":0.06,"type":"signature"},
          {"id":"d1","signer":0,"page":1,"x":0.5,"y":0.82,"w":0.2,"h":0.03,"type":"date"}]}'
curl -X POST https://api.airesovia.com/api/esign/requests -H "Authorization: Bearer $AIRESOVIA_KEY" \
  -F file=@nda.pdf -F "meta=$meta"

Then GET /api/esign/requests to track status, POST /api/esign/requests/{id}/remind, /void, GET /api/esign/requests/{id}/download for the signed copy, and POST /api/esign/verify to check a file. Field types: signature, initials, name, date, text, checkbox.

Errors and limits

StatusMeaning
400Missing or invalid input; the detail field explains what to fix
401 / 402Invalid key, or the feature is not in the plan
413 / 415File too large, or a type the tool does not accept
422The document could not be processed (damaged, encrypted, or no text)
429Rate or plan limit reached; wait or upgrade
502 / 503A dependency (for example the AI service) is busy; retry with backoff