> ## Documentation Index
> Fetch the complete documentation index at: https://www.edenai.co/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Text AI Content Detection API

> The AI Detection API is a tool designed to determine whether a given text was generated by an artificial intelligence chatbot, or a Language Model (LLM).

**Text AI Content Detection API**

The AI Detection API is a tool designed to determine whether a given text was generated by an artificial intelligence chatbot, or a Language Model (LLM).

## Endpoint

`POST /v3/universal-ai` (sync)

Model string pattern: `text/ai_detection/{provider}[/{model}]`

## Input

| Field | Type | Required | Description |
| - | - | - | - |
| text | string | Yes | Text to analyze for AI detection, at least 300 characters long. Shorter texts carry too little signal to be scored reliably. |

## Output

| Field | Type | Required | Description |
| - | - | - | - |
| ai\_score | float | Yes | |
| **items** | array\[object] | No | |
|     text | string | Yes | |
|     prediction | string | Yes | |
|     ai\_score | float | Yes | |
|     ai\_score\_detail | float | Yes | |

## Available Providers

| Provider | Model String | Price |
| - | - | - |
| sapling | `text/ai_detection/sapling` | \$5 per 1,000,000 characters |
| winstonai | `text/ai_detection/winstonai` | \$14 per 1,000,000 characters |

## Quick Start

```python Python theme={null}
import requests

url = "https://api.edenai.run/v3/universal-ai"
headers = {
    "Authorization": "Bearer YOUR_API_KEY",
    "Content-Type": "application/json"
}

payload = {
    "model": "text/ai_detection/sapling",
    "input": {
        "text": "Artificial intelligence now drafts emails, reports and product descriptions in seconds, and readers rarely notice the difference. Editors, teachers and publishers increasingly want to know whether a passage was written by a person or generated by a language model before they approve, grade or publish it. Detection tools score each sentence and return an overall likelihood."
    }
}

response = requests.post(url, headers=headers, json=payload)
print(response.json())
```

```bash cURL theme={null}
curl -X POST https://api.edenai.run/v3/universal-ai \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "text/ai_detection/sapling",
    "input": {"text": "Artificial intelligence now drafts emails, reports and product descriptions in seconds, and readers rarely notice the difference. Editors, teachers and publishers increasingly want to know whether a passage was written by a person or generated by a language model before they approve, grade or publish it. Detection tools score each sentence and return an overall likelihood."}
  }'
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.