Developer API
AI detection API documentation
Send an image, video or audio file, or a public media URL, and get back a probability that it was AI-generated. One header, three endpoints, one request per successful check.
Quickstart
- 1Sign in with a one-time code sent to your email.
- 2Subscribe to Basic, Pro or Max. API access requires a verified, active paid subscription.
- 3After payment is verified, generate a key in your dashboard. It is shown once; store it in a secret manager or environment variable.
- 4Send the key in the x-api-key header with each request.
export AIMD_API_KEY="paste-your-key-here"Authentication
Every request needs an x-api-key header. Keys belong to one account and share that account's monthly allowance. Requests without a valid key return 401. Call the API from your server, never from browser or mobile code where the key can be read.
Endpoints
| Method and path | Body | Counts |
|---|---|---|
| POST/api/detect/image | JSON {"url"} or multipart field media | 1 request on success |
| POST/api/detect/video | JSON {"url"} or multipart field media | 1 request on success |
| POST/api/detect/audio | JSON {"url"} or multipart field media | 1 request on success |
| GET/api/usage | None | No request deducted |
Images: PNG, JPG, JPEG, WEBP. Video: MP4, WEBM, MOV, AVI, MKV, WMV, up to 60 seconds. Audio: MP3, WAV, FLAC, OGG, M4A. Maximum 200 MB per file.
Examples
Check an image by URL
curl -X POST https://detect.aigenmax.art/api/detect/image \
-H "x-api-key: $AIMD_API_KEY" \
-H "Content-Type: application/json" \
-d '{"url":"https://example.com/photo.jpg"}'Upload a video file
curl -X POST https://detect.aigenmax.art/api/detect/video \
-H "x-api-key: $AIMD_API_KEY" \
-F "media=@clip.mp4"Upload an audio file
curl -X POST https://detect.aigenmax.art/api/detect/audio \
-H "x-api-key: $AIMD_API_KEY" \
-F "media=@voice.m4a"Read your current usage
curl https://detect.aigenmax.art/api/usage \
-H "x-api-key: $AIMD_API_KEY"Responses
A successful check returns 200 with the fields below. ai_generated is a probability between 0 and 1, not proof of origin. Additional analysis fields may be present; ignore ones you do not use.
{
"short_key": "string",
"result": "ai_generated" | "not_ai_generated",
"ai_generated": 0.0 - 1.0
}{
"used": number,
"pending": number,
"limit": number,
"remaining": number,
"resetAt": "ISO 8601 timestamp",
"periodStart": "ISO 8601 timestamp",
"plan": "basic" | "pro" | "max"
}Checks typically take around 10 seconds but vary with file size and service load. Allow up to 170 seconds before timing out on your side.
Errors
Errors return JSON {"error": "message"}. Common statuses are listed below; always show or log the message. Failed checks are never charged.
| Status | Meaning | Charged |
|---|---|---|
| 400 | Missing or invalid url, missing media field, or a video longer than 60 seconds. | No |
| 401 | Missing, revoked or unknown x-api-key header. | No |
| 403 | subscription_required: an active paid subscription is required. Signing up gives no API allowance. | No |
| 413 | File is larger than 200 MB. | No |
| 415 | Unsupported content type, file format or media type mismatch. | No |
| 429 | Per-minute rate cap reached, or the monthly allowance is used up. Read the error message to tell which. | No |
| 5xx | The detection service failed or timed out. Retry later with backoff. | No |
Limits and monthly reset
- Rate caps per minute: Basic 10, Pro 20, Max 30.
- Monthly allowance: Basic 3,000, Pro 8,000, Max 20,000 requests, shared across all media types. There is no free API tier.
- Usage resets at the time in
resetAt. Unused requests do not roll over. No overage charges; checks stop at the limit. pendingcounts checks in progress. Only checks that return a result are added to used.
Key security
- Your full key is displayed once, when generated or rotated. Afterwards only its prefix is shown, so store it immediately.
- Keep it in server-side environment variables or a secret manager. Do not commit it or ship it in client code.
- Rotating issues a new key and immediately revokes the old one. Update your servers before rotating in production.
- If a key leaks, revoke or rotate it from your dashboard right away.