velrim_extract
Extract structured data from a document (PDF or image, passed as document_base64 or as the upload_key of a staged upload) against a JSON Schema you supply. Returns a typed object and, for every field, a state (present, null, or missing), a calibrated confidence score, and an anchor (the source page and bounding box). The confidence is calibrated against published reliability curves (https://velrim.com/reliability), so a 0.9 means the field is right about 90% of the time on that document class — branch on it directly: act on a field at or above your accept threshold, escalate the fields below it and any that are missing. Use each field's anchor to check it against the source page.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"schema": "<schema>"
},
"name": "velrim_extract"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| hints | No | Discriminator hints for union schemas. | |
| schema | Yes | The JSON Schema (draft 2020-12) the extracted object must conform to (required). | |
| doc_class | No | Opaque tag (<=128 chars) echoed back in meta.doc_class. | |
| upload_key | No | The upload_key of a staged Velrim upload. Mutually exclusive with document_base64. | |
| document_base64 | No | The document bytes, base64-encoded. Provide exactly one of document_base64 or upload_key. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| data | No | ||
| meta | No | ||
| error | No | ||
| fields | No |