---
title: "Detect AI-written text"
method: POST
path: "/text/detect"
tags: ["text"]
---

# Detect AI-written text

`POST /text/detect`

## Request

- Base URL: `https://api.krater.ai/v1`
- URL: `https://api.krater.ai/v1/text/detect`
- Auth: HTTP bearer

Estimate whether a text was written by AI or a human.

## Request body

- TextRequest
  - `text` string, required: The text to process.

## Response `200`

Detection result.

- object
  - `ai_probability` number
  - `human_probability` number
  - `verdict` string: Overall verdict, for example ai or human.

## Other responses

- `400`: Invalid request body or parameters.
- `401`: Missing or invalid API key. Pass Authorization: Bearer kr_live_...
- `402`: Not enough credits, or the API key's daily credit cap is reached.
- `429`: Rate limit exceeded (default 60 requests per minute per key). Includes a Retry-After header.

---

[API](https://skmtc.dev/krater/apis/krater-api.md) - [All operations](https://skmtc.dev/krater/apis/krater-api/llms.txt) - [OpenAPI document](https://skmtc.dev/krater/apis/krater-api/revisions/66005541188c?raw)
