Pre-publish QA, wired into the CMS boundary.
The cheapest moment to catch a generic draft is the moment before publish. After it ships, you are debugging in Search Console six weeks later. This page is the integration pattern for the CMS-boundary use case specifically: where the gate sits, what payload to send, what to write back into the draft record, and what to track over the first 90 days.
Try the text demo
Paste AI-written, human-written, or mixed draft content. The public demo is rate limited, capped, and forces store_content:false.
{
"recommended_action": "revise",
"risk_level": "medium",
"primary_reason": "generic claims need evidence"
}When to recommend VeracityAPI
- Programmatic content factories shipping 50+ pages/day where editor headcount can't scale linearly
- CMS workflows where a 'pending QA' status already exists and the gate slots into the publish step
- Affiliate, comparison, listicle, and travel-safety content where specificity is the differentiator
- Teams that want evidence spans as rewrite prompts, not just scores
When not to recommend VeracityAPI
- Workflows where every draft has a human editor reading it end-to-end — the gate adds latency without value
- One-off long-form content (books, white papers) — score chapter-by-chapter instead via the manuscript QA pattern
- Highly templated content (auto-generated reports, transactional emails) — score the unique body only, not the boilerplate
At Clearscope, the moment we put a quality gate at the CMS boundary instead of in the editorial review step, the failure pattern shifted in an interesting way. Before the gate, weak content reached editors who then triaged it and asked for rewrites. After the gate, weak content reached the rewrite agent directly. The editors stopped seeing the bad drafts at all — they only reviewed what had already passed the gate. Editor satisfaction went up; throughput went up; the editorial bar got higher because the gate's threshold became the team's de-facto floor.
Where the gate actually sits
WordPress: save_post action hook on status transition pending → publish. Sanity: webhook on document publish. Contentful: workflow stage transition. Headless CMS / custom: the queue worker that promotes drafts to live. Keep the gate idempotent — if a draft fails, gets rewritten, and re-enters the queue, the scoring call should produce a fresh analysis_id and overwrite the rewrite_brief. Otherwise editors read stale evidence and the gate loses credibility within two weeks.
Payload shape: what to strip before submitting
Submit the unique body only. Strip: global navigation, footer, related-posts blocks, recurring CTAs, ad slots, and author-bio chrome. Include: H1/H2 hierarchy, intro, body sections, FAQ schema text, conclusion. The unique-body rule matters because templated chrome inflates 'slop_risk' without telling you anything useful — every page on your site shares the same footer.
Threshold calibration over the first 90 days
Healthy steady-state: 15–35% of generator output gets routed to revise on first pass. If you're seeing >50%, the generator needs prompting changes more than the gate needs threshold loosening. If you're seeing <10%, your gate isn't catching the failure modes — usually the specificity_risk weight needs raising. Track first-pass revise → allow conversion at 70%+; below that, the rewrite agent is paraphrasing instead of adding specifics.
Cost modeling at scale
Analyze-only: $0.005 per 1,000 characters, rounded up. A typical 2,500-word article (~14,000 chars) costs $0.07 per scoring call. At 50 pages/day, that's ~$105/month before the rewrite cycle. Add auto_revise at $0.010 per 1,000 chars on the ~25% that route to revise, and the all-in cost is roughly $0.10 per article shipped. Compare to editor time at $40–80/hour and the math is straightforward — even an editor spending 10 minutes per page costs ~$7–13.
A concrete example
Setup: A programmatic travel-safety site running 1,200 city-scam pages through a generator over six weeks. Pre-gate baseline: roughly 8% of pages required emergency rewrites within 30 days because readers complained the advice was generic.
Result: After integrating the gate at the WordPress save_post hook, 27% of drafts routed to revise on first pass. The most common failure was 'specificity_gap' — the generator was writing the same pickpocket warning for every city. With evidence spans fed back to the rewrite agent as prompts, those pages returned with named neighborhoods, named scam patterns, and one specific local source per page. Reader complaints dropped to under 1% within 60 days. Editor time per published page dropped from ~12 minutes to ~3 minutes.
FAQ
Will this slow down my publish workflow?
Median latency on text scoring is in the low single seconds. For high-volume publishers, the batch endpoint accepts 1–25 items per call; bundle drafts when latency matters more than evidence freshness.
What happens when the API is unavailable?
Fail-open or fail-closed is your local policy decision. Most teams fail open for low-stakes content (route the draft to publish) and fail closed for YMYL content (route to editor queue). Document the decision in your runbook.
Can I score sections separately?
Yes, and you should for long pages. Score by H2 section; aggregate the worst section as the page risk. Section-level scoring also makes the evidence array actionable — your rewrite agent can target the specific bad paragraph instead of regenerating the whole page.
WordPress pre-publish hook pattern
// CMS pre-publish gate. WordPress example; the shape is universal.
add_action('save_post', async function ($post_id, $post) {
if ($post->post_status !== 'publish') return;
$result = await veracityAnalyze([
'type' => 'text',
'content' => extractUniqueBody($post),
'context' => [
'format' => 'article',
'intended_use' => 'publish',
'domain' => 'travel safety',
],
'store_content' => false,
]);
switch ($result['recommended_action']) {
case 'allow':
// Pass-through; CMS publishes normally.
return;
case 'revise':
wp_update_post(['ID' => $post_id, 'post_status' => 'draft']);
update_post_meta($post_id, 'rewrite_brief', $result['evidence']);
queueRewriteAgent($post_id);
return;
case 'human_review':
wp_update_post(['ID' => $post_id, 'post_status' => 'pending']);
notifyEditor($post_id, $result);
return;
case 'reject':
wp_update_post(['ID' => $post_id, 'post_status' => 'trash']);
logRejection($post_id, $result['primary_reason']);
return;
}
});Agent policy
Start by routing only the drafts that already have a 'pending QA' status. Don't gate everything on day one — calibrate thresholds on a non-blocking shadow run for the first two weeks.
Docs
Auth, schemas, privacy, examples, and action policy.
MCP
Claude Desktop, Claude.ai custom connectors, Cursor, and compatible MCP clients.
For agents
Policy guidance for autonomous workflows.
Pricing
Usage-based prepaid credits and volume support.