AI Image Detection API for Developers
Send an image or video, get a structured forensic verdict with a confidence score and per-signal evidence. One bearer token, one POST, no application form.
curl -X POST https://api.fauxlens.com/v1/analyze \ -H "Authorization: Bearer fxd_live_YOUR_KEY" \ -H "Idempotency-Key: $(uuidgen)" \ -F "file=@photo.jpg"
One call costs 10 credits, the same as one scan in the app.
Your free starting credits cover your first few calls. Already used FauxLens? Your existing balance carries over: the API spends the same credits.
{
"data": {
"summary": "Likely AI-Generated",
"confidence_score": 0.94,
"is_short_circuited": false,
"evidence_chain": [
{
"layer": "Metadata Check",
"status": "failed",
"label": "Device Metadata",
"detail": "No camera metadata present."
}
],
"short_id": "Ab3cD4eF"
},
"request_id": "req_9f2c...",
"credits_remaining": 1990,
"idempotent_replay": false
}# curl, to prove the key works:
# curl -X POST https://api.fauxlens.com/v1/analyze \
# -H "Authorization: Bearer fxd_live_YOUR_KEY" \
# -H "Idempotency-Key: $(uuidgen)" \
# -F "file=@photo.jpg"
import random, time, uuid
import requests
URL = "https://api.fauxlens.com/v1/analyze"
def analyze(filepath: str, api_key: str, max_retries: int = 3) -> dict:
# One key per operation, reused across this operation's retries. That is
# what makes a retry after a network timeout safe: if the first attempt
# landed, you are served the cached response instead of being charged
# again.
idem = str(uuid.uuid4())
for attempt in range(max_retries):
with open(filepath, "rb") as f:
r = requests.post(
URL,
headers={"Authorization": f"Bearer {api_key}",
"Idempotency-Key": idem},
files={"file": f},
timeout=120,
)
if r.status_code == 200:
return r.json()
if r.status_code in (429, 500, 503):
# These refund and release the key, so the same one is correct here.
time.sleep((2 ** attempt) + random.uniform(0, 1))
continue
r.raise_for_status()
raise RuntimeError("max retries exceeded")Frequently asked questions
Sign in and create a key on the keys page. There is no application form, no qualification call and no waiting for a reply. Your free starting credits cover your first few API calls. Those are the same credits the web tool starts you with - the API adds no free allowance of its own - so if you have used FauxLens on this device already, you begin with whatever is left of them.
One call costs 10 credits, the same as one scan in the web app. Credit packs are $2.99 for 500 credits, $9.99 for 2,000 credits, $19.99 for 5,000 credits. Credits are a one-time purchase, they do not expire, and the API spends the same balance as the website and the Android app.
There is no monthly free allowance. Your free starting credits cover your first few API calls, enough to confirm the integration works before you buy a pack. Those are the same free credits the web app starts you with - the API adds no free allowance of its own - so if you have used FauxLens before, whatever is left carries over to your account. After that every call costs credits, and calls return 402 when the balance runs out.
Developer keys are limited to 20 requests per minute. There is no monthly request cap - your credit balance is the quota. Rate-limited responses return HTTP 429 with a Retry-After header. Implement exponential backoff with jitter, reusing the same Idempotency-Key so the retry cannot double-charge you.
Most images return in a few seconds. Video takes longer and scales with file length and size. Set a generous client timeout - the upload itself dominates on a slow connection, and a large video has to finish uploading before analysis starts.
No. The API path returns no CORS headers, so a browser request fails with an opaque network error. This is deliberate: a bearer key in a client bundle is a leaked key. Call the API from your backend, a serverless function or a job runner, and keep the key server-side.
Revoke it and create another. Keys are shown once and stored hashed, so nobody - including us - can recover one after it is issued. Revocation takes effect on the very next request, and issuing a replacement is free and instant, which is what makes show-once safe to rely on.
Not currently - every request to the analysis endpoint is synchronous and returns the verdict in the same response. Images typically complete in a few seconds; a large video takes longer, so set a client timeout that accommodates the upload as well as the analysis. If an asynchronous callback mode would change how you integrate, tell us and we will scope it against real demand rather than shipping a queue nobody uses.
The FauxLens web tool provides the same forensic analysis as the API without any registration, so you can validate detection quality for your use case before writing integration code. Worth knowing first: the web tool and the API spend the SAME free credits, so scans you run there leave fewer calls for the API. To exercise the API itself you need a key, which requires signing in.
The same endpoint and the same detection engine. The developer tier is self-serve: a bearer token, credit packs from $2.99, and 20 requests per minute. Enterprise adds prepaid volumes (invoiced), higher rate limits, HMAC signing, IP allowlists and a DPA. No code change: your keys link to the enterprise balance.
Not on its own. Use it to prioritize and to route, and keep a person in the loop before any consequential action: rejecting an applicant, removing an account, denying a claim or treating a file as evidence. See "How to Use a Verdict" above for what the response can and cannot support.
Ready to build?
Sign in, create a key, and make your first call. Keys are shown once and can be revoked any time.