DocInspect API

The docs live next to the API

Interactive Swagger and ReDoc are generated from the same code that serves your requests: they cannot go stale.

v1 endpoints

The main entry point: POST /v1/task, the whole pipeline in one call. The stages are also available as separate calls when you only need one of them.

POST/v1/taska universal AI task over a file or text
GET/v1/task/{id}status and result of an async task
POST/v1/extractschema extraction, chunks and embeddings
POST/v1/splitmulti-document splitting without an LLM
POST/v1/split/analyzesplitting with classification and extraction
POST/v1/embedtext embedding, a 256-dimension vector

Quick start

curl -X POST https://api.docinspect.ru/v1/task \
-H "X-API-Key: $DOCINSPECT_API_KEY" \
-F "file=@invoice.pdf" \
-F "prompt=Extract the invoice fields" \
-F 'output_schema={
"type": "object",
"properties": {
"supplier": {"type": "object", "properties": {
"name": {"type": "string"}, "inn": {"type": "string"}}},
"total_amount": {"type": "number"}
}
}'