NewsService

SummarizeArticle

Generate an article summary with language-model provider selection and fallback support, returning the chosen provider, model and reported processing errors.

post/api/news/v1/summarize-article

Request

  • Base URL: https://api.worldmonitor.app
  • URL: https://api.worldmonitor.app/api/news/v1/summarize-article
  • Auth: one of:
    • API key in header X-WorldMonitor-Key
    • API key in header X-Api-Key

Headers

Idempotency-Keystring

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.

Request body

providerstring required

LLM provider: "ollama", "openrouter"

headlinesstring[]
modestring

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

geoContextstring

Geographic signal context to include in the prompt.

variantstring

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

langstring

Output language code, default "en".

systemAppendstring

Optional system prompt append for analytical framework instructions.

bodiesstring[]

Response

OK

summarystring

The generated summary text.

modelstring

Model identifier used for generation.

providerstring

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

tokensinteger

Token count from the LLM response.

fallbackboolean

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

errorstring

Error message if the request failed.

errorTypestring

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

status'SUMMARIZE_STATUS_UNSPECIFIED' | 'SUMMARIZE_STATUS_SUCCESS' | 'SUMMARIZE_STATUS_CACHED' | 'SUMMARIZE_STATUS_SKIPPED' | 'SUMMARIZE_STATUS_ERROR'

SummarizeStatus indicates the outcome of a summarization request.

statusDetailstring

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

Changes

No recorded changes to this operation across all 1 revision of this API.