Apply and Verify a Watermark
Apply a Resemble watermark to media, retrieve the processed asset, and verify that its watermark can be detected.
What You Will Build
This walkthrough completes a full watermark round trip:
- Submit a public media URL for watermarking.
- Wait for the watermarked output.
- Submit that output for watermark detection.
- Interpret the verification result.
The same workflow supports audio, image, and video files.
Prerequisites
- A Resemble API token with Watermarking access
- A publicly accessible HTTPS URL for an audio, image, or video file
curlandjq
Set your API token and source URL:
The source must remain publicly available while processing. Audio and image files can be up to 25 MB; videos can be up to 100 MB.
1. Apply the Watermark
Create an asynchronous watermark job:
For image or video media, you can include a strength from 0.0 to 1.0 and a custom_message of up to 64 characters. Audio watermarking ignores those fields.
2. Retrieve the Watermarked Asset
Poll the apply result until processing finishes:
watermarked_media is a signed URL that expires. Download the output promptly or use it immediately in the verification request below.
3. Detect the Watermark
Submit the watermarked output for verification:
If you applied a custom message to an image or video, include that same custom_message in this request. Audio detection ignores the field.
4. Verify the Result
Poll the detection result:
For audio, metrics.overall_status is:
Audio results also include coverage_complete, detected_model_versions, and a result for each checked model version.
For images and videos, both present and degraded indicate that watermark signal was detected. Inspect detection_score, verdict, and model_results for supporting details.
To reduce round trips during development, add Prefer: wait to either POST request. The initial response then waits for processing and returns the completed job when possible.
