Skip to main content

API docs → Migrate from GPTZero

Migrate from GPTZero

Both APIs answer the same question. For most call sites the migration is a URL, auth-header and field-name swap.

Why switch

  • Same model as the web app. Trained on 407,651 labelled human and AI examples, including paraphrased and humanized AI text.
  • Per-sentence verdicts. Every paid response includes sentence-level breakdown you can show to users or include in a report.

Side-by-side

Before — GPTZero
// Before: GPTZero
const res = await fetch('https://api.gptzero.me/v2/predict/text', {
  method: 'POST',
  headers: { 'x-api-key': process.env.GPTZERO_KEY, 'Content-Type': 'application/json' },
  body: JSON.stringify({ document: text, multilingual: true }),
});
const data = await res.json();
const aiProb = data.documents[0].class_probabilities.ai;
const verdict = data.documents[0].predicted_class;
After — Deep AI Detector
// After: deepaidetector
// @deepaidetector/client is coming soon (not yet published to npm).
import { createClient } from '@deepaidetector/client';
const client = createClient({ apiKey: process.env.DEEPAIDETECTOR_KEY });

const data = await client.detect({ text });
const aiProb = data.score;          // 0-1, same as GPTZero's class_probabilities.ai
const verdict = data.band;          // 7-band scale (definitely_ai, likely_ai, paraphrased, ...)

Field mapping

GPTZeroDeep AI DetectorNotes
documents[0].class_probabilities.aiscore0-1 probability the text is AI-generated. Same range, same direction.
documents[0].predicted_classbandCategorical. Their {human, ai, mixed} maps to our 7-band scale; "mixed" ≈ paraphrased.
documents[0].class_probabilities.human1 - scoreWe expose the AI probability; subtract for human.
documents[0].sentences[].generated_probper_passage[].scorePer-sentence breakdown. Same intent, paid tier only.
documents[0].languagedetected_languageISO 639-1.
documents[0].overall_burstiness—No equivalent. Burstiness is not part of our response.
documents[0].perplexity—No equivalent. Perplexity is not part of our response.

Behaviour differences to know

  • 80-word floor. Below 80 words we refuse with 422 insufficient_text instead of returning a low-signal verdict.
  • Authentication. Bearer header (Authorization: Bearer dad_live_...), not x-api-key.
  • Endpoint base. https://api.deepaidetector.com, not api.gptzero.me.
  • Sentence breakdown is paid. Free plans get the overall score and band with an empty per_passage array; sentence scores need a paid plan (API keys start at Pro).
  • English works best. There's no multilingual flag to send. Each response includes a detected_language code; scores are most reliable on English text.

Migration checklist

  1. Once the API launches, generate a Deep AI Detector key in your dashboard (Pro and higher).
  2. Swap the URL: https://api.gptzero.me/v2/predict/text → https://api.deepaidetector.com/v1/detect.
  3. Swap the auth header: x-api-key → Authorization: Bearer ....
  4. Rename request field: document → text.
  5. Update response parsing per the field map above.
  6. Add a 422 branch — handle "text too short" explicitly.
  7. (Optional, once it's published) replace your raw fetch with @deepaidetector/client (coming soon) for retries + typed errors.

Need help?

Questions about your GPTZero call site? Email support@deepaidetector.com. The API isn't accepting public traffic yet, so get notified when keys go live.

Notify me at launch