Api referenceExtract
Extract multiple documents in one call (max 20)
Returns one envelope with a per-item `results` array; each item carries its own `ok` flag and either `data` or `error`. Note this shape differs from the single-call extract routes (`/v1/extract/{custom,invoice,…}`) which return `{ data, model, usage }`. Batch returns `{ results, usage }` with no top-level `model` field — a single batch call uses one model for every item.
x-api-key<token>
In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://api.untangledapi.com/v1/extract/batch" \ -H "Content-Type: application/json" \ -d '{ "items": [ { "id": "string", "document": {}, "schema": { "property1": null, "property2": null } } ] }'{
"results": [
{
"id": "string",
"ok": true,
"data": {
"property1": null,
"property2": null
},
"error": {
"code": "string",
"message": "string"
}
}
],
"usage": {
"inputTokens": 0,
"outputTokens": 0
}
}{
"error": {
"code": "string",
"message": "string",
"details": null
}
}{
"error": {
"code": "string",
"message": "string",
"details": null
}
}{
"error": {
"code": "plan_limit_exceeded",
"message": "string",
"details": {
"plan": "free",
"bucketHeu": 0,
"requestedHeu": 0,
"upgradeUrl": "http://example.com"
}
}
}{
"error": {
"code": "string",
"message": "string",
"details": null
}
}{
"error": {
"code": "string",
"message": "string",
"details": null
}
}{
"error": {
"code": "string",
"message": "string",
"details": null
}
}{
"error": {
"code": "string",
"message": "string",
"details": null
}
}{
"error": {
"code": "string",
"message": "string",
"details": null
}
}