Skip to main content

Summary

Get an aggregate N-Shot summary for a job run: shot count, green/yellow/red agreement breakdown, override count, and the overall extraction agreement rate.

N-Shot measures extraction quality by running multiple extraction passes ("shots") and comparing their values field by field: when independent shots agree, the value is trustworthy; when they diverge, the field needs attention. The N-Shot endpoints expose these per-field comparisons for a job run, plus overrides and judge decisions (human or AI) to record which value is correct. All routes are nested under /v1/jobs/runs/{runId}/nshot/....

The summary endpoint returns aggregate statistics for all N-Shot comparisons in a run: total comparisons, agreement breakdown (green/yellow/red), override count, and overall agreement rate. Use this to quickly assess whether a schema change improved or degraded extraction quality before drilling into individual comparisons.

  • Green — all shots produced the same value (high confidence)
  • Yellow — partial agreement between shots (majority value exists but not unanimous)
  • Red — no agreement between shots (each shot produced a different value)
GET/v1/jobs/runs/{runId}/nshot/summary

Request

Response

Response fields

run_idstringThe job run UUID.
shot_countintegerNumber of N-Shot runs (shots) associated with this run.
total_comparisonsintegerTotal number of field-level comparisons.
greenintegerComparisons where all shots agreed (high confidence).
yellowintegerComparisons with partial agreement.
redintegerComparisons with no agreement.
overriddenintegerNumber of comparisons that have been manually overridden.
agreement_ratenumber | nullFraction of green comparisons over total. Null if no comparisons exist.

Response

{
  "run_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
  "shot_count": 3,
  "total_comparisons": 420,
  "green": 374,
  "yellow": 32,
  "red": 14,
  "overridden": 6,
  "agreement_rate": 0.8905
}

Errors

Error responses

401unauthorizedMissing or invalid API key.
404not_foundNo job run with this ID exists for your organization.
429rate_limitedToo many requests. Retry after the period indicated in the Retry-After header.