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
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())
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."}
}'