Skip to main content

Overview

okra documents verify checks a specific claim against a specific page of a document and returns a grounded verdict with visual evidence. It answers “is this claim supported by what’s actually on the page?” — not a page-level approval workflow.
okra documents verify <docId> "<claim>" --page <n>
The vision model reads the page and returns one of three verdicts:
  • supported — the page supports the claim
  • contradicted — the page contradicts the claim
  • not_visible — the claim can’t be confirmed from what’s on the page

Verify a claim

okra documents verify doc-abc123 "Total revenue was $4.2M in FY2023" --page 2
{
  "ok": true,
  "command": "documents verify",
  "result": {
    "verdict": "supported",
    "page": 2,
    "bbox": { "x": 0.12, "y": 0.34, "w": 0.4, "h": 0.05 },
    "evidence_snippet": "Total revenue for the fiscal year ended 2023 was $4.2M.",
    "page_image_url": "https://res.okrapdf.com/v1/documents/doc-abc123/pg_2.png",
    "confidence": 0.96,
    "model": "gemini-3-flash"
  },
  "cost": { "usd": null },
  "citations": [],
  "next_actions": []
}
Every result carries the page, an evidence_snippet of the supporting (or contradicting) text, a page_image_url for visual reference, a confidence score, and the resolved bbox of the evidence on the page.

Focus on a region (--bbox)

Pass --bbox to constrain verification to a region of the page instead of the whole page. Coordinates are normalized { "x", "y", "w", "h" }.
okra documents verify doc-abc123 "The signature is dated March 3" \
  --page 7 \
  --bbox '{"x":0.1,"y":0.8,"w":0.3,"h":0.1}'

Arguments and flags

Argument / FlagDescription
<docId>Document ID (or 6-char short hash) to verify against
<claim>The claim to check, as a quoted string
--page <n>Page number (1-based) to verify against (required)
--bbox <json>Optional region {"x":..,"y":..,"w":..,"h":..} to focus on

Pipe-friendly use

okra documents verify emits the standard envelope, so a verdict is easy to branch on in a script:
verdict=$(okra documents verify doc-abc123 "Revenue grew YoY" --page 2 --json \
  | jq -r '.result.verdict')

[ "$verdict" = "supported" ] && echo "claim holds"
This is the document-level claim check. To verify a PDF-backed claim from an agent (with document_id or a public pdf_url), use the verify_source tool over MCP.