Talk with Archie
API reference › Analysis
Skills › Analysis

Analyse an Uploaded Document

POST/api/v1/skills/documents.analyse/invoke
Reads a document you have already uploaded and returns an analysis of it: a summary, the key figures, a classification or a risk assessment. You must supply file_id, the UUID of the uploaded file, and can choose the analysis_type. The response holds the analysis text, any extracted data and a confidence score.
Body parameters
file_idstring · uuidRequired
UUID of the uploaded file to analyse.
analysis_typeenum · default summarize
Kind of analysis to run on the document; defaults to a summary.
summarizeextract_figuresclassifyrisk_assess
Returns

Skill executed successfully

skillstringRequired
Example analyse_document
outputobjectRequired
output.stub_fieldsarray of strings
output.warningsarray of strings
output.analysisstringRequired
output.extracted_dataobject
output.confidencenumber · default 0
correlation_idstringRequired
Errors
StatusTypeWhen
401AUTH.TOKEN_INVALIDAuthentication required
403PERMISSION.CAPABILITY_DENIEDInsufficient permissions
404SKILL.NOT_FOUNDSkill not found
422VALIDATION.INVALID_FORMATValidation error
429RATE_LIMIT.USERRate limit exceeded
5XXINTERNAL.UNKNOWNInternal server error
curl https://uk.heyarchie.com/api/v1/skills/documents.analyse/invoke \
  -X POST \
  -H "Authorization: Bearer sk_..." \
  -H "Content-Type: application/json" \
  -d '{
       "file_id": "00000000-0000-0000-0000-000000000000",
       "analysis_type": "summarize"
     }'
from heyarchie import Archie
archie = Archie(api_key="sk_...")
result = archie.skills.invoke(
    "documents.analyse",
    file_id="00000000-0000-0000-0000-000000000000",
    analysis_type="summarize",
)
print(result)
import { Archie } from "heyarchie";

const archie = new Archie({ apiKey: "sk_..." });
const result = await archie.skills.invoke("documents.analyse", {
  "file_id": "00000000-0000-0000-0000-000000000000",
  "analysis_type": "summarize"
});
console.log(result);
Response
{
  "skill": "analyse_document",
  "output": {
    "analysis": "Supplier invoice INV-20418 from Fenwick Office Supplies Ltd for GBP 1,248.00 including VAT, due on 2026-07-14.",
    "confidence": 0.94,
    "extracted_data": {
      "currency": "GBP",
      "due_date": "2026-07-14",
      "invoice_number": "INV-20418",
      "net_amount": 1040,
      "supplier": "Fenwick Office Supplies Ltd",
      "total": 1248,
      "vat_amount": 208
    }
  },
  "correlation_id": "<string>"
}
{
  "error": {
    "type": "<string>",
    "code": "<string>",
    "message": "<string>",
    "param": "<string>",
    "retry_after_seconds": "<integer>"
  }
}
{
  "error": {
    "type": "<string>",
    "code": "<string>",
    "message": "<string>",
    "param": "<string>",
    "retry_after_seconds": "<integer>"
  }
}
{
  "error": {
    "type": "<string>",
    "code": "<string>",
    "message": "<string>",
    "param": "<string>",
    "retry_after_seconds": "<integer>"
  }
}

Every response also carries X-Request-ID. Quote it if you write to us about a call.