Quickstart
From zero to your first check: get a key, send a text, read the result.
1. Get a key
Get a test key on the API page. It checks 10,000 words for free. Store it as an environment variable:
export MIMIR_API_KEY="mm_live_…"2. Send a text
The text needs at least 80 words. Pass its language.
curl https://api.mimir-mentor.com/v1/ai-detection \
-H "x-api-key: $MIMIR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"text": "Your text with at least 80 words …", "language": "en"}'import os
import requests
response = requests.post(
"https://api.mimir-mentor.com/v1/ai-detection",
headers={"x-api-key": os.environ["MIMIR_API_KEY"]},
json={"text": text, "language": "en"},
timeout=120,
)
response.raise_for_status()
result = response.json()
print(result["verdict"], result["ai_share"])
for sentence in result["sentences"]:
print(sentence["band"], text[sentence["start"]:sentence["end"]])const response = await fetch("https://api.mimir-mentor.com/v1/ai-detection", {
method: "POST",
headers: { "x-api-key": process.env.MIMIR_API_KEY, "Content-Type": "application/json" },
body: JSON.stringify({ text, language: "en", offset_unit: "utf16" }),
});
if (!response.ok) throw new Error(`${response.status} ${JSON.stringify(await response.json())}`);
const result = await response.json();
console.log(result.verdict, result.ai_share);
for (const s of result.sentences) console.log(s.band, text.slice(s.start, s.end));3. Read the result
The answer comes back in the same request; a text of 1,000 words takes two to three seconds.
200 OK
{
"id": "req_peDQZjknMKvf186g33YtMZsU",
"model": "r13",
"language": "en",
"words": 114,
"verdict": "mostly",
"ai_share": 0.8663,
"possible_share": 0.1275,
"result_message": "A large part is probably AI-generated.",
"offset_unit": "codepoint",
"sentences": [
{
"start": 0,
"end": 123,
"band": "possibly_ai"
},
{
"start": 124,
"end": 261,
"band": "very_likely_ai"
},
{
"start": 262,
"end": 423,
"band": "very_likely_ai"
}
],
"usage": {
"plan": "starter",
"words_used": 12114,
"words_included": 500000,
"period_end": 1796928768
}
}verdict is the overall verdict, ai_share the share of the text in the two upper levels. sentences lists every flagged passage. More in Reading the result.
4. Check your usage
curl https://api.mimir-mentor.com/v1/usage -H "x-api-key: $MIMIR_API_KEY"200 OK
{
"plan": "starter",
"words_used": 12114,
"words_included": 500000,
"period_end": 1796928768
}