Keyword → Blog API

Reference

Content quality pipeline

The API never returns the first thing the model generates. Every request goes through one of two pipelines depending on the topic — see below — but both share the same principle: deterministic validation decides what’s good enough, and Anthropic is used as sparingly as possible to get there.

Evergreen pipeline (most requests)

Used for topics that aren’t freshness-sensitive (see below). Never spends more than 2 Anthropic calls total.

  1. A content brief and internal SEO plan are derived from your request (keywords, topic, audience) and folded into the generation prompt.
  2. The model generates a first draft — Anthropic call 1 of at most 2.
  3. Deterministic validators run across writing quality, originality, depth, SEO, keywords, readability, structure, spam signals, factuality, and freshness. If nothing fails, the response returns immediately.
  4. Anything mechanically fixable (slug format, a stray year in the title, clickbait phrasing, a too-short title, a generic/thin meta description, duplicate headings, weak FAQs, a keyword-stuffed heading) is corrected locally, in code, with zero extra AI calls — then re-validated. If that’s enough, the response returns here.
  5. Only if a genuine semantic problem remains (writing quality, originality, depth, or keyword-density issues that require real rewriting) is ONE targeted repair call made — Anthropic call 2 of at most 2. It receives only the specific failed checks and returns a minimal patch of just the fields/sections that need to change, never the whole article rewritten from scratch.
  6. The patch is merged onto the existing post — everything not in the patch is preserved exactly — and validated again, followed by one more free mechanical cleanup pass.
  7. The request fails with CONTENT_QUALITY_FAILED only if a genuine, unresolved quality problem remains after this — never merely because a cosmetic/non-critical check is still imperfect, and never by silently lowering the bar.

Source-grounded pipeline (freshness-sensitive topics)

Used automatically for topics touching prices, software versions, laws, regulations, current statistics, or recent events (see below). Makes at most ONE Anthropic call — never a repair call — and can make zero Anthropic calls at all if no sufficient real source material is found.

  1. Real news articles are retrieved from four independent providers (Currents API, NewsData.io, NewsAPI.org, and GDELT) in parallel. One provider failing, timing out, or being unavailable never blocks the others.
  2. Retrieved articles are normalized, deduplicated (identical/near-identical URLs and headlines collapse to one entry), and validated: published within the last 7 days with a real, parseable timestamp; genuinely relevant to the request (not just an incidental keyword match); meeting basic source-quality bars (a valid URL, a real title, real description/content text); and free of unresolved conflicts (sources covering the same story with contradicting figures are excluded rather than guessed between).
  3. If validation doesn’t yield enough real, trustworthy evidence, retrieval retries with a broader query — up to 3 attempts total. The freshness window is never relaxed to force a pass. If all 3 attempts fail, the request fails with SOURCE_VALIDATION_FAILED and Anthropic is never called.
  4. Once validation passes, the approved source set is locked. Anthropic is called exactly once, purely as an editorial rewriter — it reads the locked evidence for factual grounding only and is instructed to write a completely fresh, independently-authored article: no copying or closely paraphrasing source sentences, no preserving a source’s structure, and no naming sources/publishers in the prose by default. It is explicitly instructed never to add facts from its own memory.
  5. A source list is tracked internally, built deterministically from the locked source pack in code (never from text the model wrote), and used only to verify every claim traces back to real evidence. It is never published. The returned post and rendered markdown/HTML contain zero source URLs, markdown links, <a> tags, citation brackets, or a “Sources”/“References” section — the model is instructed never to write one, and a deterministic strip runs unconditionally on every generated post (evergreen and source-grounded alike) as a final safety layer regardless of what the model actually did.
  6. Deterministic validators then run once (the same categories as the evergreen pipeline, plus citation integrity, a source-originality check, and a hard backstop check that no link/citation markup survived). The source-originality check compares the article against the actual retrieved source text for excessive verbatim/near-verbatim overlap — copied sentences or closely paraphrased paragraphs are blocked — while ignoring the unavoidable overlap of names, companies, technical terms, and factually-required numbers/dates. If a genuine problem remains, the request fails with CONTENT_QUALITY_FAILED — there is no second Anthropic call to try to fix it.

What gets checked

