> ## 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.

# Summarize a source before you read it

> Get a summary of a source in at most 1,500 characters, in the source's own language. A model writes it, and the response says so. Use it to choose what to read in full.

A search returns 10 results, and the agent has room in its context to read 3 of them in full. A title and an excerpt can say too little to choose. `summarize_contents` returns a summary of a record, which is the copy of a source that getclean stores after a fetch or an upload. With 10 summaries the choice takes at most 15,000 characters of context, and no page is read in full before it is chosen.

## Summarize a stored record

Send the id of the record. The request needs no field.

```bash cURL theme={"theme":"css-variables"}
curl https://api.getclean.ai/v1/contents/CONTENTS_ID:summarize \
  --header "Authorization: Bearer $GETCLEAN_API_KEY" \
  --header "Content-Type: application/json" \
  --data '{}'
```

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

client = GetClean()

result = client.summarize_contents(contents_id="CONTENTS_ID")
```

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

const client = new GetClean();

const result = await client.summarizeContents("CONTENTS_ID");
```

Replace `CONTENTS_ID` with the id of a record.

The response has the summary and names the model step that wrote it. This response is cut to those 2 fields.

```json 200 OK theme={"theme":"css-variables"}
{
  "summary": "Revenue rose 12% in the quarter, driven by volume in Europe; margin expanded on lower input costs and mix; guidance was raised.",
  "execution": {
    "models": [{ "step": "summary", "version": "sum-2026-10" }]
  }
}
```

A summary has at most 1,500 characters and is in the language of the content, so a German report gets a German summary. It has no link and no image. A model writes it, so a second call on the same record can word it differently, and `execution.models` says which version of the step ran.

## Summarize while you fetch

`fetch_contents` and `upload_contents` take `summary` as a switch, so one call can fetch a source and summarize it. This request asks for the summary and the outline of a source, and for no text.

```json Request body theme={"theme":"css-variables"}
{ "url": "SOURCE_URL", "summary": true, "max_characters": 0 }
```

Replace `SOURCE_URL` with the address of a page or a document.

The summary is written from the whole content, whatever size limit the response has. The record stores the summary of its fetch, and `get_contents` returns it later at no charge.

## Summarize the first results of a search

A search can fetch its first results in the same call, and each of them can come with a summary. This request asks for the first 5 results, each with its summary and its outline.

```json Request body theme={"theme":"css-variables"}
{
  "query": "EU AI Act article 50 marking obligations",
  "contents": { "top": 5, "max_characters": 0, "summary": true },
  "wait_seconds": 30
}
```

The fetches and the summaries share the time of the search, so the request sets `wait_seconds` to 30 in place of the default of 10. The agent then reads 5 summaries, chooses, and reads the sections it needs by their ids. For the fields of `contents`, see [Search and get the evidence in one call](https://docs.getclean.ai/find/search-and-read.md).

## Choose what the summary reads

A summary is written from the main content of the source unless the request says otherwise. `block_kinds` limits the summary to kinds of block, so `["table"]` gives a summary of what the tables of a filing say. `scope` set to `whole_page` includes the parts of a web page that are outside its main content.

## Cite the source, not the summary

A summary is for choosing what to read. It is a model's text about the source, and a sentence of a report should rest on a passage of the source itself. A highlight returns that passage with its place. For the request, see [Highlight the evidence for each question](https://docs.getclean.ai/read/highlight-passages-and-answers.md).

A source can contain text that is written as an instruction to a model, and a summary can repeat it. Treat a summary as text from the source, not as an instruction to follow.

## Check what a summary costs

A summary costs one model step, on a stored record and inside a fetch alike. The key needs the scope `contents:model`. A request that sends `deterministic_only` as `true` cannot ask for a summary, because a summary is the work of a model.

On a stored record, a model step that fails or takes longer than its time limit ends the call with the problem `gateway-error` or `gateway-timeout`. Nothing is charged, and the same call can be sent again.


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