For developers

AI detection API for text and images: one POST, one GET, a score you can act on

Submit text, get a request_id, poll the result with long-polling. You get a 0 to 100 document score, a verdict label, a probability and the highest-scoring sentences. One API key is $100 and includes 3,000,000 credits, where one credit covers one word. The same key checks images too: upload a JPG, PNG, WebP, BMP, TIFF or HEIC file and get an AI verdict with the likely generator.

Keys are created, revealed once and regenerated from the Enterprise tab of the dashboard.

Key takeaways

  • $100 per API key, 3,000,000 credits included. One credit equals one word analysed.
  • Two calls, not one. POST /api/v1/enterprise/detect then GET .../{request_id}?wait=true.
  • Auth is a single X-API-Key header. No OAuth, no token exchange.
  • 50 to 10,000 characters per request. Narrower than the 50,000 the web app accepts, so chunk long documents.
  • Images use the same key. Upload JPG, PNG, WebP, BMP, TIFF or HEIC to the image endpoint, one per minute per key.
  • Credits deduct after the job completes. A key can go negative rather than blocking, and overage is invoiced Net-30.
$100Per API key
3,000,000Credits included
1Credit per word analysed
Net-30Invoicing on overage
Reference

The whole surface in two endpoints

Base URL: https://detector-api-server-tsxmk.ondigitalocean.app

POST /api/v1/enterprise/detect

Submit text for analysis. Returns immediately with a job handle and the credit usage for the submission. Body is { "text": "string" }, between 50 and 10,000 characters.

GET /api/v1/enterprise/detect/{request_id}

Fetch the result. Append ?wait=true and the server holds the connection open until the job completes, up to roughly 30 seconds, which removes the need for a polling loop in most integrations.

# 1. Submit text for analysis
curl -X POST "https://detector-api-server-tsxmk.ondigitalocean.app/api/v1/enterprise/detect" \
  -H "Content-Type: application/json" \
  -H "X-API-Key: YOUR_API_KEY" \
  -d '{"text": "Paste between 50 and 10,000 characters of the text you want analysed."}'

# → { "request_id": "ent_a3f9b2c1d4e5", "status": "queued", "usage": { ... } }

# 2. Fetch the result. ?wait=true long-polls until the job completes.
curl "https://detector-api-server-tsxmk.ondigitalocean.app/api/v1/enterprise/detect/ent_a3f9b2c1d4e5?wait=true" \
  -H "X-API-Key: YOUR_API_KEY"

The result payload

{
  "status": "completed",
  "job_id": "ent_a3f9b2c1d4e5",
  "document_score": 82,
  "document_prediction": "AI",
  "document_probability": 0.82,
  "total_sentences": 14,
  "processing_time": 340,
  "sample_sentences": [
    { "sentence": "Furthermore, the results demonstrate...", "score": 91 },
    { "sentence": "This analysis shows...",                  "score": 78 }
  ]
}
FieldTypeMeaning
document_scorenumber 0 to 100Raw AI likelihood score for the document.
document_prediction"AI" | "Human" | "AI + Human"Verdict label derived from the score bands below.
document_probabilitynumber 0 to 1Model confidence in the verdict.
total_sentencesintegerHow many sentences were analysed.
processing_timeinteger, millisecondsWorker processing time for the job.
sample_sentencesarrayTop-scoring sentences with their individual scores.

Score bands: 0 to 50 reads as Human, 51 to 60 as Mixed, 61 to 100 as AI. Apply your own threshold if your workflow needs a different sensitivity, but record which one you used so results stay comparable over time.

Image reference

AI image detection in the same two calls

Base URL: https://image-detector-hesvs.ondigitalocean.app

POST /api/v1/enterprise/detect

Upload one image as multipart/form-data in a field named file, with the same X-API-Key header. Supported formats are JPG/JPEG, PNG, WebP, BMP, TIFF and HEIC/HEIF. The file type is read from the file name, so keep the real extension (photo.heic, not upload). Each key can submit one image per minute. The response is a job_id, or the finished result when the image is processed at once.

GET /api/v1/enterprise/detect/{job_id}

Fetch the result. With ?wait=true the server holds the request for up to about 25 seconds. Repeat the call until result is filled in or error is set.

# 1. Upload an image
curl -X POST "https://image-detector-hesvs.ondigitalocean.app/api/v1/enterprise/detect" \
  -H "X-API-Key: YOUR_API_KEY" \
  -F "file=@photo.jpg"

# → { "job_id": "3f6c1a9e...", "status": "queued" }

# 2. Fetch the result. ?wait=true holds the request until the job finishes.
curl "https://image-detector-hesvs.ondigitalocean.app/api/v1/enterprise/detect/JOB_ID?wait=true" \
  -H "X-API-Key: YOUR_API_KEY"

The image result payload

