Docs

API reference

Two endpoints. Bearer-auth, JSON in, JSON out. Available on the Team plan. Generate a key on the API access page.

01

Authentication

Pass your API key in the Authorization header as a Bearer token. Treat the key like a password — never commit it to source.

Authorization: Bearer gptypo_a3f7c8e29b1d4a5f6e7c8d9a0b1c2d3e

Requests without a valid key return 401 Unauthorized. Requests from accounts without API access return 403 Forbidden.

02

POST /api/score

Score text with the neural model. Returns an overall 0–100 score (higher = more human), per-sentence scores with detection signals, and a top-line classification.

Request body
{
  "text": "string (required, up to 5,000 words)",
  "tone": "Standard | Academic | Legal | Medical | Business | Creative | Casual",
  "label": "string (optional, up to 60 chars — persisted on the scan record)"
}
Response (200)
{
  "overall": 87,
  "classification": "Human",
  "verified": true,
  "wordCount": 412,
  "scanId": "clx0a1b2c3...",
  "sentences": [
    {
      "text": "...",
      "index": 0,
      "wordCount": 18,
      "score": 92,
      "classification": "pass",
      "signals": []
    }
  ],
  "signalGlossary": { /* signal label → explanation */ },
  "usage": { "monthlyWordsUsed": 1234, "monthlyWordLimit": 500000, "remaining": 498766 }
}
Errors
400No text provided, or text exceeds 5,000-word per-scan cap.
403Monthly word limit reached. Resets next month.
429Rate limit hit. Wait and retry.
504Model timed out (rare; usually a Replicate cold start over the function cap). Retry.
03

POST /api/suggest

Get rewrite suggestions for a single flagged sentence. Returns two candidate rewrites that aim to preserve meaning while reducing detection risk.

Request body
{
  "sentence": "string (required) — the flagged sentence to rewrite",
  "context": "string (required) — surrounding text, with the sentence as '{{SENTENCE}}'",
  "tone": "Standard | Academic | Legal | Medical | Business | Creative | Casual",
  "signals": ["AI vocabulary: furthermore", "Burstiness: low variance", "..."]
}
Response (200)
{
  "suggestions": [
    "First rewrite candidate.",
    "Second rewrite candidate."
  ]
}
Errors
400Missing sentence or context.
403Suggestion limit reached for the current scan.
429Rate limit hit. Wait and retry.
500Generation failed. Retry; if persistent, contact support.
04

Rate limits

Limits are per-IP for the current minute, on top of monthly word caps. Team is the only tier with API access.

LimitTeam
/api/score requests/min25
/api/suggest requests/min60
Words per scan5,000
Words per month500,000

Exceeding any limit returns 429 Too Many Requests for request-rate caps, or 403 Forbidden with a usage payload for the monthly word cap.