Response object¶
Returned by the extraction endpoints, and as the final event
("done": true) of streams.
{
"result": {"merchant": "Sunrise Cafe", "total": 33000, "paid": true, "category": "food"},
"mode": "text",
"steps": 6,
"seconds": 4.164,
"seconds_per_step": 0.694,
"model": "trusttyped-v1.0.0",
"rejected": null,
"ended": null,
"trace": [],
"flagged": [],
"confidence": {"merchant": 1.0, "total": 1.0, "paid": 0.9998, "category": 1.0},
"votes": {},
"needs_review": [],
"weakest": {"paid": {"index": 0, "token": " true", "probability": 0.9998,
"alternative": " false", "alternative_probability": 0.0002, "before": ""}},
"provenance": {"library_version": "0.3.2", "model_revision": "7479749d…", "…": "…"}
}
Fields¶
| Field | Type | Description |
|---|---|---|
result |
object | One value per schema field, in schema order. null for fields that were skipped, not filled, or cancelled by a reject (unless on_reject is set). |
mode |
string | text or image (/v1/typed only). |
steps |
integer | Decoding steps across all stages. |
seconds, seconds_per_step |
number | Processing time. |
model |
string | Model used. |
rejected |
object or null | {"field", "value"} when a reject rule stopped the request; also "error" when a failing call caused it. |
ended |
object or null | {"field", "value"} when an end rule finished early. |
trace |
array | Every action taken, in order (see below). |
flagged |
array | Fields flagged by review rules or failed calls: {"field", "value", "reason"}. |
confidence |
object | Field → 0–1, or null (free text). Only fields filled by the model; compute and call fields are absent. |
votes |
object | For voted fields: {"values": [...], "agreement": 0.667}. |
needs_review |
array of names | Confidence below review_threshold, votes not unanimous, or flagged. |
weakest |
object | Field → the least certain token: token, probability, alternative, alternative_probability, before, index. See Confidence and review. |
provenance |
object | Audit data (below). |
Stream final events also have step and rounds.
trace entries¶
do |
Keys | Written when |
|---|---|---|
drop, review, reject, return, end |
round, field, value |
A rule applied. |
jump, switch |
round, field, value, to |
A jump or switch chose a target. |
compute |
round, field, expr, value |
A computed field was calculated. |
call |
round, field, method, host, path, status, ms, attempts, request_hash, response_hash, error |
An HTTP call ran. |
Long values in trace are shortened to 200 characters.
provenance¶
| Key | Description |
|---|---|
library_version |
Version of the service software. |
model, model_revision, backend |
Exact model files used. |
schema_hash |
SHA-256 of the schema (key order and whitespace ignored). |
system_hash, context_hash, messages_hash, image_hash |
SHA-256 of each input, or null. |
params |
max_new_tokens, review_threshold, thinking, thinking_budget. |
calls |
HTTP calls: field, method, host, status, request_hash, response_hash. |
Inputs are recorded as hashes only. Secrets are never included.