LookAI
POST/v1/analyze

Detect AI in text

Analyzes a text and returns the result in the same request, usually within 1 to 5 seconds. The first request after a quiet period can take longer while capacity starts up, so set your HTTP timeout to at least 120 seconds.

Headers

Authorizationstringrequired

Bearer lk_live_…, your API key.

Content-Typestringrequired

application/json

Body

textstringrequired

The text to analyze, from 30 to 15,000 words.

sentencesboolean

Score every sentence. Defaults to true. With false the response is faster and has document and paragraph scores only.

Response

predicted_classstring

human, ai or inconclusive. The result to show your users. See Reading the result.

scorenumber

Score of the whole document, from 0 (human) to 100 (AI).

ai_fractionnumber

Share of the text that reads as AI, from 0 to 1: 1 for an AI document, 0 for a human one, the share of the highlighted passage otherwise.

confidencestring

high, medium or low. Low for short texts, scores near the middle, languages without full support, and documents whose paragraphs disagree with the overall score.

messagestring

A one-line summary you can show as is.

languagestring

Detected language, ISO 639-1.

language_supportedboolean

false when the language is not calibrated: you still get a score, with low confidence.

wordsinteger

Words analyzed. In Chinese and Japanese two characters count as one word.

paragraphs[]array

Each paragraph with index, start and end (character offsets in your text), words and score.

sentences[]array

Each sentence with index, paragraph, start, end, text, score, label (ai from 70, uncertain from 35, otherwise human) and highlight. Empty when sentences is false.

model_versionstring

The model that produced the result. Store it with the result if you need to audit it later.

usageobject

words_charged for this request and words_this_period, your total this month.