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 |
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 chars |
| winstonai | text/ai_detection/winstonai | $14 per 1,000,000 chars |
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": "The quick brown fox jumps over the lazy dog."
}
}
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": "The quick brown fox jumps over the lazy dog."}
}'