{"slug":"glim-sh-api-v1-detect-ai-5dfc30","title":"Detect AI-generated text","host":"glim.sh","method":"POST","resource":"https://glim.sh/api/v1/detect/ai","category":"market","description":"Detect AI-generated text: overall verdict with confidence, AI/human/AI-assisted fractions, and a segment-by-segment breakdown with per-segment humanizer flags. Price scales with length: $0.06 per 100 words, rounded up; minimum $0.06","price_listed":0.06,"price_asked":0.06,"state":"answering","state_label":"Answering","checks_7d":1,"answered_7d":1,"latency_ms_median":965,"reported_calls_30d":4,"reported_payers_30d":2,"networks":["eip155:143","eip155:8453","solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp"],"badge":"unverified","paid_checks_7d":0,"paid_ok_7d":0,"example_input":{"body":{"text":"Detection quality depends on length, so pass at least a paragraph of the text you want scored rather than a single sentence."},"bodyType":"json","method":"POST","type":"http"},"output_schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","properties":{"input":{"additionalProperties":false,"properties":{"body":{"description":"Input for POST /api/v1/detect/ai","properties":{"text":{"description":"Text to analyze, plain text, 50+ characters, max 20,000. Detection reliability improves with length; very short texts return lower-confidence verdicts.","minLength":50,"type":"string"}},"required":["text"],"type":"object"},"bodyType":{"enum":["json","form-data","text"],"type":"string"},"method":{"enum":["POST"],"type":"string"},"type":{"const":"http","type":"string"}},"required":["type","method","bodyType","body"],"type":"object"},"output":{"properties":{"example":{"properties":{"confidence":{"description":"Confidence carrying the overall verdict: High, Medium, or Low","type":"string"},"cost_usd":{"description":"Amount charged for this call, in USD","type":"number"},"fraction_ai":{"description":"Fraction of the text judged AI-generated, 0-1","type":"number"},"fraction_ai_assisted":{"description":"Fraction judged AI-assisted, 0-1","type":"number"},"fraction_human":{"description":"Fraction judged human-written, 0-1","type":"number"},"headline":{"description":"Short verdict, e.g. 'AI Generated', 'AI Detected', 'Human Written'","type":"string"},"num_ai_assisted_segments":{"description":"Segments labeled AI-Assisted","maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"num_ai_segments":{"description":"Segments labeled AI-Generated","maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"num_human_segments":{"description":"Segments labeled Human","maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"prediction":{"description":"One-sentence verdict in plain English","type":"string"},"prediction_short":{"description":"Verdict class: AI, Mixed, or Human","type":"string"},"segments":{"description":"Per-segment breakdown, in reading order","items":{"properties":{"ai_assistance_score":{"description":"Same value as score, under the upstream detector's field name","type":"number"},"confidence":{"description":"Detector confidence for this segment: High, Medium, or Low","type":"string"},"end_index":{"description":"Character offset just past this segment's last word in the text you submitted (exclusive)","maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"humanizer_score":{"description":"Humanizer likelihood, 0-1.","type":"number"},"is_humanized":{"description":"True when this segment reads as AI output passed through a paraphrasing/'humanizer' tool. Absent means not evaluated, not false.","type":"boolean"},"label":{"description":"Detector verdict for this segment (e.g. 'AI-Generated', 'Human')","type":"string"},"preview":{"description":"Opening excerpt of the segment","type":"string"},"score":{"description":"AI-assistance score for this segment, 0-1","type":"number"},"start_index":{"description":"Character offset of this segment's first word in the text you submitted","maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"text":{"description":"Full text of this segment, sliced from the text you submitted","type":"string"},"token_length":{"description":"Tokens in this segment, as counted by the detector","maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"word_count":{"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"word_end":{"description":"1-based word position where this segment ends","maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"word_start":{"description":"1-based word position where this segment starts","maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"}},"required":["label","score","ai_assistance_score","confidence","text","word_start","word_end","word_count","token_length","start_index","end_index","preview"],"type":"object"},"type":"array"},"tier_used":{"const":"premium","description":"Deprecated: always 'premium' - every call runs the single remaining (highest-accuracy) detection class. Retained for backward compatibility.","type":"string"},"version":{"description":"Detector model version that produced this verdict (e.g. '4.0')","type":"string"},"word_count":{"description":"Words analyzed","maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"}},"required":["headline","prediction","prediction_short","fraction_ai","fraction_ai_assisted","fraction_human","num_ai_segments","num_ai_assisted_segments","num_human_segments","confidence","version","word_count","tier_used","cost_usd","segments"],"type":"object"},"type":{"type":"string"}},"required":["type"],"type":"object"}},"required":["input"],"type":"object"},"history":[{"day":"2026-09-24","reachable":true,"status":402,"valid_402":true,"asked_usdc":0.06,"price_match":true,"latency_ms":965,"error":null}],"description_full":"Detect AI-generated text: overall verdict with confidence, AI/human/AI-assisted fractions, and a segment-by-segment breakdown with per-segment humanizer flags. Price scales with length: $0.06 per 100 words, rounded up; minimum $0.06","last_updated":"2026-08-29T06:35:19.474Z","schemes":["exact"]}