Submit Detection Job
POST https://app.resemble.ai/api/v2/detect
By default the request is asynchronous. The API responds immediately with a job UUID while analysis continues in the background. For audio, image, and video inputs, include Prefer: wait to block until the requested Detect work completes, including watermark analysis when detect_watermark=true.
For PDFs, submit one document of up to 150 MB and use polling or a callback. The response maps each analyzed image to its location in the PDF.
You can supply media in one of three ways:
- Direct file upload — POST a
multipart/form-datarequest with the file attached asfile. Best for one-off requests against files up to 150 MB. - Public URL — pass
urlwhen the media is already hosted at a publicly reachable HTTPS address. The API fetches the URL itself. PDFs have a 150 MB source limit. - Secure upload token — upload the file first via
POST /secure_uploadsand pass the returned token asmedia_token. Use this when you do not want to host the source file publicly, or when an audio, image, or video file exceeds the 150 MB direct-upload cap. The token is a short-lived JWT that expires 1 hour after issuance.
Exactly one of file, url, or media_token must be provided per request.
Using a direct file upload
Optional parameters (callback_url, intelligence, visualize, etc.) are sent as additional form fields when uploading directly.
File constraints
Requests outside these constraints are rejected with HTTP 400 before any analysis or billing runs. The size-limit error response includes a pointer to the Secure Uploads API as the recommended path for larger audio, image, and video uploads.
Using a public URL
Using a secure upload token
First, upload the file to obtain a token (see Secure Upload):
Then submit the detect job using the returned token as media_token:
Media Source
Provide exactly one of the following.
Optional Parameters
Selecting pages and images (PDF)
The request requires Image detection access. Send one file, public HTTPS url, or secure upload token in media_token. The maximum PDF size is 150 MB for all three methods.
With a URL or token, send the same options in a JSON body. Page selection and the image cap are optional.
Set infer_from_intelligence=true alongside intelligence=true to allow a strong finding to escalate the image verdict. The model score stays the same. Set use_reverse_search=true to enable reverse image search on the extracted images.
The default limits are 25 images and 500 scanned pages per PDF. Your team or plan can have different limits. Invalid page syntax, an out-of-range image cap, or PDF options supplied with another media type return HTTP 400. A valid selection that contains no pages in the submitted document fails during processing.
PDF detection always runs asynchronously. A successful submission returns HTTP 200 with item.uuid, item.media_type: "pdf", and item.status: "processing". Poll with that UUID or include a callback_url to receive one callback for the PDF when it finishes. Sending Prefer: wait returns HTTP 400. Submit each PDF separately. Batch detection, Watermark analysis, Signal, and Identity search do not support PDFs.
Selecting which modality to analyze (video)
A video file contains both an audio track and visual frames, and by default both are analyzed independently — the response carries an audio verdict in metrics and a visual verdict in video_metrics. Use the modality parameter to run only one of them:
Notes:
modalityapplies to video inputs only. It is accepted but ignored for audio and image files (those always run their single modality).- The skipped modality is not analyzed and not billed. A single-modality detect reaches
status: "completed"as soon as the requested modality finishes, unless requested watermark analysis is still processing. Watermark analysis follows the media container type, so a video always uses the video watermark detector regardless of this setting. - Omitting
modalitypreserves the previous behavior (both modalities run). - An invalid value is rejected with HTTP 400 before any analysis or billing runs.
Focusing visual analysis on faces (video)
Set face_only=true to focus the visual model on faces by masking non-face regions before analysis. It is effective only for video inputs when visual analysis runs (modality=all or modality=video). It does not disable or modify audio analysis.
Audio, image, and modality=audio video requests may include the parameter, but the effective value returned by the API is false. The parameter does not change billing, the selected modality, or the detection report structure.
The same boolean field is supported in JSON requests that use a public url or a secure-upload media_token. Create, Get, List, and individual-detection webhook payloads expose face_only as the effective value applied to the detection.
Adding Watermark Analysis
Set detect_watermark=true to run watermark decoding alongside deepfake detection. This is detection-only; the Detect API does not expose watermark application, strength, or custom-message parameters.
The nested watermark.metrics.overall_status and watermark.metrics.has_watermark fields summarize the Resemble detector result. watermark.metrics.synthid, when present, is the boolean returned by SynthID. These signals are independent: neither one changes the deepfake score or verdict. If SynthID is unavailable, synthid is omitted rather than returned as false.
The option requires Watermark detection access and adds the existing Watermark detection charge to the Detect request. SynthID is included in that operation and is not charged separately. Requests without the option preserve the existing Detect cost and response shape.
Use the JSON boolean true/false, or the exact form-data value true/false. Other values return HTTP 400. If the API key does not have Watermark detection access, the request returns HTTP 403 before creating the Detect or Watermark job.
Watermark analysis is limited to single-file audio, image, and video requests. POST /detect/batch rejects detect_watermark=true with HTTP 400. The source limit is 200 MB for audio, image, and video, including when the source is referenced by URL or media_token.
Known oversized uploads and secure-upload tokens are rejected before provider work. If a remote source’s size is only discovered while it is being resolved, the nested Watermark analysis can fail while the core deepfake detection continues normally.
Response
Asynchronous Response
By default, the API responds immediately while processing continues in the background:
Use the UUID to check status via the Get Detection Result endpoint, or provide a callback_url to receive results automatically.
When detect_watermark=true, an otherwise successful Detect remains processing until Watermark analysis is terminal. A core detection failure still reports failed. A Watermark failure is terminal and appears inside item.watermark; it does not fail an otherwise successful deepfake detection. Intelligence remains a separate processing stage and may still be processing after item.status becomes completed. Use the nested item.intelligence fields—or GET /detect/{uuid}?experts=true for all successfully completed Intelligence results—to monitor Intelligence separately.
Completed audio, image, and video responses can include c2pa_manifest after Content Credentials verification runs. validation_state: "Valid" includes the manifest details returned by C2PA tooling, NotPresent means no embedded Content Credentials were found, and Unavailable means C2PA verification could not complete. C2PA verification failures do not fail the detect job.
PDF File Response
Poll the PDF UUID or use the callback to receive this completed response. In this excerpt, page 1 contains a scored image and a small image. Page 2 reuses the first image.
Each image has a one-based page and index, its own detection UUID, and a score or error. Read the PDF result fields for coverage, progress, and skip reasons.
Synchronous Response (with Prefer: wait header)
When using the Prefer: wait header, the API returns after the requested Detect work is terminal. If detect_watermark=true, the response waits for both core detection and watermark analysis:
Audio File Response
Image File Response
The image is scored fake, so image_metrics includes attack, localized, and hmap_kind:
attack lists every attack type from most to least likely; the example is trimmed to three entries. attack and localized are omitted when the image is scored real. See Image Attack Type for the full list of codes.
Image File Response (with Reverse Image Search)
When use_reverse_search is enabled, the image_metrics object includes a reverse_image_search_sources array containing web sources that matched the submitted image, along with a verdict and similarity score for each:
Video File Response
This example shows a video detection submitted with face_only=true and the default modality=all. The video is scored fake, so the video result and its fake chunks include attack:
attack lists every attack type from most to least likely; the example is trimmed to three entries. It is omitted when the video or chunk is scored real. See Video Attack Type for the full list of codes.
Video File Response (audio-only modality)
When modality=audio, only the audio track is analyzed. The response carries metrics and the requested modality, while video_metrics is absent. The detect is completed even though no video analysis ran:
Zero Retention Mode
Zero Retention Mode is available only on Enterprise plans. When you set zero_retention_mode=true, the API handles the submitted media as follows.
- URL redaction:
urlandaudio_urlare set tonullin all responses, both during processing and after completion. - Filename tokenization: The original filename is replaced with a tokenized value (e.g.,
redacted_abc123def4567890abcd1234.mp3). - C2PA results:
c2pa_manifestcan still be returned after verification, with media references sanitized from stored metadata. - Watermark results: Requested watermark analysis reaches a terminal state before cleanup. Its metrics and status remain available after the source reference is removed.
- Media deletion: After detection completes (including requested downstream tasks such as watermark analysis, intelligence, or source tracing), the uploaded file is permanently deleted from storage. The
file_deleted_attimestamp is set once the purge succeeds. - Downstream records: Related records (intelligence, source tracing, identity) are still created but do not store copies of the media.
Zero Retention Mode is request-driven only — team-level or UI defaults are not applied to API requests. You must explicitly pass zero_retention_mode: true on each request.
For PDFs, Zero Retention covers the original PDF and extracted images. The image map keeps page numbers, indices, and analysis results, and each image’s url is null.
Zero Retention Mode Request Example
Zero Retention Mode Response Example
Once the media file has been purged, file_deleted_at is populated with the purge timestamp:
Callback URL
If you provide a callback_url when submitting a media file, a callback is sent after detection completes. The payload has the same structure as the synchronous response shown above, including the effective face_only value and the conditional watermark object.
When detect_watermark=true, callback delivery always waits until the Watermark analysis is completed or failed. This is independent of wait_for_intelligence. A failed Watermark analysis is included as a nested failure and does not suppress the callback or change a successful deepfake verdict.
For PDFs, one callback includes the document and image map. With Intelligence enabled, the PDF normally waits for image reports to settle, subject to a timeout. Set wait_for_intelligence=false to let the PDF finish once all image verdicts settle. If infer_from_intelligence=true, an image verdict can itself wait for Intelligence. Retrieve report details using the image UUIDs.
For audio, image, and video detects with intelligence=true, the callback includes one Intelligence result in item.intelligence. Use wait_for_intelligence to control when it is delivered:
- Set
wait_for_intelligence=trueto receive the callback only after both Detect and Intelligence have finished. The Intelligence status will becompletedorfailed. This mode has no forced timeout, so the callback remains pending while Intelligence is still processing. - Set
wait_for_intelligence=falseto receive the callback as soon as Detect finishes. Intelligence continues separately, anditem.intelligencemay be absent, processing, completed, or failed when the callback is sent. - Omit
wait_for_intelligenceto use the standard behavior. The callback waits up to 10 minutes for Intelligence and then sends with the result state available at that time.
These audio, image, and video callbacks include one Intelligence result and never return the array available from GET /detect/{uuid}?experts=true. Intelligence failure does not suppress the callback or change top-level success: when detection succeeded, success remains true. A Detect callback is sent once and is not sent again if Intelligence finishes after an early or timed callback.
Delivery is retried when the callback endpoint fails or returns an ambiguous response, so your endpoint should handle repeated HTTP deliveries idempotently. Completed audio, image, and video callback payloads can also include c2pa_manifest.
Watermark Analysis Errors and Billing
Once a request has been accepted, a provider-side Watermark failure is returned in item.watermark.status: "failed" with error_message. It does not rewrite the core deepfake result or change top-level success for an otherwise successful Detect.
PDF Billing
Each successfully analyzed image is billed at your image detection rate. Only a successful Intelligence report adds the image Intelligence charge. Skips and the PDF itself carry no detection charge. Where a balance check applies, it uses pdf_max_images and the requested Intelligence option to estimate the maximum cost before processing.
