LookAI
POST/v1/analyze

Detect AI in files

The same endpoint takes a PDF, DOCX, TXT or Markdown file instead of a text. Send it base64-encoded in JSON; the response is the same as for a text.

Body

filestringrequired

The file, base64-encoded. Up to 15 MB.

filenamestringrequired

The file name with its extension, for example essay.docx. The extension picks the parser.

sentencesboolean

Score every sentence. Defaults to true.

Billing

You are billed the words the file actually has, counted once it has been read. If those words would take you past your free words without a card, or past your monthly limit, you get a 402 instead of a result and nothing is billed.

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.