Detect

Detect AI-generated text

Score any text for AI authorship. Returns an overall verdict (AI / human / mixed) with confidence, the AI / human / AI-assisted fractions, and a segment-by-segment breakdown showing which parts read as AI-written - each segment carries its full text, its char offsets into the text you submitted, and a humanizer flag (AI output run through paraphrasing/'humanizer' tools). Price scales with length: $0.06 per 100 words, rounded up, minimum $0.06 - the exact amount is in the 402 challenge for the body you post. Max input 20,000 characters. The legacy tier field is accepted and ignored: every call runs the highest-accuracy detection class.

post/api/v1/detect/ai

Request

  • Base URL: https://glim.sh
  • URL: https://glim.sh/api/v1/detect/ai
  • Auth: one of:
    • none
    • API key in header x-api-key
    • HTTP bearer
    • API key in query parameter apiKey

Request body

textstring required

Text to analyze, plain text, 50+ characters, max 20,000. Detection reliability improves with length; very short texts return lower-confidence verdicts.

Response

Detection verdict with per-segment breakdown

headlinestring required

Short verdict, e.g. 'AI Generated', 'AI Detected', 'Human Written'

predictionstring required

One-sentence verdict in plain English

prediction_shortstring required

Verdict class: AI, Mixed, or Human

fraction_ainumber required

Fraction of the text judged AI-generated, 0-1

fraction_ai_assistednumber required

Fraction judged AI-assisted, 0-1

fraction_humannumber required

Fraction judged human-written, 0-1

num_ai_segmentsinteger required

Segments labeled AI-Generated

num_ai_assisted_segmentsinteger required

Segments labeled AI-Assisted

num_human_segmentsinteger required

Segments labeled Human

confidencestring required

Confidence carrying the overall verdict: High, Medium, or Low

versionstring required

Detector model version that produced this verdict (e.g. '4.0')

word_countinteger required

Words analyzed

tier_used'premium' required

Deprecated: always 'premium' - every call runs the single remaining (highest-accuracy) detection class. Retained for backward compatibility.

cost_usdnumber required

Amount charged for this call, in USD

Changes

No recorded changes to this operation across all 1 revision of this API.