{
  "job_id": "3f6c1a9e2b7d4c58",
  "status": "completed",
  "result": {
    "label": "AI",
    "is_ai": true,
    "ai_probability": 94.6,
    "generator": "Midjourney",
    "detection_step": 2,
    "step": "ml_model",
    "metadata": { "prediction": "inconclusive", "detail": "No camera EXIF found", "ai_probability": null },
    "ml_model": { "prediction": "ai", "detail": "Generator fingerprint matched", "ai_probability": 94.6 },
    "elapsed_ms": 1840,
    "credits_consumed": 2000,
    "credits_remaining": 2998000
  },
  "error": null
}
FieldTypeMeaning
labelstringReadable verdict for the image.
is_aibooleantrue when the image is judged AI-generated.
ai_probabilitynumber 0 to 100Likelihood that the image is AI-generated.
generatorstring or nullMost likely generator family, when one is identified.
detection_step, stepinteger, stringWhich stage produced the final verdict.
metadataobjectFile and camera metadata check: prediction, detail, ai_probability.
ml_modelobject or nullModel check, same shape as metadata.
elapsed_msinteger, millisecondsProcessing time for the image.
credits_consumed, credits_remainingintegerCredits this image used and the balance left on the key.

An image score is a confidence estimate, not proof of how a picture was made. Screenshots, heavy compression and re-saved files remove some of the signals the detector reads, so route borderline results to a person.

Errors

What comes back when something goes wrong

StatusMeaningWhat to do
400Unsupported image typeSend JPG, PNG, WebP, BMP, TIFF or HEIC, with a file name that keeps its real extension.
401Invalid or missing API keyCheck the X-API-Key header. A regenerated key invalidates the previous secret at once.
402Insufficient creditsTop up from the API Keys tab in the dashboard.
422Text too short, or no image in the uploadText needs at least 50 characters. Images must be sent in a multipart field named file.
404Job not found or expiredRe-submit. Do not assume a job handle is durable indefinitely.
429Rate limit exceededText: back off and retry after a few seconds. Images: each key can submit one image per minute.
5xxServer errorRetry with exponential back-off.

Apart from the one-image-per-minute limit, we do not publish a numeric rate limit or an uptime commitment, so do not build against an assumed one. If your integration needs either in writing, ask at support@gptone.me before you commit to a design.

Integration notes

Four things worth getting right up front

Chunk at the API limit, not the UI limit

The endpoint accepts 50 to 10,000 characters. The web app accepts 50,000. If you sized your chunker off the marketing number your first long document will fail. Split on paragraph boundaries and aggregate.

Most common mistake

Store the sentence scores, not just the verdict

sample_sentences is what makes a result reviewable by a human later. A stored verdict with no sentence data is not auditable, and moderation decisions eventually get audited.

Auditability

Record the threshold you applied

If you deviate from the 61-and-above default, write the threshold into the record. Otherwise a policy change silently makes last quarter's data incomparable with this quarter's.

Data hygiene

Never auto-reject on the score alone

Our own benchmark puts the false positive rate at 3.6%, and 8.0% on non-native English writing. Route a flag to a person. Automatic rejection at scale means automatically rejecting real writers at a measurable rate.

Design constraint

Keep your key server-side. It is a bearer credential in a header, so anything that can read it can spend your credits. If one leaks, regenerate it from the dashboard: the old secret stops working immediately and your balance carries over.

Common questions

Questions developers ask about the detection API

One API key costs $100 and includes 3,000,000 credits. One credit covers one word of analysed text, so the included balance is 3,000,000 words. Credits are deducted after a job completes, not on submission. A key is allowed to go to a negative balance rather than hard-blocking, and the overage is invoiced at the end of the billing cycle on Net-30 terms. There is no long-term contract.
Send your key in an X-API-Key header on every request. There is no OAuth flow and no bearer token. Keys are created, revealed once, revoked and regenerated from the Enterprise tab of the dashboard. A regenerated key invalidates the old secret immediately and leaves the credit balance untouched.
No. Submission and retrieval are two calls. POST /api/v1/enterprise/detect returns a request_id straight away, and GET /api/v1/enterprise/detect/{request_id} returns the result. Add ?wait=true to the GET and the server long-polls, holding the connection open until the job finishes, so you do not need a tight retry loop.
The API request body takes between 50 and 10,000 characters of text. That is narrower than the web app, which accepts up to 50,000 characters per scan. Chunk longer documents on your side and aggregate the scores, or send the sections you care about.
Yes. Send the same X-API-Key header to the image endpoint, POST /api/v1/enterprise/detect on https://image-detector-hesvs.ondigitalocean.app, with the image as a multipart file field. It accepts JPG/JPEG, PNG, WebP, BMP, TIFF and HEIC/HEIF, takes one upload per minute per key, and returns an AI verdict, a 0 to 100 AI probability, the likely generator and the credits that image used. See the image reference above.

Before you wire it in

Three pieces on choosing and placing a detection API inside an existing product.

Get a key and make your first call

One key is $100 with 3,000,000 credits included, one credit per word analysed. Keys are issued and regenerated from the Enterprise tab in the dashboard.

See API pricing

Integration questions: support@gptone.me