Python 3
Download Python examplepython check-media.py photo.jpg basicUses the Python standard library.
Loading…
Create a Business or Developer account and open the developer console. Sandbox and Live API keys are issued immediately while the production API is online. Add a payment card under Billing only before sending your first real Live photo or video.
Save a live key in the server environment as DEEPFAKEPOLICY_API_KEY. Keep it on your server. Each example creates a job, uploads the file, waits for completion and prints the report.
python check-media.py photo.jpg basicUses the Python standard library.
node check-media.mjs clip.mp4Uses native fetch. No packages required.
bash check-media.sh photo.jpg basicRequires curl, Bash and Python 3.
Import an n8n workflow to send a case, follow its progress and return the findings with your original case ID.
The resume action reads the saved job. It does not submit the files for analysis again.
Up to 6 files · 10 MiB per case · limited automatic retries
Save the job ID with your case. Comparison results remain available for seven days from submission. Your n8n instance and destination have their own retention settings.
You configure the destination and its credentials. No CRM is connected automatically. Completed live Cross-checks are billable; the sandbox does not evaluate these files.
| File | Limit | Standard check | With source research |
|---|---|---|---|
| JPG, PNG, WebP | 50 MiB | Basic £0.05 · Full £0.10 | Full + £0.66 |
| GIF | 20 MB | Basic £0.05 · Full £0.10 | Full + £0.66 |
| MP4, MOV, M4V | 200 MB, 60 seconds | £0.03 per started second · Minimum per video: £0.40 | + £1.10 |
30 s: £0.90 · 60 s: £1.80. Duration is read from the file and checked against the analysis response. Unsupported or inconsistent metadata fails the check and is not billed.
Longer videos are split into consecutive clips of up to 30 seconds. The report shows which intervals were checked and any limits; it does not confirm that every frame was analysed. You are billed once for the original video.
GIF files are limited to 20 MB; only the first frame is checked as a PNG still. Other animation frames are not analyzed.
serviceTier: "basic": Detector analysis; additional visual review is not included. serviceTier: "full": Detector analysis and a separate automated visual review. Omitting serviceTier keeps Full for compatibility. Source research requires Full.
Set analysisMode: "deep" to include source research. Completed usage is billed to the company after processing. A completed inconclusive report is a completed check and is billable. This workspace is billed in GBP. Prices exclude applicable taxes.
POST /v1/jobs with a Bearer key, modality, source name and an Idempotency-Key. Reuse that key when retrying the same creation request.PUT the raw file bytes to links.upload, with the file’s Content-Type.GET /v1/jobs/{id} until status is completed or failed. Read result.evidenceReport on completion.DELETE /v1/jobs/{id}. Retention defaults to 24 hours; set retentionHours between 1 and 168. Export JSON, text or PDF and build branded reports.For sandbox requests, include sandboxFixture: "suspicious" and omit the upload. Sandbox keys cannot read, upload or delete live jobs. Live v1 processes photos and videos; other listed modalities are available only as sandbox fixtures.
Source research returns findings within the same versioned report. It does not establish provenance or guarantee authenticity.
Default limits are 60 new live jobs per minute and 20 active live jobs per company. All company keys share these limits. Sandbox limits are 30 and 10. Your console shows any custom limits. The monthly spending limit counts completed and reserved work in the UTC month; failed processing releases the reservation. Deleting reports does not reset usage.
On HTTP 429, wait for Retry-After. For network failures while creating a job, retry with the same idempotency key. If an upload response is lost, retrieve the job before retrying the upload. Check the existing job after a polling timeout.
For completion notifications, set a public HTTPS webhookUrl. Verify HMAC-SHA256 over timestamp.rawBody using the webhook secret and DeepfakePolicy-Signature. Reject stale timestamps, compare signatures in constant time and deduplicate the event ID. Return 2xx after saving the event. Retries occur after 30 seconds, 5 minutes and 30 minutes.
Keys can create/read/delete, create/read or read only. Owners and admins can create or revoke keys. For rotation, create a replacement key, deploy it, then revoke the old key. Revoking a key stops its API access and pending webhook delivery. Requests or deliveries already in progress may still finish.