TidyTools

Web page summary (AI)

POST https://tools.yukai.uk/api/v1/summarize

Summarize a URL or text with AI. Summarizes a web page (url) or your own text (up to 100,000 characters) with Llama 3.3 70B. Statements are grounded in the source text only.

Cost

Credits: 54 ($0.0054) per successful call. Failed calls are free. Source price: web-page-summarizer/page-summarized.

Input

Send a JSON body (POST) or the same fields as a query string (GET).

No field is required.

FieldTypeDefaultDescription
urlstringPage to summarize (or send text).
textstringText to summarize instead of a URL (max 100,000 characters).
stylestring"paragraph"Summary shape.
maxWordsinteger80Approximate summary length.
languagestringWrite the summary in this language (e.g. Spanish, Traditional Chinese). Default: the source language.
focusstringWhat the summary should focus on (e.g. pricing and limits).
renderstring"auto"auto (default): plain HTTP first, a real Chrome browser only when the site blocks plain requests or needs JavaScript. never: HTTP only. always: browser only.
timeoutMsinteger20000Page-load timeout in milliseconds.

Examples

Replace tt_live_XXXX with your key from the pricing page.

curl

curl -i -X POST "https://tools.yukai.uk/api/v1/summarize" \
  -H "Authorization: Bearer tt_live_XXXX" \
  -H "Content-Type: application/json" \
  -d '{"url":"https://en.wikipedia.org/wiki/Web_scraping"}'

JavaScript (fetch)

const res = await fetch("https://tools.yukai.uk/api/v1/summarize", {
  method: "POST",
  headers: { "Authorization": "Bearer tt_live_XXXX", "Content-Type": "application/json" },
  body: JSON.stringify({"url":"https://en.wikipedia.org/wiki/Web_scraping"}),
});
console.log(res.status, res.headers.get("x-credits-charged"), res.headers.get("x-credits-balance"));
console.log(await res.json());

Python (requests)

import requests

r = requests.post(
    "https://tools.yukai.uk/api/v1/summarize",
    headers={"Authorization": "Bearer tt_live_XXXX"},
    json={"url": "https://en.wikipedia.org/wiki/Web_scraping"},
    timeout=120,
)
print(r.status_code, r.headers.get("x-credits-charged"), r.headers.get("x-credits-balance"))
print(r.json())

Response

JSON with "success": true and the result fields; on failure {"success": false, "error": {"code", "message", "retryable"}} and no credits are used. Every answer carries x-credits-charged (credits used) and x-credits-balance (balance after the call); check the balance any time with GET https://tools.yukai.uk/v1/billing/balance.

Full field list and response schema: OpenAPI spec web-to-markdown (its servers entry is the marketplace gateway; call https://tools.yukai.uk with your key).

← All routes · Pricing