Getting started

Quickstart

Watermarking API quickstart: set an API key, embed an invisible watermark in an image, save the watermark ID, then detect the watermark in a copy.

You need an image and an Etchv account with credits. The free trial includes 200 credits for seven days.

Set your API key

Create a key with watermarks:embed and watermarks:detect. Keep it on your server. For a local terminal:

Shell
export ETCHV_API_KEY="YOUR_API_KEY"

Embed a watermark synchronously

Replace photo.jpg with your image. Use a unique reference for this delivery.

Also send an idempotency key. This is a value you choose for one operation. If a network error makes you retry, send the same request with the same key, and Etchv will not run the work twice. Use a new key for each new operation. Retry safely.

Shell
curl --fail-with-body https://api.etchv.com/watermarks/images \
  -H "X-API-Key: $ETCHV_API_KEY" \
  -H "Idempotency-Key: campaign-01-partner-42" \
  -F 'file=@photo.jpg' \
  --form-string 'data={"delivery":"partner-42-preview"}' \
  -D response-headers.txt --output response-body

Check the status in response-headers.txt:

StatusNext step
200Save the bytes using the Content-Disposition filename, such as photo-watermarked.jpg
202The body is a JSON job receipt. Follow its result_url to collect the image
ErrorRead the error response; the body is not an image
200
Next step
Save the bytes using the Content-Disposition filename, such as photo-watermarked.jpg
202
Next step
The body is a JSON job receipt. Follow its result_url to collect the image
Error
Next step
Read the error response; the body is not an image

Save the watermark ID from X-Watermark-ID with your delivery record. Keep X-Request-ID to recover the request or to contact support. Save the returned bytes as they are. Re-encoding the file can affect recovery.

Detect the watermark

Shell
curl --fail-with-body https://api.etchv.com/watermarks/images/detect \
  -H "X-API-Key: $ETCHV_API_KEY" \
  -F 'file=@photo-watermarked.jpg'

Compare watermark_id with the watermark ID you saved. The response also includes watermarked and confidence. If no watermark is found, watermark_id is null. Interpret detection results.

Build it into your application

Find your files again

Use X-Asset-ID and X-Source-Asset-ID to find the output and original in the asset library. Etchv keeps files for 30 days on the trial and up to a year on a paid plan. Records stay until you delete them.

Prefer an asynchronous request?

Add /async to the end of the embedding endpoint. Send the same fields. Then collect the result later, or ask for a webhook (a message Etchv sends to your server when the job finishes). Sync and async guide.

View source on GitHub

Your privacy, your choice

We use essential cookies to keep Etchv working. Optional analytics helps us improve the site. Analytics is on by default; you can turn it off in preferences. PostHog loads only if you accept all. Privacy policy

ETCHV

Privacy preferences

Choose what you allow on this browser. Analytics is enabled by default. You can turn it off, and change your choice at any time.

Essential

Always active

Supports secure sign-in, account sessions, site security, and remembering your privacy choice. These are needed for Etchv to work.

Analytics

Helps us understand visits and improve the website using page-view and device statistics, which do not use cookies. PostHog also measures visits and campaigns and may set cookies; it loads only after you save a choice with analytics on. Turning this off stops future analytics events.

We do not load advertising scripts. Meeting calendars load only when you open them. These preferences do not change your account, watermarking requests, or asset storage.

Your choice is remembered for 180 days on this browser. Privacy policy