> For the complete documentation index, see [llms.txt](https://docs.bitmind.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.bitmind.ai/api-reference/api/detect-text.md).

# Detect Text

Detect if a passage of text is AI-generated.

## Endpoint

`POST https://api.bitmind.ai/detect-text`

## Authentication

Send a Bearer token in the `Authorization` header.

See [Authentication](/api-reference/authentication.md).

## Request

```bash
curl -X POST https://api.bitmind.ai/detect-text \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"text": "In conclusion, the synergistic leveraging of cross-functional..."}'
```

### JSON fields

| Field         | Type    | Required | Description                                             |
| ------------- | ------- | -------- | ------------------------------------------------------- |
| `text`        | string  | Yes      | The text passage to analyze                             |
| `debug`       | boolean | No       | Include debug data (raw score, processing time, region) |
| `postContext` | object  | No       | Optional source context (platform, source URL, author)  |

### Requirements

Provide at least **200 characters** of text. Shorter passages are rejected with `400` — there isn't enough signal to score reliably. English-language text scores best; unsupported languages or provider issues degrade gracefully to `verdict: "uncertain"`.

## Response

```json
{
  "isAI": true,
  "confidence": 0.91,
  "verdict": "ai"
}
```

| Field        | Type    | Description                                                             |
| ------------ | ------- | ----------------------------------------------------------------------- |
| `isAI`       | boolean | Whether the text is detected as AI-generated                            |
| `confidence` | number  | Confidence score (0.0–1.0, higher = more confident)                     |
| `verdict`    | string  | Tri-state: `ai`, `human`, or `uncertain` (low-confidence / unavailable) |

### Response with debug enabled

```json
{
  "isAI": true,
  "confidence": 0.91,
  "verdict": "ai",
  "debug": {
    "raw": 0.91,
    "processingTime": 0.8,
    "region": "us"
  }
}
```
