Developers

Artificial Writing API

Add AI detection, originality checks, authenticity scoring and draft generation to your own app, LMS or content pipeline. The API is available on the Pro plan.

Authentication

Create a key in your dashboard under API access. Send it as a Bearer token on every request. Keys are shown once and stored hashed; revoke a key at any time.

Authorization: Bearer aw_live_xxxxxxxxxxxxxxxxxxxxxxxx

Limits

POST /api/v1/detect

AI-vs-human estimate with per-sentence scores, plus the writing-quality sub-scores. Typically 3 to 10 seconds.

curl https://artificialwriting.com/api/v1/detect \
  -H "Authorization: Bearer $AW_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"text": "Your text of at least 40 words..."}'
{
  "ai": {
    "probability": 91,
    "verdict": "Likely AI-generated",
    "summary": "Stock phrases such as ... ",
    "sentences": [{ "text": "In today's fast-paced ...", "ai_probability": 94 }]
  },
  "writing": { "score": 48, "reading_grade": 15, "metrics": [{ "key": "variety", "label": "Sentence variety", "score": 0, "value": "...", "note": "..." }] }
}

POST /api/v1/score

The full report: Authenticity score and letter grade, AI estimate, web-copy originality check with sources, writing sub-scores and advice. The web check searches up to 4 passages and reads up to 4 pages, so allow 10 to 40 seconds. Pass "web_check": false to skip it.

curl https://artificialwriting.com/api/v1/score \
  -H "Authorization: Bearer $AW_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"text": "Your text...", "web_check": true}'
{
  "score": 62, "grade": "D", "label": "Needs work before you publish or submit",
  "ai": { "probability": 74, "verdict": "Possibly AI-generated", "summary": "...", "sentences": [ ... ] },
  "originality": {
    "percent": 80, "copied_percent": 20, "paraphrased_percent": 0,
    "sources": [{ "n": 1, "url": "https://...", "title": "...", "copied": 1, "paraphrased": 0 }],
    "flagged": [{ "sentence": "...", "type": "copied", "similarity": 0.92, "source": "https://...", "source_snippet": "..." }]
  },
  "writing": { "score": 71, "reading_grade": 11.2, "metrics": [ ... ] },
  "advice": [{ "title": "Quote and cite this copied passage", "detail": "...", "sentence": "..." }],
  "disclaimer": "AI-likelihood is an estimate, not proof. ..."
}

POST /api/v1/generate

Generate a draft. type is one of essay, blog, social, email, newsletter, lesson, rubric, prompt, feedback, outline, script, product. Optional: tone, length (short, medium, long), audience, instructions.

curl https://artificialwriting.com/api/v1/generate \
  -H "Authorization: Bearer $AW_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"type": "blog", "topic": "Three habits of strong student writers", "tone": "Friendly and clear", "length": "short"}'
{ "type": "blog", "text": "## Three habits ...", "words": 412 }

GET /api/v1/usage

curl https://artificialwriting.com/api/v1/usage -H "Authorization: Bearer $AW_API_KEY"

Errors

Errors return JSON like {"error": "message"} with status 400 (bad input), 401 (missing or invalid key), 403 (plan doesn't include the API), 429 (rate limit or monthly quota) or 500.

Responsible use

AI-likelihood scores are estimates, not proof. Don't use them as the sole basis for grades, discipline, hiring or any decision about a person, and tell people when their writing is being checked.