textDetection

Detect AI-generated text

Changed on

Submit a passage of text and classify it as AI-generated or human-written.

Processing is asynchronous by default: the response returns immediately with status: processing, and you can poll GET /text_detect/{uuid} or supply a callback_url to be notified. Send the Prefer: wait header to block until the verdict is available and receive the completed item in the same response. Allow a generous client timeout when waiting, since the first request after a period of inactivity can take several minutes while the model warms up.

Requests are rejected with a 400 when text is missing, exceeds 100,000 characters, or contains fewer than 25 words. Each successfully scored request bills one Text Detection unit; abstained (uncertain) results are not billed.

post/text_detect

Request

  • Base URL: https://app.resemble.ai/api/v2
  • URL: https://app.resemble.ai/api/v2/text_detect
  • Auth: HTTP bearer

Headers

Prefer'wait'

When set to "wait", the API processes synchronously and returns the completed result.

Request body

textstring required

The text to analyze. Must contain at least 25 words (whitespace-delimited) and at most 100,000 characters. Shorter passages are rejected with a 400 because no threshold reliably separates casual human writing from AI-generated text below that length.

thinking'low' | 'medium' | 'high'

How much reasoning effort the detector spends on the passage. Higher levels can improve accuracy on ambiguous text at the cost of latency.

thresholdnumber double

Probability cutoff used to turn the AI-likelihood score into the ai or human prediction. Scores at or above the threshold are reported as ai.

callback_urlstring uri

POST destination for the result once processing finishes. The body matches the response of GET /text_detect/{uuid} with an additional top-level error field when analysis failed.

Response

Text detection created (or completed when Prefer: wait was sent)

successboolean required

Changes