> For the complete documentation index, see [llms.txt](https://cloudbrowser.gitbook.io/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://cloudbrowser.gitbook.io/docs/configurations/ai-functions/summarize.md).

# Summarize

### NodeJS

```javascript
const html = await getHTML("http://www.cloudbrowser.ai");

if (!html) return;

const rp = await ai.summarize({
  html: html,
  responseFormat: {
    properties: {
      response: { type: "string" },
    },
  },
});

console.log(JSON.parse(rp.response).response);
```

### .NET

```csharp
var html = await GetHTML("http://www.cloudbrowser.ai").ConfigureAwait(false);

if (html == null) return;

var rp = await ai.Summarize(new() {
  Html = html
  //ResponseFormat = "{\"response\":\"string\", \"required\":[\"response\"]}"
}).ConfigureAwait(false);

Console.WriteLine("{0}", rp.Response);
```

### **/api/v1/ai/Summarize – Generate a Summary from HTML or Text**

**Method**:\
`POST`

**Parameters**:

* `html`: *(string)* – The content to summarize.
* `isoLang`: *(string, optional)* – The ISO language code for the summary (e.g., `en` for English).
* `responseFormat`: *(string)* – The format of the response (e.g., `text`, `json`).

**Request Example**:

```bash
curl -X POST https://production.cloudbrowser.ai/api/v1/ai/Summarize \
-H "Content-Type: application/json" \
-d '{
  "html": "<html>...</html>",
  "isoLang": "es",
  "responseFormat": "text"
}'
```
