API reference
API reference
One endpoint. Generated from the OpenAPI file that the API's tests check against the code.
POST /v1/detect
Detect AI slop patterns in text. Base URL https://platform-api.getellora.com. Authenticate with a bearer API key.
Cost is ceil(words / 1000 x price per 1,000 words). Rejected requests are never charged, and a 500 is refunded. What counts as a word: split the text on whitespace; a piece counts as one word if it contains at least one letter or digit in any script. So "don't", "well-known", "3.14" and a URL are one word each, and bare punctuation is not counted. Chinese and Japanese have no spaces, so each Han, Hiragana or Katakana character counts as one word.
Request body (JSON)
| Field | Type | Required | Default | Notes |
|---|---|---|---|---|
text | string | yes | up to 100,000 characters |
Example
curl https://platform-api.getellora.com/v1/detect \
-H "Authorization: Bearer $ELLORA_API_KEY" \
-H "Content-Type: application/json" \
-d '{"text": "Let'\''s delve into the rich tapestry of modern marketing. It'\''s worth noting that every team must navigate an ever-evolving landscape."}'import os
import requests
response = requests.post(
"https://platform-api.getellora.com/v1/detect",
headers={"Authorization": f"Bearer {os.environ['ELLORA_API_KEY']}"},
json={"text": "Let's delve into the rich tapestry of modern marketing. It's worth noting that every team must navigate an ever-evolving landscape."},
timeout=10,
)
response.raise_for_status()
result = response.json()
print(result["findings_count"])
for finding in result["findings"]:
print(finding["severity"], finding["rule_id"], "-", finding["suggestion"])const response = await fetch("https://platform-api.getellora.com/v1/detect", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.ELLORA_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({ text: "Let's delve into the rich tapestry of modern marketing. It's worth noting that every team must navigate an ever-evolving landscape." }),
});
if (!response.ok) throw new Error(`Ellora ${response.status}: ${await response.text()}`);
const result = await response.json();
console.log(result.findings_count);
for (const finding of result.findings) {
console.log(finding.severity, finding.rule_id, "-", finding.suggestion);
}Response (200)
| Field | Type |
|---|---|
id | string |
ruleset_version | string |
words_count | integer |
characters_count | integer |
cost | number |
findings_count | object |
findings | Finding[] |
stored | boolean |
Response headers: X-Request-Id, X-RateLimit-Limit, X-RateLimit-Remaining.
findings_count
total | All findings. |
red | Findings with severity red. |
yellow | Findings with severity yellow. |
blue | Findings with severity blue. |
Finding
| Field | Type |
|---|---|
id | string |
rule_id | string |
category | string |
severity | "red" | "yellow" | "blue" |
scope | "document" | "sentence" |
sentence | integernull |
excerpt | stringnull |
reason | string |
suggestion | string |
severity is red (fix before publishing), yellow (needs a judgment call) or blue (optional polish). scope is sentence, or document when the finding is about the text as a whole; a document finding has no sentence or excerpt (both null). sentence is the 1-based sentence number and excerpt the whole sentence; there are no character offsets. id is unique to the finding; use rule_id to identify the rule.
Status codes
| Status | Meaning |
|---|---|
| 200 | Findings returned. |
| 400 | , see Errors |
| 401 | , see Errors |
| 402 | , see Errors |
| 403 | , see Errors |
| 413 | , see Errors |
| 429 | rate_limited, see Errors |
| 500 | , see Errors |
The raw OpenAPI file is available as openapi.json.