> ## Documentation Index
> Fetch the complete documentation index at: https://docs.getclean.ai/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> getclean's own MCP server is at https://mcp.getclean.ai/mcp. The /mcp path of this docs site is Mintlify's search over these pages, not getclean.
> Every answer of the API opens with outcome. A page that could not be read is a record whose outcome says why, never an HTTP error; read outcome before anything else.
> The API's contract is the OpenAPI 3.1 file at https://docs.getclean.ai/openapi.yaml; the SDKs are generated from it.
> The product's name is written getclean, in lower case.

# Check every sentence of a draft against its source

> Before a report goes out, send its sentences against the records they cite. A quote that is in the source word for word is confirmed without a model. A sentence that nothing in the source supports comes back as not found.

An agent that writes a report can cite a source for a sentence that the source does not support. A person who reads the report cannot see that, and a second read of every source by a person costs what the agent was meant to save. The check can be done by a program, because every record is stored and every passage has a place. A second agent, or one loop of code, sends each sentence against the record it cites and reads the result.

## Check the quotes word for word

A quotation must be in the source as written. Send the quoted words as `highlights` to the record the report cites, with `deterministic_only` set to `true`, so that no model takes part.

```bash cURL theme={"theme":"css-variables"}
curl https://api.getclean.ai/v1/contents/CONTENTS_ID:highlight \
  --header "Authorization: Bearer $GETCLEAN_API_KEY" \
  --header "Content-Type: application/json" \
  --data '{
    "highlights": [
      "interest shall accrue on the overdue amount",
      "at a rate which is 3 per cent. per annum higher",
      "Change of Control",
      "within 5 Business Days of its due date",
      "governed by the laws of"
    ],
    "deterministic_only": true,
    "max_characters": 0
  }'
```

```python Python theme={"theme":"css-variables"}
from getclean import GetClean

client = GetClean()

check = client.highlight_contents(
    contents_id="CONTENTS_ID",
    highlights=[
        "interest shall accrue on the overdue amount",
        "at a rate which is 3 per cent. per annum higher",
        "Change of Control",
        "within 5 Business Days of its due date",
        "governed by the laws of",
    ],
    deterministic_only=True,
    max_characters=0,
)
```

```typescript TypeScript theme={"theme":"css-variables"}
import { GetClean } from "getclean";

const client = new GetClean();

const check = await client.highlightContents("CONTENTS_ID", {
    highlights: [
        "interest shall accrue on the overdue amount",
        "at a rate which is 3 per cent. per annum higher",
        "Change of Control",
        "within 5 Business Days of its due date",
        "governed by the laws of",
    ],
    deterministic_only: true,
    max_characters: 0,
});
```

Replace `CONTENTS_ID` with the id of the record that the report cites.

This request checks 5 quotes of one draft in one call. Of the 5, 3 are in the agreement as quoted. The second is not: the agreement says 2 percent, and the draft says 3. The fourth is not there either: the draft quotes a grace period that the agreement does not have. This response is cut to the 2 parts that say so.

```json 200 OK theme={"theme":"css-variables"}
{
  "highlights": [
    { "query_index": 0, "text": "interest shall accrue on the overdue amount", "basis": "exact" },
    { "query_index": 2, "text": "Change of Control", "basis": "exact" },
    { "query_index": 4, "text": "governed by the laws of", "basis": "exact" }
  ],
  "notices": [
    { "code": "highlight_not_found", "pointer": "/highlights/1" },
    { "code": "highlight_not_found", "pointer": "/highlights/3" }
  ]
}
```

A quote is confirmed if it has a highlight whose `basis` is `exact` or `near`. A quote with the notice `highlight_not_found` goes back to the writer. The check costs nothing, and the same draft against the same records gives the same result on every run.

## Check the sentences that are not quotes

A sentence in the report's own words has no match word for word. Send it without `deterministic_only`. A model then looks for the blocks of the source that bear on the sentence.

| Result | What to do with the sentence |
| - | - |
| A `judged` highlight | Read the passage it returns beside the sentence, because a model chose it and the decision that it supports the sentence is yours or your second agent's. |
| `highlight_not_found` | Nothing in the source bears on the sentence, so send it back to the writer. |

One call takes up to 5 sentences, and one call costs one model step if any of them needs a model.

## Check that the reader will see the same source

A check proves a sentence against the record. The reader opens the live page, which might have changed after the fetch. Fetch the page again with the record's `fingerprint` as `baseline_fingerprint` before the report goes out. For the request, see [Find the one cell that changed](https://docs.getclean.ai/read/track-what-changed.md).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.