Skip to main content
POST
Detect AI-sounding prose in a page
This endpoint analyzes a documentation page for AI-generated prose and returns flagged passages with suggested human rewrites. Authenticate with an admin API key.

Credits

  • Consumes 1 AI credit per checked page.
  • Pages under 50 words are skipped and not charged. The response returns skipped: "too_short" with creditsCharged: 0.
  • If detection is temporarily unavailable, the endpoint returns 503 and no credit is charged.

Response

Checked pages return a verdict (predictionShort), AI and human fractions, and a windows array of flagged passages. Each window includes a line range and a suggested rewrite.

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

Repo-relative path of the page, used for reporting only.

Minimum string length: 1
content
string
required

The raw MDX or Markdown content of the page to check.

Minimum string length: 1

Response

The page was checked, or skipped because it was too short.

path
string
required

The path from the request.

skipped
enum<string> | null
required

Reason the page was skipped, or null when the page was checked. too_short means the page had fewer than 50 words of prose and was not charged.

Available options:
too_short,
null
creditsCharged
integer
required

AI credits charged for this request (0 when skipped).

predictionShort
enum<string>

Overall verdict for the page. Present only when the page was checked.

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

Fraction of the page detected as AI-generated (0-1).

fractionAiAssisted
number

Fraction detected as AI-assisted (0-1).

fractionHuman
number

Fraction detected as human-written (0-1).

windows
object[]

Flagged (non-human) passages. Present only when the page was checked.