Meet your toolkit.
Five endpoints. One API key. Add useful safety signals to the experience you’re building.
Your first request
Ask your service administrator for an account and credits, then generate a key from your dashboard. Keep this key on your server; never embed it in a mobile app or public browser code.
curl https://api.emeraldtrustengine.com/v1/analyze-face \
-H 'Authorization: Bearer YOUR_API_KEY' \
-H 'Content-Type: application/json' \
-H 'Idempotency-Key: photo-123-face-v1' \
-d '{"imageBase64":"BASE64_ENCODED_IMAGE"}'Send raw base64, without a data:image/… prefix. JPEG and PNG are supported. Use a different idempotency key for every distinct analysis.
Try before integrating
The customer playground runs NudeNet and, when configured, optional OpenAI moderation concurrently, with allow/deny decisions, adjustable thresholds, optional expected labels, three-trial timings and JSON export. It has a separate free allowance of 100 trials per customer per day; no purchased API credits are spent. Playground photos and results are not retained. Failed or unavailable models never produce an allow decision.
Face detection
1 CREDITS / SUCCESSPOST /v1/analyze-face
{"imageBase64":"…","filename":"profile.jpg","minConfidence":0.5}
Returns faceDetected, faceCount, and confidence.
Face comparison
5 CREDITS / SUCCESSPOST /v1/compare-faces
Compare a selfie with up to six profile images. This is a similarity signal to support a verification flow, not a guarantee of identity.
{"selfieBase64":"…","profilePhotosBase64":["…","…"]}Returns facesMatch, similarity, distance, and comparedCount.
Nudity detection
2 CREDITS / SUCCESSPOST /v1/analyze-nudity
{"imageBase64":"…","filename":"profile.jpg"}
Legacy NudeNet endpoint. Returns nudityDetected, explicitNudityDetected, reviewRequired, detections, and moderationStatus (approved, pending_review, or rejected). In the playground, explicit and review categories are instead collapsed into a binary decision at the selected threshold; that score is not a calibrated whole-image probability.
Age safety
3 CREDITS / SUCCESSPOST /v1/analyze-minor-safety
{"imageBase64":"…","filename":"profile.jpg"}
Returns decision (clear, pending_review, or rejected) and estimates with estimated ages. Estimates at or below 12 route to rejection; estimates below 18 route to review. A clear result is not proof of adulthood. Use appropriate age assurance and human review in your own product.
Photo text detection
2 CREDITS / SUCCESSPOST /v1/analyze-text
{"imageBase64":"…","filename":"profile.jpg"}
Powered by PaddleOCR PP-OCRv6. Defaults to variant: "small" and threshold: 0.8. Choose "tiny" for lower latency; Small is better suited to difficult text. Optional recognition threshold: 0.1–0.99.
{"imageBase64":"…","variant":"small","threshold":0.8}Returns textDetected, rawText, phoneNumbersDetected, phoneNumberDetected, lines with recognition confidence, modelName, threshold and timings. Phone numbers are candidates; validate them for your region. False positives and missed text remain possible. Images are processed in memory. Existing idempotency keys retain their original result, including results generated before the PaddleOCR migration; use a new key to rerun.
Credits & safe retries
Every response includes requestId and creditsCharged. Successful analysis consumes the listed cost even if no face, text, or nudity is detected. Failed analysis consumes zero credits.
All requests require an Idempotency-Key header (8–100 characters: letters, digits, dots, colons, underscores, hyphens). Retrying the same endpoint and payload with that key returns the original result without another charge. Reusing it for a different payload returns HTTP 409. To retry a completed but failed analysis, use a new key.
Credit grants, payments, and usage are recorded in a ledger. Subscription credits are added only after a verified successful PayPal payment, never just because a browser returns from checkout. Cancelling stops renewals; unused credits remain. Refunds and reversals withdraw the related payment’s credits; partial refunds require administrator reconciliation.
Errors & limits
| Status | Meaning |
|---|---|
| 400 | Invalid request or missing idempotency key |
| 401 | Missing, invalid, or revoked API key |
| 402 | Insufficient credits |
| 403 | Account disabled |
| 409 | Idempotency key conflict |
| 413 | Image or request too large |
| 422 | Invalid input or analysis failed |
| 429 | Rate limit reached |
| 503 | Analysis temporarily unavailable; no credits charged |
Up to 12 MiB decoded per image; 25 MiB for the total JSON request. Up to six candidate images for comparison. Maximum 60 new requests per minute per customer, plus a server-level IP limit. Allow up to 130 seconds for a request; requests for one customer are processed serially to keep charging consistent.
Data handling
Images are processed in temporary files and deleted after analysis. Images and face embeddings are not stored in the customer database. Structured responses, including any extracted text and age estimates, are retained for 30 days for retry handling, then cleared. Encrypted disaster-recovery backups expire after seven days; a deleted response can therefore remain in a backup for up to seven additional days. Usage metadata and the credit ledger remain for accounting. A retry after result expiry returns 410 without charging; use a new key to analyze again.
Only submit images you’re authorized to process. Keep image contents out of your own application logs, and treat analysis outputs as personal data where applicable.