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, image, and video files can be up to 200 MB. The watermarked file comes back as WAV, PNG, or MP4 unless you add "output_format": "source" to the apply request to keep the source’s format.
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.
