API Reference
v1 — Audit and rewrite AI writing patterns programmatically.
Authentication
All API requests require a Bearer token in the Authorization header. Get your API key from the developer dashboard.
Authorization: Bearer avd_live_YOUR_API_KEYAPI keys start with avd_live_. Each key has its own credit balance and usage tracking. You can create up to 5 keys per account (e.g. for different environments).
POST /api/v1/audit
Audit and rewrite text, removing AI writing patterns. Costs 1 credit per request.
Request body
text requiredcontext optionalblog, technical, investor, social, docs, casual. Defaults to blog.Response
{
"result": "## Rewritten Text\n\n...rewritten content...\n\n## Diff Summary\n\n...",
"credits": 49,
"usage": {
"words": 342,
"context": "blog"
}
}Error responses
401402400429500503All errors follow this format:
{
"error": {
"message": "Human-readable error message",
"code": "machine_readable_code"
}
}Rate limits
Each API key is limited to 60 requests per minute and 100 requests per day. Rate limit info is included in response headers:
X-RateLimit-LimitX-RateLimit-RemainingX-RateLimit-ResetContext types
The context parameter adjusts how aggressively patterns are flagged and what rewrite style is used:
blogtechnicalinvestorsocialdocscasualCode examples
async function auditText(text, context = "blog") {
const res = await fetch("https://www.avoidaiwriting.com/api/v1/audit", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.AVOID_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({ text, context }),
});
if (!res.ok) {
const err = await res.json();
throw new Error(err.error?.message || "Audit failed");
}
return res.json();
}import os, requests
def audit_text(text: str, context: str = "blog") -> dict:
response = requests.post(
"https://www.avoidaiwriting.com/api/v1/audit",
headers={"Authorization": f"Bearer {os.environ['AVOID_API_KEY']}"},
json={"text": text, "context": context},
)
response.raise_for_status()
return response.json()curl -X POST https://www.avoidaiwriting.com/api/v1/audit \
-H "Authorization: Bearer $AVOID_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"text": "This comprehensive guide delves into the landscape of...",
"context": "blog"
}'Credits
Each successful audit request costs 1 credit. If a request fails due to a server error, the credit is automatically refunded. Credits never expire.
Purchase credits from the developer dashboard. Packs range from $10 (50 requests) to $100 (500 requests). After Stripe fees and API costs, remaining revenue buys and burns $avoid tokens.