Vanguard AI

Document processing

Read the text out of a PDF, Word or Excel file — Lao included — and, if you ask, have it summarized, reduced to key points, translated, or turned into structured fields. It runs as an asynchronous job: enqueue it, then poll the job.

POST /v1/docproc/jobs API key

Fields

file *
file
A PDF, Word (.docx) or Excel (.xlsx) file. Over 10 MB: upload it first with POST /v1/docproc/uploads, then pass sourceKey in a JSON body.
task
extract | summarize | key_points | translate | structured
What to do with the text. Default: extract (the text only, no model).
targetLanguage
string
For translate: the language to translate into, e.g. "English" or "Lao".
schemaHint
string
For structured: the fields you want, e.g. "invoice number, date, total".

Enqueue a job

Poll for the result

Poll GET /v1/jobs/{id} until status is success or error. The text is in result.text; the task’s answer (summary, key points, translation, fields) is in summary.markdown.

200 Finished job
{
  "status": "success",
  "job": {
    "id": "6d0b…",
    "serviceId": "docproc",
    "status": "success",
    "result": { "text": "…", "charCount": 18234, "pageCount": 12, "task": "summarize" },
    "summary": { "markdown": "## Summary\n…" }
  }
}