Skip to main content
POST
Check page for AI-sounding prose
This endpoint scans an MDX or Markdown page for AI-sounding prose and returns line-mapped flagged passages with optional human-style rewrite suggestions. Use it to catch AI-drafted content before it reaches production, or to run the same checks the mint deslop CLI runs from a CI pipeline or internal tool. Frontmatter, fenced code blocks, and inline code are stripped before scoring, so only prose is analyzed.

Credits

Each scored page charges 1 AI credit from the shared AI credits pool used by the assistant. Pages under 50 words are settled as a free skip (skipped: "too_short") before the credit check runs.

Usage

Authorizations

Authorization
string
header
required

The Authorization header expects a Bearer token. Use an admin API key. This is a server-side secret key. Generate one on the API keys page in your dashboard.

Path Parameters

projectId
string
required

Your project ID. Can be copied from the API keys page in your dashboard.

Body

application/json
path
string
required

Identifier for the page being checked. Echoed back in the response and used to key results when checking multiple pages.

Minimum string length: 1
content
string
required

Raw MDX or Markdown content of the page. Frontmatter, code blocks, and inline code are stripped before scoring so only prose is analyzed.

Maximum string length: 1000000

Response

Page checked successfully. skipped is null for scored pages, or a reason string (for example, too_short) when the page was not scored. Scored pages include the AI-written fractions, per-window flagged passages with line ranges, and any rewrite suggestions.

path
string

Echo of the path from the request.

skipped
string | null

Reason the page was skipped without scoring, such as too_short when the page is under 50 words. null when the page was scored.

predictionShort
enum<string>

Short label for the overall verdict. One of Human, AI-Assisted, Mixed, or AI.

Available options:
Human,
AI-Assisted,
Mixed,
AI
fractionAi
number

Fraction of prose (0-1) that reads as fully AI-written.

fractionAiAssisted
number

Fraction of prose (0-1) that reads as AI-assisted.

fractionHuman
number

Fraction of prose (0-1) that reads as human-written.

windows
object[]

Flagged passages with line ranges from the original page and optional rewrite suggestions.

creditsCharged
integer

AI credits charged for this request. 1 for scored pages, 0 for skipped pages.