Summarize

Generate a summary from an HTML document or plain text.

NodeJS

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

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:

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

Last updated