Skip to main content
POST
Check page for AI-sounding prose
Ce point de terminaison analyse une page MDX ou Markdown à la recherche de prose qui semble générée par IA et renvoie les passages signalés avec leurs plages de lignes, ainsi que des suggestions optionnelles de réécriture au style humain. Utilisez-le pour repérer le contenu rédigé par IA avant qu’il n’atteigne la production, ou pour exécuter les mêmes vérifications que la CLI mint deslop depuis un pipeline CI ou un outil interne. Le frontmatter, les blocs de code délimités et le code en ligne sont supprimés avant l’évaluation, de sorte que seule la prose est analysée.

Crédits

Chaque page évaluée consomme 1 crédit IA du pool partagé de crédits IA également utilisé par l’assistant. Les pages de moins de 50 mots sont ignorées gratuitement (skipped: "too_short") avant la vérification des crédits.

Utilisation

Autorisations

Authorization
string
header
requis

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.

Paramètres de chemin

projectId
string
requis

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

Corps

application/json
path
string
requis

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
requis

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

Réponse

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.

Options disponibles:
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.