---
title: "Get Marketing Ocr Confidence"
method: GET
path: "/internal/reliability/marketing/ocr-confidence"
tags: ["internal"]
---

# Get Marketing Ocr Confidence

`GET /internal/reliability/marketing/ocr-confidence`

Week-over-week Google Document AI OCR confidence for marketing files.

Poor OCR feeds wrong text to the LLM, which surfaces as bad marketing
analyses downstream -- this trend tells us whether OCR quality is improving
as we tune it. Scoped to marketing collateral; optionally narrowed to a
single company (mirrors the failure view's company drill-down).

## Query parameters

- `weeks` integer
- `company_id` string, uuid, nullable

## Response `200`

Successful Response

- MarketingOcrConfidenceResponse — OCR-confidence trend + distribution for processed marketing files. Drives the weekly average line (`weekly`), the KPI cards (`totals`), and the distribution bars (`distribution`) on the marketing reliability page.
  - `weekly` WeeklyOcrConfidencePoint[], required
    - `week_start` string, date, required
    - `files` integer, required
    - `avg_confidence` number, nullable, required
    - `min_confidence` number, nullable, required
    - `low_confidence_files` integer, required
  - `distribution` OcrConfidenceDistribution, required — Window-wide file counts per confidence band.
    - `low` integer, required
    - `medium` integer, required
    - `high` integer, required
  - `totals` OcrConfidenceTotals, required — Window-wide OCR-confidence totals for the current scope (KPI cards).
    - `files` integer, required
    - `avg_confidence` number, nullable, required
    - `low_confidence_files` integer, required
    - `low_confidence_pct` number, required
  - `weeks` integer, required

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.dev/kobaltlabs/apis/fastapi.md) · [All operations](https://skmtc.dev/kobaltlabs/apis/fastapi/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/kobaltlabs/fastapi/revisions/3ff4c0bd276b/schema)
