Human review
Review only the fields the system is unsure about, with the evidence beside each one.
InterfacesAPI SpecSections
API Spec Designed
Base address: https://01scale.com/api/review/v1. Open an endpoint for its inputs, constraints, errors and samples.
POST/tasksCreate a review task
Takes a set of fields that need a person's check and keeps its own copy of them. Review never reads another service's data: whatever it needs is sent here. Signed in
Scope: review:write
Inputs
referencebodystringrequired- The caller's own label, returned in events. DocFlow sends
docflow:{document_id}. - 1 to 200 characters. Opaque to Review.
fields[]bodyarrayrequired- The values to review.
- 1 to 500 fields.
fields[].namebodystringrequired- The field's name, shown as its label.
- 1 to 64 characters; unique with
line_indexwithin the task. fields[].line_indexbodyintegeroptional- Which line item, for repeated fields.
- 0 or more.
fields[].typebodystringrequired- How an edit is checked: a real date, a decimal number, a 3-letter currency code, or free text. This keeps Review independent of any one document type.
- One of
text,date,decimal,currency. fields[].valuebodystring or nullrequired- The value to check.
- Null when not found on the document. Decimals as strings.
fields[].confidencebodynumberrequired- How sure the system was; orders the queue.
- 0 to 1.
fields[].source_page, fields[].source_quotebodyinteger, stringoptional- The evidence shown beside the value.
- Page 1 or more; quote 1 to 500 characters.
fields[].flagged, fields[].flag_reasonsbodyboolean, string[]required- Whether a person must decide on this field, and why.
- Flagged exactly when there is at least one reason.
holdbodybooleanoptional- Hold the unflagged fields for the app until it releases them (
REVIEW-V1-E4-06). The owner still sees and decides every flagged field. - Only with a delegated token: the acting app (its
actclaim) becomes the holder. Default false. Idempotency-Keyheaderstringoptional- Makes a retried request safe.
- 1 to 255 characters.
What it does
- Validates every field, stores the task as
openwith its own copy of the fields (eachpending), and recordsreview.task_created. - With
hold: true, records the acting app from the delegated token'sactclaim asheld_by(REVIEW-V1-E4-06). A person's own token or an API key cannot place a hold.
Responses
- 201The task was created.
task. - 422
validation_failedA field is malformed;errors[]lists each one. - 422
hold_requires_apphold: truewithout a delegated token, so there is no app to hold the fields for. - 422
duplicate_fieldTwo fields share a name and line index. - 422
idempotency_key_reusedSame key, different body. - 401
not_authenticatedNo valid access token.
Sample request
POST /api/review/v1/tasks HTTP/1.1
Host: 01scale.com
Authorization: Bearer <access token>
Idempotency-Key: 4d2a-review-1
Content-Type: application/json
{
"reference": "docflow:0193b0c4-91aa-7b33-8c44-5d6e7f8a9b0c",
"fields": [
{
"name": "vendor_name",
"type": "text",
"value": "Acme Supplies Ltd",
"confidence": 0.97,
"source_page": 1,
"source_quote": "Acme Supplies Ltd",
"flagged": false,
"flag_reasons": []
},
{
"name": "total",
"type": "decimal",
"value": "1240.00",
"confidence": 0.3,
"source_page": 2,
"source_quote": "TOTAL DUE $1,240.00",
"flagged": true,
"flag_reasons": [
"Total \u2260 subtotal + tax (1,150.00 + 80.00 = 1,230.00)"
]
}
]
}Sample response
{
"task": {
"id": "0193b0f2-3c4d-7e5f-8a6b-7c8d9e0f1a2b",
"reference": "docflow:0193b0c4-91aa-7b33-8c44-5d6e7f8a9b0c",
"status": "open",
"resolved": 0,
"total": 2,
"flagged": 1,
"can_complete": false,
"checks_overridden": false,
"held_by": "service:docflow",
"released_at": null,
"created_at": "2026-11-17T09:14:43Z",
"completed_at": null
}
}GET/tasks/{taskId}Get the review queue
The task and its fields: flagged fields first, lowest confidence first. Unflagged fields only when asked. Signed in
Scope: review:read
Inputs
taskIdpathuuidrequired- The task.
- A UUID.
allquerybooleanoptional- For 'Show all fields'.
trueadds the unflagged fields after the flagged ones.
What it does
- Read only.
resolvedcounts flagged fields no longerpending;can_completeis true when none is pending. - While the task is held (
REVIEW-V1-E4-06), the owner's own token or API key gets only the flagged fields, even withall=true, plusheld: trueandfields_hidden; the holding app, with a delegated token naming it inact, gets every field.held_byandreleased_atare on the task.
Responses
- 200The task is the caller's.
taskandfields[]:id,name,line_index,type,original_value,value,confidence,source_page,source_quote,flagged,flag_reasons[],status(pending,accepted,edited,not_present). - 404
task_not_foundNo such task, or it belongs to another user. The same answer in both cases. - 401
not_authenticatedNo valid access token.
Sample request
GET /api/review/v1/tasks/0193b0f2-3c4d-7e5f-8a6b-7c8d9e0f1a2b HTTP/1.1
Host: 01scale.com
Authorization: Bearer <access token>Sample response
{
"task": {
"id": "0193b0f2-3c4d-7e5f-8a6b-7c8d9e0f1a2b",
"reference": "docflow:0193b0c4-91aa-7b33-8c44-5d6e7f8a9b0c",
"status": "open",
"resolved": 1,
"total": 3,
"flagged": 2,
"can_complete": false,
"checks_overridden": false,
"held_by": "service:docflow",
"released_at": null,
"created_at": "2026-11-17T09:14:43Z",
"completed_at": null
},
"fields": [
{
"id": "0193b0f2-3c4d-7e5f-8a6b-7c8d9e0f1a30",
"name": "total",
"line_index": null,
"type": "decimal",
"original_value": "1240.00",
"value": "1240.00",
"confidence": 0.3,
"source_page": 2,
"source_quote": "TOTAL DUE $1,240.00",
"flagged": true,
"flag_reasons": [
"Total \u2260 subtotal + tax (1,150.00 + 80.00 = 1,230.00)"
],
"status": "pending"
},
{
"id": "0193b0f2-3c4d-7e5f-8a6b-7c8d9e0f1a31",
"name": "vendor_tax_id",
"line_index": null,
"type": "text",
"original_value": null,
"value": null,
"confidence": 0.62,
"source_page": null,
"source_quote": null,
"flagged": true,
"flag_reasons": [
"Low confidence (0.62)"
],
"status": "not_present"
}
]
}PATCH/tasks/{taskId}/fields/{fieldId}Accept, edit or mark a field as not on the document
Records a person's decision on one field. Any field can be changed again until the task is completed. Signed in
Scope: review:write
Inputs
taskId, fieldIdpathuuidrequired- The field.
- A field of an open task of the caller's.
actionbodystringrequired- What the person decided.
accept,editornot_present.valuebodystringWitheditonly- The corrected value.
- Checked by the field's type:
datea real date asYYYY-MM-DD;decimaldigits with at most 4 decimals;currencyan ISO 4217 code;text1 to 500 characters.
What it does
acceptkeeps the value;editreplaces it;not_presentempties it.- Writes the old and new value, the action, who and when to the field's history, and records
review.field_updated. - When the new value differs from the original, saves an eval candidate (
REVIEW-V1-E4-04). - Also allowed after the task is completed, including after the app has charged for it (Nikhil's decision on #45): the change is recorded the same way, the task stays
completed, and the latest values are the final document. - While the task is held (
REVIEW-V1-E4-06), the owner may decide only flagged fields; an unflagged field answers404 field_not_found, as if it were not there.
Responses
- 200The decision was recorded.
field, and the task's newresolvedandcan_complete. - 404
task_not_foundNo such task, or it belongs to another user. The same answer in both cases. - 422
invalid_datevalueis not a real date. - 422
invalid_decimalvalueis not a decimal number. - 422
invalid_currencyvalueis not an ISO 4217 currency code. - 422
validation_failedactionis unknown, orvalueis missing or sent when not allowed. - 401
not_authenticatedNo valid access token.
Sample request
PATCH /api/review/v1/tasks/0193b0f2-3c4d-7e5f-8a6b-7c8d9e0f1a2b/fields/0193b0f2-3c4d-7e5f-8a6b-7c8d9e0f1a30 HTTP/1.1
Host: 01scale.com
Authorization: Bearer <access token>
Content-Type: application/json
{
"action": "edit",
"value": "1230.00"
}Sample response
{
"field": {
"id": "0193b0f2-3c4d-7e5f-8a6b-7c8d9e0f1a30",
"name": "total",
"line_index": null,
"type": "decimal",
"original_value": "1240.00",
"value": "1230.00",
"confidence": 0.3,
"source_page": 2,
"source_quote": "TOTAL DUE $1,240.00",
"flagged": true,
"flag_reasons": [
"Total \u2260 subtotal + tax (1,150.00 + 80.00 = 1,230.00)"
],
"status": "edited"
},
"task": {
"resolved": 2,
"can_complete": true
}
}POST/tasks/{taskId}/releaseRelease held fields
The holding app lets the owner see and correct every field, once its own condition is met (for DocFlow, the order is paid). Review never knows why. Service
Scope: review:write
Inputs
taskIdpathuuidrequired- The task.
- A held task.
What it does
- Only the holder can release: a delegated token for the task's owner whose
actclaim equalsheld_by. - Sets
released_atand recordsreview.task_released. Safe to call again: a released task answers200unchanged.
Responses
- 200The task is released (now or before).
task. - 404
task_not_foundNo such task, or it belongs to another user. The same answer in both cases. - 403
not_holderThe caller is not the app holding this task. - 409
not_heldThe task was never held. - 401
not_authenticatedNo valid access token.
Sample request
POST /api/review/v1/tasks/0193b0f2-3c4d-7e5f-8a6b-7c8d9e0f1a2b/release HTTP/1.1
Host: 01scale.com
Authorization: Bearer <delegated token, act: service:docflow>Sample response
{
"task": {
"id": "0193b0f2-3c4d-7e5f-8a6b-7c8d9e0f1a2b",
"reference": "docflow:0193b0c4-91aa-7b33-8c44-5d6e7f8a9b0c",
"status": "open",
"resolved": 1,
"total": 3,
"flagged": 2,
"can_complete": false,
"checks_overridden": false,
"held_by": "service:docflow",
"released_at": "2026-11-17T09:20:05Z",
"created_at": "2026-11-17T09:14:43Z",
"completed_at": null
}
}POST/tasks/{taskId}/completeComplete the review
Marks the review finished and returns the values. Allowed once every flagged field is decided. Values can still be corrected afterwards, and every change is recorded. Re-checking the corrected values against the document's rules is the app's step before this, using the LLM Extraction service. Signed in
Scope: review:write
Inputs
taskIdpathuuidrequired- The task.
- An open task of the caller's.
checks_overriddenbodybooleanoptional- True when the person confirmed 'Values are correct as on the document' although a rule check still fails.
- Default false.
What it does
- Sets the task
completed, with who and when, and whether checks were overridden. - Records
review.task_completedand announcesreview.task.completedwith{task_id, reference}. - Completing an already completed task returns it again, unchanged.
Responses
- 200The task is completed.
taskandfinal_values: each field's name, line index and final value. - 404
task_not_foundNo such task, or it belongs to another user. The same answer in both cases. - 409
fields_unresolvedFlagged fields are still pending;unresolved_fields[]lists them. - 401
not_authenticatedNo valid access token.
Sample request
POST /api/review/v1/tasks/0193b0f2-3c4d-7e5f-8a6b-7c8d9e0f1a2b/complete HTTP/1.1
Host: 01scale.com
Authorization: Bearer <access token>
Content-Type: application/json
{
"checks_overridden": false
}Sample response
{
"task": {
"id": "0193b0f2-3c4d-7e5f-8a6b-7c8d9e0f1a2b",
"reference": "docflow:0193b0c4-91aa-7b33-8c44-5d6e7f8a9b0c",
"status": "completed",
"resolved": 2,
"total": 3,
"flagged": 2,
"can_complete": true,
"checks_overridden": false,
"held_by": "service:docflow",
"released_at": null,
"created_at": "2026-11-17T09:14:43Z",
"completed_at": "2026-11-17T09:16:02Z"
},
"final_values": [
{
"name": "vendor_name",
"line_index": null,
"value": "Acme Supplies Ltd"
},
{
"name": "total",
"line_index": null,
"value": "1230.00"
},
{
"name": "vendor_tax_id",
"line_index": null,
"value": null
}
]
}GET/admin/eval-candidatesCorrections that could become eval cases
Every value a person corrected, with what the model said, for the owner to approve as a real model mistake. It is shown only inside the app, to the admin; it is never exported (Nikhil's decision on #41). Admin
Scope: is_admin
Inputs
statusquerystringoptional- Which ones.
candidate,approvedorrejected. Defaultcandidate.cursor, limitquerystring, integeroptional- Paging.
- As for every list;
limit1 to 100.
What it does
- Read only. Shows the field, the two values and the task's reference; no other document content.
Responses
- 200The caller is an admin.
data[]andnext_cursor. - 404
not_foundThe caller is not an admin. - 401
not_authenticatedNo valid access token.
Sample request
GET /api/review/v1/admin/eval-candidates?status=candidate HTTP/1.1
Host: 01scale.com
Authorization: Bearer <access token>Sample response
{
"data": [
{
"id": "0193b101-aa00-7b01-8c02-0d03e04f05a6",
"reference": "docflow:0193b0c4-91aa-7b33-8c44-5d6e7f8a9b0c",
"field_name": "total",
"line_index": null,
"model_value": "1240.00",
"human_value": "1230.00",
"status": "candidate",
"created_at": "2026-11-17T09:15:30Z"
}
],
"next_cursor": null
}PATCH/admin/eval-candidates/{candidateId}Approve or reject a candidate
The manual approval the story requires before any correction becomes ground truth. Admin
Scope: is_admin
Inputs
candidateIdpathuuidrequired- The candidate.
- A candidate with status
candidate. statusbodystringrequired- The decision.
approvedorrejected.
What it does
- Records the decision, who and when. A decision can be changed later.
Responses
- 200Recorded.
candidate. - 404
not_foundNo such candidate, or the caller is not an admin. - 401
not_authenticatedNo valid access token.
Sample request
PATCH /api/review/v1/admin/eval-candidates/0193b101-aa00-7b01-8c02-0d03e04f05a6 HTTP/1.1
Host: 01scale.com
Authorization: Bearer <access token>
Content-Type: application/json
{
"status": "approved"
}Sample response
{
"candidate": {
"id": "0193b101-aa00-7b01-8c02-0d03e04f05a6",
"status": "approved"
}
}GET/admin/accuracyHow often people correct each field
Replaces the export of corrections (Nikhil's decision on #41: a user's data never leaves their account). Numbers only: no values, no references, no user IDs. Admin
Scope: is_admin
Inputs
sincequerydateoptional- Start of the period.
- Default: 30 days ago.
sourcequerystringoptional- All corrections, or only those the admin approved as real model mistakes.
all(default) orapproved.
What it does
- Read only. Counts per field name over the period: fields reviewed, flagged, corrected, marked not present, and approved mistakes; with the correction rate and the share of corrections that had been flagged (how well flagging catches mistakes).
- Every count is shown as it is, however small (Nikhil's decision on #81: hiding small counts would make the report hard to test with few users). Rules that hide small groups come in MVP2 (
REVIEW-V2-E10-04).
Responses
- 200The caller is an admin.
since,totalsandfields[], each with its counts and rates. - 404
not_foundThe caller is not an admin. - 422
validation_failedsinceis not a date. - 401
not_authenticatedNo valid access token.
Sample request
GET /api/review/v1/admin/accuracy?since=2026-11-01 HTTP/1.1
Host: 01scale.com
Authorization: Bearer <access token>Sample response
{
"since": "2026-11-01",
"totals": {
"tasks": 42,
"fields_reviewed": 798,
"corrected": 37,
"correction_rate": 0.046,
"corrections_flagged": 0.92
},
"fields": [
{
"name": "total",
"reviewed": 42,
"flagged": 9,
"corrected": 6,
"not_present": 0,
"approved_mistakes": 5,
"correction_rate": 0.143
},
{
"name": "vendor_tax_id",
"reviewed": 42,
"flagged": 11,
"corrected": 3,
"not_present": 8,
"approved_mistakes": 2,
"correction_rate": 0.071
}
]
}POST/eventsReceive platform events
Where other services' signed events arrive. In version 1 Review acts on one: a user's account was deleted. Service
Scope: None: HMAC signature
Inputs
X-01scale-Signatureheaderstringrequired- Proves the event came from the platform.
- HMAC-SHA256 of the raw body, compared in constant time.
event_id, type, databodyuuid, string, objectrequired- The event.
- Processed once per
event_id; acts onidentity.user.deletedwith{user_id}.
What it does
- Deletes that user's tasks, fields, history and eval candidates, approved ones included (Nikhil's decision on #41). Nothing of theirs is kept.
Responses
- 200Accepted, including a repeat or an ignored type. No body.
- 401
invalid_signatureThe signature is missing or wrong.
Sample request
POST /api/review/v1/events HTTP/1.1
X-01scale-Signature: sha256=8c1f...
Content-Type: application/json
{
"event_id": "0193b2aa-6f01-7c2d-9e3f-4a5b6c7d8e9f",
"type": "identity.user.deleted",
"occurred_at": "2026-11-17T10:00:00Z",
"data": {
"user_id": "0193a5b2-7c1e-7a3f-9b2d-4e6f8a1c2d3e"
}
}Sample response
HTTP/1.1 200 OKErrors
Every error has the same shape and a stable code to branch on.
{
"type": "https://01scale.com/errors/fields_unresolved",
"title": "Fields still to check",
"status": 409,
"detail": "2 flagged fields are still waiting for a decision.",
"code": "fields_unresolved",
"request_id": "req_0193a61f9c2e"
}Handled without an endpoint
- Re-checking corrected values (REVIEW-V1-E4-03)
- The rule checks belong to the LLM Extraction service. The app calls LLM Extraction
POST /validationswith the corrected values before completing the task here, and passeschecks_overriddenif the person confirms values that still fail. Review itself knows no document rules. - Keyboard and touch (REVIEW-V1-E4-02 AC3)
- A design rule of the components: Enter accepts, E edits, ↓ moves to the next field; on phones every action is a large button.
- Events Review announces
review.task.completedwith{task_id, reference}, signed and delivered with retries from the outbox.- DocFlow's endpoint
POST /api/docflow/v1/documents/{documentId}/complete-reviewbelongs to the DocFlow app, which calls Extraction's checks and then this service. It is designed with the DocFlow app shell (DOCFLOW-V1-E0-09).- AI agents
- Each endpoint is a tool on Review's MCP server,
POST /api/review/mcp. An agent can propose corrections; completing a task on a user's behalf requires a user session, not an API key. - Health and contract
- Like every service, Review serves
GET /healthandGET /openapi.jsonfrom the service template (SERVICEKIT-V1-E0-05).
Constraints at the API level
- A task's fields arrive complete with their type, evidence and flags; Review fetches nothing from other services.
- An edit is checked by the field's type: a real date, a decimal with at most 4 places, an ISO 4217 code, or 1 to 500 characters of text.
- A completed task's values can still be corrected; every change is recorded.
- A task completes only when no flagged field is
pending. - Another user's task answers
404 task_not_found; admin endpoints answer404 not_foundto anyone else. - Admin reports show counts and rates only, to the admin alone; no correction is ever exported.
POST /tasksacceptsIdempotency-Key;completeis idempotent by design.