API
Sentence-level AI detection in one request.
Send English text, get back the AI rate and a score for every sentence; correct its grammar; or search Corpus.Ink for real example sentences. Built for agents and scripts: the API uses credit-pack credits.
Authentication
Create a key under API keys in your workspace and send it as a Bearer token. Keep keys secret; revoke one any time.
Check a text
textstringText in Chinese, English, Japanese, Korean, Spanish, French, German, Portuguese, Italian, Russian, Arabic or Indonesian: at least 50 words, 120 Chinese, Japanese or Korean characters, up to 5,000 credits.
modestring"document" (overall score, half the credits) or "sentences" (with sentence scores, 1 credit per word or 2 Chinese, Japanese or Korean characters). Default "document".
titlestringOptional. Shown in your history.
curl https://wofo.ink/api/v1/detect \
-H "Authorization: Bearer $WOFO_INK_KEY" \
-H "Content-Type: application/json" \
-d '{"text": "Your English text…", "mode": "sentences"}'import os, requests
r = requests.post(
"https://wofo.ink/api/v1/detect",
headers={"Authorization": f"Bearer {os.environ['WOFO_INK_KEY']}"},
json={"text": text, "mode": "sentences"},
timeout=300,
)
r.raise_for_status()
print(r.json()["ai_rate"])Response
{
"id": "6f1c…",
"ai_rate": 64,
"verdict": "mixed",
"model": "DetectInk 2.1",
"mode": "sentences",
"words": 524,
"credits_charged": 524,
"credits_remaining": 39476,
"sentences": [
{ "start": 0, "end": 87, "ai_rate": 12, "text": "…" },
…
]
}Check API credits
curl https://wofo.ink/api/v1/balance \
-H "Authorization: Bearer $WOFO_INK_KEY"
{ "credits_remaining": 39476 }Correct grammar
textstringEnglish text, up to 5,000 words. Send the whole document at once; paragraphs that are mostly not in English are skipped and not charged.
levelstringHow much to flag: "conservative" (only confident fixes), "standard" or "aggressive" (more suggestions). Default "standard".
dialectstringSpelling: "us" or "gb". Default "us".
languagestringLanguage of the explanations: "en" or "zh". Default "en".
curl https://wofo.ink/api/v1/grammar \
-H "Authorization: Bearer $WOFO_INK_KEY" \
-H "Content-Type: application/json" \
-d '{"text": "My friend and me goes to school."}'Response
{
"words": 7,
"corrected": "My friend and I go to school.",
"edits": [
{
"start": 14,
"end": 21,
"original": "me goes",
"replacement": "I go",
"severity": "required",
"category": "Pronouns",
"explanation": null
},
…
],
"credits_charged": 7,
"credits_remaining": 39469
}Search Corpus.Ink
qstringThe English phrase to look up, up to 200 characters.
catstringOptional: news, academic or wiki. Leave it out for all sources.
modestringOptional: exact or similar returns just that list; leave it out for both.
offsetnumberOptional: how many sentences to skip, for paging (up to 490).
curl "https://wofo.ink/api/v1/corpus?q=in+light+of&cat=academic" \
-H "Authorization: Bearer $WOFO_INK_KEY"
{
"q": "in light of",
"exact": { "count": 18400, "approx": true, "items": [
{ "s": "In light of these findings, …", "site": "…", "date": "2021-05-03", "url": "https://…", "cat": "academic" },
…
] },
"similar": { "count": 2100, "approx": true, "items": [ … ] },
"credits_charged": 20,
"credits_remaining": 39194
}Errors
| Status | Code | Meaning |
|---|---|---|
| 401 | missing_api_key / invalid_api_key | Missing or invalid key. |
| 402 | insufficient_credits | Not enough credit-pack credits. |
| 400 | too_short | Fewer than 50 words and fewer than 120 Chinese, Japanese or Korean characters. |
| 400 | too_long | More than 5,000 words. |
| 400 | unsupported_language | Only Chinese, English, Japanese, Korean, Spanish, French, German, Portuguese, Italian, Russian, Arabic and Indonesian are supported. |
| 403 | account_disabled | Account disabled. |
| 400 | empty_query / query_too_long | q is empty or longer than 200 characters. |
| 400 | no_english / sentence_too_long | Grammar: no English text, or a single sentence longer than 400 words. |
| 429 | rate_limited | More than 60 Corpus.Ink searches in a minute with this key. |
Limits and pricing
Detection: at least 50 words or 120 Chinese, Japanese or Korean characters, up to 5,000 credits per request; sentences mode costs 1 credit per word or per 2 CJK characters and document mode half that. Corpus.Ink: 20 credits per search, up to 10 sentences each, as deep as sentence 500, 60 searches a minute per key. Only credit-pack credits can be used.
Grammar: up to 5,000 words per request, 1 credit per English word checked.