Skip to main content
POST
SummarizeArticle

Authorizations

X-WorldMonitor-Key
string
header
required

User-issued WorldMonitor API key.

Headers

Idempotency-Key
string

Optional client-generated idempotency key. Retrying a POST with the same key and an identical request body replays the original response (only the status, body, and Content-Type are reproduced) instead of re-executing; reusing the key with a different body is rejected with 422. For mutations this avoids duplicating the side effect, while for batch-read POSTs it replays a cached snapshot that can be up to 24 hours stale. Keys are scoped per authenticated caller (falling back to the source IP for unauthenticated endpoints) and retained for 24 hours.

Required string length: 1 - 255
Pattern: ^[\x21-\x7E]{1,255}$

Body

application/json

SummarizeArticleRequest specifies parameters for LLM article summarization.

provider
string
required

LLM provider: "ollama", "groq", "openrouter"

Minimum string length: 1
headlines
string[]
Minimum array length: 1

Headlines to summarize. Up to 10 raw headlines are used for request identity/cache matching; the LLM prompt uses up to 5 unique, non-empty sanitized headline/body pairs.

mode
string

Summarization mode: "brief", "analysis", "translate", "" (default).

geoContext
string

Geographic signal context to include in the prompt.

variant
string

Variant: "full", "tech", or target language for translate mode.

lang
string

Output language code, default "en".

systemAppend
string

Optional system prompt append for analytical framework instructions.

bodies
string[]

Optional article bodies paired 1:1 with headlines. When bodies[i] is non-empty, the prompt interleaves it as grounding context under headlines[i]; when empty, behavior is identical to headline-only today. Callers may supply a shorter array; missing entries are treated as empty. Each body is subject to the same sanitisation as headlines before reaching the LLM prompt.

Response

Successful response

SummarizeArticleResponse contains the LLM summarization result.

summary
string

The generated summary text.

model
string

Model identifier used for generation.

provider
string

Provider that produced the result (or "cache").

tokens
integer<int32>

Token count from the LLM response.

fallback
boolean

Whether the client should try the next provider in the fallback chain.

error
string

Error message if the request failed.

errorType
string

Error type/name (e.g. "TypeError").

status
enum<string>

SummarizeStatus indicates the outcome of a summarization request.

Available options:
SUMMARIZE_STATUS_UNSPECIFIED,
SUMMARIZE_STATUS_SUCCESS,
SUMMARIZE_STATUS_CACHED,
SUMMARIZE_STATUS_SKIPPED,
SUMMARIZE_STATUS_ERROR
statusDetail
string

Human-readable detail for non-success statuses (skip reason, etc.).