---
title: "Summarize a URL or text"
method: POST
path: "/text/summarize"
tags: ["text"]
---

# Summarize a URL or text

`POST /text/summarize`

## Request

- Base URL: `https://api.krater.ai/v1`
- URL: `https://api.krater.ai/v1/text/summarize`
- Auth: HTTP bearer

Summarize the content of a web page (pass url) or a raw text (pass text). Provide exactly one of the two.

## Request body

- object
  - `url` string, uri: URL of the page to summarize.
  - `text` string: Raw text to summarize.

## Response `200`

Summary.

- object
  - `summary` string
  - `source` string: The summarized URL, when a url was provided.

## Other responses

- `400`: Invalid request body or parameters.
- `401`: Missing or invalid API key. Pass Authorization: Bearer kr_live_...
- `402`: Not enough credits, or the API key's daily credit cap is reached.
- `429`: Rate limit exceeded (default 60 requests per minute per key). Includes a Retry-After header.

---

[API](https://skmtc.dev/krater/apis/krater-api.md) - [All operations](https://skmtc.dev/krater/apis/krater-api/llms.txt) - [OpenAPI document](https://skmtc.dev/krater/apis/krater-api/revisions/66005541188c?raw)