CategoryWhat it looks for
Writing qualityGeneric openings/closings, filler phrases, repetitive sentence structure or starters.
OriginalityDuplicate/near-duplicate sentences, duplicate headings, excessive verbatim phrase repetition — plus, for freshness-sensitive topics, excessive copying from the real source material itself.
Expert depthSection length and concrete-detail markers (numbers, named specifics, examples, lists) — never word count alone.
SEOTitle, meta description, slug format, heading structure, and FAQ quality.
Keyword qualityNatural coverage of the primary keyword and related terms, and unnatural density (stuffing).
ReadabilitySentence/paragraph length, adjusted for the requested audience.
StructureSection ordering and shape beyond what the JSON schema alone enforces.
Spam signalsKeyword-stuffed headings and pushy commercial language out of place in informational content.
FactualitySee below — standard vs. verified mode.
FreshnessSee below — freshness-sensitive topics are grounded in real, retrieved news sources, not the model's own knowledge.

This is a quality/pattern-detection system, not an “AI detector” — it never reports an AI-probability score or claims content is undetectable as AI-written. It reports concrete, explainable signals (repetition, phrase frequency, structural shape) instead.

Factuality: standard vs. verified

By default (factualityMode: "standard", or the field omitted entirely), content is generated from the model’s own knowledge. It is checked for internal consistency, but the API never claims external facts were independently verified.

Setting factualityMode: "verified" requests source-backed verification of factual claims. For a freshness-sensitive topic (see below), this is honored for real — the request goes through the source-grounded pipeline, which retrieves and validates real news sources before generation, and the response is reported as genuinely VERIFIED. For a topic that isn’t freshness-sensitive, there is no source-retrieval step to verify anything against, so rather than fabricate sources, citations, or statistics, the request fails honestly with CONTENT_QUALITY_FAILED instead.

Freshness-sensitive topics

Topics touching prices, software versions, laws, regulations, current statistics, or recent events are detected automatically and routed to the source-grounded pipeline described above. Anthropic is never the source of truth for what’s current — real articles are retrieved from four independent news providers first, and only evidence that survives freshness, relevance, quality, deduplication, and conflict validation is ever shown to the model.

Freshness is a rolling 7-day window, not “published today only” — an article from three days ago is valid, current evidence, while a source with no parseable publication date, or one older than 7 days, is rejected outright and never counts toward the required evidence. When multiple sources cover the same underlying story but report contradicting figures or dates, that claim is excluded entirely rather than guessed between — the pipeline never merges or silently picks a side of a genuine conflict. A current-state claim in the final article is always backed by one of these verified sources; there is no fallback to the model’s own training-data knowledge, and no repair call to patch things up if the initial evidence turns out to be insufficient. If sufficient real evidence can’t be found after 3 retrieval attempts, the request fails with SOURCE_VALIDATION_FAILED — the model is never called at all in that case.

What you see in the response

Every successful response (sync, job polling, and the job.succeeded webhook) includes a minimal quality summary — the full internal scoring breakdown is intentionally not part of the public contract:

quality summary
{
  "quality": {
    "status": "pass",
    "score": 91,
    "revisionCount": 0,
    "qualityVersion": "1.0.0"
  }
}

When it can’t be fixed

If a genuine problem remains after the deterministic pass and the one repair call, the request fails instead of returning substandard content. details.failedCheckCodes lists which internal checks were still failing — see error codes for the full list.

422
{
  "error": {
    "code": "CONTENT_QUALITY_FAILED",
    "message": "Generated content did not meet the required quality standard after automatic revision.",
    "requestId": "req_77889900ee",
    "details": {
      "revisionCount": 2,
      "overallScore": 61,
      "failedCheckCodes": [
        "LOW_EXPERT_DEPTH",
        "KEYWORD_STUFFING"
      ]
    }
  }
}

Sync vs. async behavior

POST /v1/generate runs the full pipeline inline and returns CONTENT_QUALITY_FAILED as an HTTP 422 if it can’t pass. POST /v1/jobs runs the identical pipeline in the background; a job that can’t pass ends in status: "failed" with the same error code in job.error, and the same information in a job.failed webhook if one is configured. Usage metering and rate limits apply the same way regardless of whether the pipeline needed its one repair call — you are billed for the one request you made, not for internal fix attempts.