# Summarize a PDF

A plain summary and key points, each with the pages it comes from. Priced like ask.

`POST /v1/ai/summarize`

## Request

```bash title="curl"
curl -X POST https://api.fynepdf.com/v1/ai/summarize \
  -H "Authorization: Bearer $FYNEPDF_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"file_id":"file_01jc8x4m2k9q7r3t5vwy6z","length":"short","focus":"risks and deadlines"}'
```

```js title="Node"
import FynePDF from "fynepdf";

const fyne = new FynePDF(); // reads FYNEPDF_API_KEY
const summary = await fyne.ai.summarize({
  file_id: "file_01jc8x4m2k9q7r3t5vwy6z",
  length: "short",
  focus: "risks and deadlines"
});
```

```python title="Python"
from fynepdf import FynePDF

fyne = FynePDF()  # reads FYNEPDF_API_KEY
summary = fyne.ai.summarize(
    file_id="file_01jc8x4m2k9q7r3t5vwy6z",
    length="short",
    focus="risks and deadlines",
)
```

## Body

| Parameter | Type | Required | What it does |
|---|---|---|---|
| `file_id` | string | yes |  |
| `length` | "short" · "medium" · "long" |  |  |
| `focus` | string |  |  |

## Response

The summary.

| Field | Type | Required | What it does |
|---|---|---|---|
| `object` | "summary" | yes |  |
| `summary` | string | yes |  |
| `key_points` | array of object | yes |  |
| `pages_read` | array of integer | yes |  |
| `credits` | integer | yes |  |
| `test` | boolean |  |  |

## Errors

Errors are [problem details](https://fynepdf.com/developers/docs/errors) (RFC 9457) with a `code` you can branch on and a `request_id` for support.


---

Open this page in a browser: https://fynepdf.com/developers/docs/api/summarize-pdf

More: [All tools](https://fynepdf.com/tools) · [AI agents](https://fynepdf.com/ai/agents) · [llms.txt](https://fynepdf.com/llms.txt) · [Sitemap](https://fynepdf.com/sitemap.xml)
