API reference
Every endpoint of the Watermark API v1, with its parameters, a request and what comes back.
All endpoints are under https://api.watermark.ws. Send JSON bodies and your key in the Authorization header (see Authentication). Processing endpoints answer 202 and finish in the background; read the request or listen for its webhook.
https://api.watermark.ws
curl https://api.watermark.ws/v1/account \
-H "Authorization: Bearer wm_test_…"
The request object
What every processing endpoint returns, and what GET /v1/requests/{id} and webhooks carry.
Fields
The request's id.
Always request.
Which endpoint started it, such as images/process.
Where the request is. Only succeeded is charged.
queuedprocessingsucceededfailedabortedfalse for a test key's request.
The source as sent: a URL, a file id, or a storage object. A URL longer than 255 characters is shown without its query string, which holds a presigned URL's signature.
What was sent besides the source: operations, output and the endpoint's own fields.
While unfinished: waiting for a worker, waiting for a long-video worker to start (about a minute), or being worked on.
queuedstartingprocessingWhere it runs, once started: inline while you waited, standard on a queue worker, extended on a worker for long videos.
inlinestandardextendedHow far a video has got while it is processing.
Once succeeded.
Show 4 child fields
About the output: dimensions and format for images, duration and codec for videos, pages and size for PDFs.
The files made, one per output, in the order the outputs were sent. Read endpoints make none.
When the first file is deleted. Each file has its own deleted_at.
On a failed request: the files listed were written before the output that failed.
Once failed. See Errors.
Show 4 child fields
Stable; branch on it.
For people.
The output that could not be written, when that was the failure.
Whether sending the same request again may succeed: true when a file or place it writes to could not be reached, or when processing stopped through no fault of the file.
As sent.
As sent.
When the request was accepted.
When it finished.
{
"id": 1234,
"object": "request",
"endpoint": "images/process",
"status": "succeeded",
"livemode": true,
"source": "https://example.com/photo.jpg",
"result": {
"data": {
"width": 1600,
"height": 1067,
"format": "WEBP",
"size": 183021
},
"files": [
{
"id": "file_2kqV7PzM1aT4hQ0bR9sX3c",
"object": "file",
"name": "full",
"format": "webp",
"size": 183021,
"data": {
"width": 1600,
"height": 1067
},
"url": "https://api.watermark.ws/v1/files/file_2kqV7PzM1aT4hQ0bR9sX3c/content?expires=1792335604&signature=…",
"url_expires_at": "2026-10-18T15:00:04Z",
"deleted_at": "2026-10-18T15:00:04Z",
"created_at": "2026-10-11T15:00:04Z"
},
{
"id": "file_8bWc1LmN4pQ7rS2tU5vX9y",
"object": "file",
"name": "thumb",
"format": "webp",
"size": 9120,
"data": {
"width": 400,
"height": 267
},
"url": "https://api.watermark.ws/v1/files/file_8bWc1LmN4pQ7rS2tU5vX9y/content?expires=1792335604&signature=…",
"url_expires_at": "2026-10-18T15:00:04Z",
"deleted_at": "2026-10-18T15:00:04Z",
"created_at": "2026-10-11T15:00:04Z"
}
],
"deleted_at": "2026-10-18T15:00:04Z"
},
"price": {
"amount": "0.004000",
"currency": "usd",
"micro_usd": 4000,
"breakdown": [
{
"output": "full",
"micro_usd": 2000
},
{
"output": "thumb",
"micro_usd": 2000
}
]
},
"customer": "cus_42",
"created_at": "2026-10-11T15:00:00Z",
"completed_at": "2026-10-11T15:00:04Z"
}
The event object
Posted to webhook_url when a request finishes, signed in the Watermark-Signature header. Webhooks shows how to check it.
Fields
The same on every retry of a delivery. Use it to ignore a repeat.
Always event.
What happened.
request.succeededrequest.failedrequest.abortedrequest.progressUnix time.
{
"id": "evt_1234_done",
"object": "event",
"type": "request.succeeded",
"created": 1791738000,
"data": {
"id": 1234,
"object": "request",
"status": "succeeded",
"result": {
"…": "…"
}
}
}
Errors
Every error has one shape, and an HTTP status that matches its type. Branch on code; show message to people. Errors lists every code.
| Status | Meaning |
|---|---|
| 401 | No key, or not a valid one. |
| 402 | No credit left, or the endpoint needs an account that has paid. |
| 404 | Not found on this account. |
| 409 | A conflict: the request has finished, or the Idempotency-Key was used for another request. |
| 422 | Invalid input, or a URL the API will not use. |
| 429 | Too many requests a minute (rate_limited, see Retry-After), or too many of the account's requests running at once (concurrency_limited). |
{
"error": {
"type": "invalid_request",
"code": "validation_failed",
"message": "The operations.0.width field must be between 1 and 20000.",
"param": "operations.0.width",
"request_id": "1234"
}
}
Images
Watermark, resize, crop, filter, draw text and convert photos, one or hundreds at a time. JPEG, PNG, GIF, WebP, TIFF, BMP, HEIC, AVIF, JPEG XL, JPEG 2000, SVG, EPS, PSD, ICO and camera RAW in; JPEG, PNG, WebP, GIF, TIFF or BMP out.
Process image
Run operations on an image, in order, and save the result.
Headers
Bearer wm_live_… or Bearer wm_test_…. See Authentication.
Makes a retry safe: the same key with the same body returns the first request instead of starting another. See Idempotency.
Body parameters
The file: a public http or https URL, a file an earlier request made (file_…), or an object in your connected bucket. See Sources.
Required, unless outputs is sent: then it may be empty and each output have its own.
The files to make, at most 10, each from the result of operations. The first is the one result.data describes. Each may add its own operations, quality and format. See Outputs.
Show 5 child fields
Your name for it, unique in the request, such as preview or thumb.
jpgpngwebpgiftifbmpCompression quality, 1-100.
Run after the shared operations, for this output only.
Where the output goes. Left out, the API keeps it for you and links to it. A presigned URL or your own bucket need an account that has bought credits. See Destinations.
How to save the result: the same as one output named result. Send outputs instead for more than one file.
Show child field
The file format of the result.
jpgpngwebpgiftifbmpWhere to post the request when it finishes. Defaults to the account's webhook, if set. See Webhooks.
Your own reference for who the request is for. Returned with it, and totalled by GET /v1/usage?group_by=customer.
Up to 20 keys of your own, returned with the request and in its webhooks.
The webhook events to send. Defaults to the three finishing ones; add request.progress for progress while it runs. See Webhooks.
Seconds to wait for the result in this response. Finished in time, the answer is 200 with the finished request; otherwise 202, and the request goes on. See Waiting.
curl -X POST https://api.watermark.ws/v1/images/process \
-H "Authorization: Bearer $WATERMARK_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"source": "https://example.com/photo.jpg",
"operations": [
{"type": "resize", "width": 1600, "height": 1600},
{"type": "watermark", "image_url": "https://example.com/logo.png", "x": 40, "y": 40}
],
"output": {"format": "webp"},
"customer": "cus_42"
}'
$client = new \Watermark\Api\Client(getenv('WATERMARK_API_KEY'));
$request = $client->images->process('https://example.com/photo.jpg', [
['type' => 'resize', 'width' => 1600, 'height' => 1600],
['type' => 'watermark', 'image_url' => 'https://example.com/logo.png', 'x' => 40, 'y' => 40],
], [
'output' => ['format' => 'webp'],
'customer' => 'cus_42',
]);
# Waits for the result; add --no-wait to return as soon as it is queued.
watermark image process https://example.com/photo.jpg \
--op resize:width=1600,height=1600 \
--op watermark:image_url=https://example.com/logo.png,x=40,y=40 \
--format webp --customer cus_42 --out photo-watermarked.webp
{
"id": 1234,
"object": "request",
"endpoint": "images/process",
"status": "queued",
"livemode": true,
"source": "https://example.com/photo.jpg",
"created_at": "2026-10-11T15:00:00Z"
}
Read image
Read dimensions, format, colorspace and orientation; with level, also the angle that would level a tilted horizon (level_angle).
Headers
Bearer wm_live_… or Bearer wm_test_…. See Authentication.
Makes a retry safe: the same key with the same body returns the first request instead of starting another. See Idempotency.
Body parameters
The file: a public http or https URL, a file an earlier request made (file_…), or an object in your connected bucket. See Sources.
Also find the angle, in degrees, that would level a tilted horizon: result.data.level_angle, ready for rotate's straighten.
Where to post the request when it finishes. Defaults to the account's webhook, if set. See Webhooks.
Your own reference for who the request is for. Returned with it, and totalled by GET /v1/usage?group_by=customer.
Up to 20 keys of your own, returned with the request and in its webhooks.
The webhook events to send. Defaults to the three finishing ones; add request.progress for progress while it runs. See Webhooks.
Seconds to wait for the result in this response. Finished in time, the answer is 200 with the finished request; otherwise 202, and the request goes on. See Waiting.
curl -X POST https://api.watermark.ws/v1/images/read \
-H "Authorization: Bearer $WATERMARK_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"source": "https://example.com/photo.jpg",
"level": true
}'
$client = new \Watermark\Api\Client(getenv('WATERMARK_API_KEY'));
$request = $client->images->read('https://example.com/photo.jpg', [
'level' => true,
]);
# Waits for the result; add --no-wait to return as soon as it is queued.
watermark image read https://example.com/photo.jpg
{
"id": 1234,
"object": "request",
"endpoint": "images/read",
"status": "queued",
"livemode": true,
"source": "https://example.com/photo.jpg",
"created_at": "2026-10-11T15:00:00Z"
}
{
"frames": 1,
"orientation": "Undefined",
"format": "JPEG",
"colorspace": "sRGB",
"width": 900,
"height": 600,
"size": 97451
}
Create image
Start from a blank canvas instead of a source: draw on it with operations such as text, and save it as outputs. A font preview is a canvas, a text and a trim.
Headers
Bearer wm_live_… or Bearer wm_test_…. See Authentication.
Makes a retry safe: the same key with the same body returns the first request instead of starting another. See Idempotency.
Body parameters
The canvas width in pixels.
The canvas height in pixels.
transparent or a hex color.
Run in order, top to bottom. Each is {"type": …} plus that operation's parameters. See Operations.
The files to make, at most 10, each from the result of operations. The first is the one result.data describes. Each may add its own operations, quality and format. See Outputs.
Show 5 child fields
Your name for it, unique in the request, such as preview or thumb.
jpgpngwebpgiftifbmpCompression quality, 1-100.
Run after the shared operations, for this output only.
Where the output goes. Left out, the API keeps it for you and links to it. A presigned URL or your own bucket need an account that has bought credits. See Destinations.
How to save the result: the same as one output named result. Send outputs instead for more than one file.
Show child field
The file format of the result.
jpgpngwebpgiftifbmpWhere to post the request when it finishes. Defaults to the account's webhook, if set. See Webhooks.
Your own reference for who the request is for. Returned with it, and totalled by GET /v1/usage?group_by=customer.
Up to 20 keys of your own, returned with the request and in its webhooks.
The webhook events to send. Defaults to the three finishing ones; add request.progress for progress while it runs. See Webhooks.
Seconds to wait for the result in this response. Finished in time, the answer is 200 with the finished request; otherwise 202, and the request goes on. See Waiting.
curl -X POST https://api.watermark.ws/v1/images/create \
-H "Authorization: Bearer $WATERMARK_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"width": 1200,
"height": 300,
"operations": [
{"type": "text", "text": "Lena Hart Photography", "font": "inter-bold", "size": 96, "color": "#202020", "position": "center"},
{"type": "trim"}
],
"outputs": [{"name": "logo", "format": "png"}],
"wait": 10
}'
$client = new \Watermark\Api\Client(getenv('WATERMARK_API_KEY'));
$request = $client->images->create(1200, 300, [
['type' => 'text', 'text' => 'Lena Hart Photography', 'font' => 'inter-bold', 'size' => 96, 'color' => '#202020', 'position' => 'center'],
['type' => 'trim'],
], [
'outputs' => [['name' => 'logo', 'format' => 'png']],
'wait' => 10,
]);
# Waits for the result; add --no-wait to return as soon as it is queued.
watermark image create --width 1200 --height 300 \
--op 'text:text=Lena Hart Photography,font=inter-bold,size=96,color=#202020,position=center' \
--op trim \
--out logo.png
{
"id": 1234,
"object": "request",
"endpoint": "images/create",
"status": "queued",
"livemode": true,
"source": "https://example.com/photo.jpg",
"created_at": "2026-10-11T15:00:00Z"
}
Videos
Watermark every frame, resize, crop, rotate and re-encode, or save one frame as an image. MP4, MOV, WebM, MKV, AVI, FLV, WMV, MPEG and MPEG-TS in; MP4, MOV, M4V, MKV, WebM, AVI, MPEG, FLV or WMV out. Needs an account that has bought credits.
Process video
Run operations on a video, in order, and save an MP4. Reports progress while it runs. A long video runs on a dedicated worker that takes about a minute to start: the request shows stage: starting meanwhile, and a request.progress event follows when processing begins.
Headers
Bearer wm_live_… or Bearer wm_test_…. See Authentication.
Makes a retry safe: the same key with the same body returns the first request instead of starting another. See Idempotency.
Body parameters
The file: a public http or https URL, a file an earlier request made (file_…), or an object in your connected bucket. See Sources.
Run in order, top to bottom. Each is {"type": …} plus that operation's parameters. See Operations.
The video first, then up to two images, each a frame of the finished video at at seconds, with its own image operations, quality and format: a poster, a thumbnail. Each image costs the price of processing an image. See Outputs.
Show 6 child fields
The video's: mp4, mov, m4v, mkv, webm, avi, mpg, flv, wmv. An image's: jpg, png, webp, gif, tif, bmp.
Images only: which moment, in seconds.
An image's compression quality, or how the video is encoded: 78 is the default, 90 sharper and about 1.7 times the size, 65 about 60% of it. A WebM given a quality is written in VP9.
Images only: run on the frame.
Where the output goes. Left out, the API keeps it for you and links to it. A presigned URL or your own bucket need an account that has bought credits. See Destinations.
How to save the result: the same as one output named result. Send outputs instead for more than one file.
Show child field
The file format of the result.
mp4movm4vmkvwebmavimpgflvwmvOnly keep the first this many seconds.
Where to post the request when it finishes. Defaults to the account's webhook, if set. See Webhooks.
Your own reference for who the request is for. Returned with it, and totalled by GET /v1/usage?group_by=customer.
Up to 20 keys of your own, returned with the request and in its webhooks.
The webhook events to send. Defaults to the three finishing ones; add request.progress for progress while it runs. See Webhooks.
Seconds to wait for the result in this response. Finished in time, the answer is 200 with the finished request; otherwise 202, and the request goes on. See Waiting.
curl -X POST https://api.watermark.ws/v1/videos/process \
-H "Authorization: Bearer $WATERMARK_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"source": "https://example.com/clip.mp4",
"operations": [
{"type": "watermark", "image_url": "https://example.com/logo.png", "x": 24, "y": 24}
],
"webhook_url": "https://example.com/hooks/watermark"
}'
$client = new \Watermark\Api\Client(getenv('WATERMARK_API_KEY'));
$request = $client->videos->process('https://example.com/clip.mp4', [
['type' => 'watermark', 'image_url' => 'https://example.com/logo.png', 'x' => 24, 'y' => 24],
], [
'webhook_url' => 'https://example.com/hooks/watermark',
]);
# Waits for the result; add --no-wait to return as soon as it is queued.
watermark video process https://example.com/clip.mp4 \
--op watermark:image_url=https://example.com/logo.png,x=24,y=24 \
--webhook https://example.com/hooks/watermark --out clip-watermarked.mp4
{
"id": 1234,
"object": "request",
"endpoint": "videos/process",
"status": "queued",
"livemode": true,
"source": "https://example.com/clip.mp4",
"created_at": "2026-10-11T15:00:00Z"
}
Read video
Read dimensions, duration, codec (h264, hevc, prores, ...), bit depth, bitrate and frame rate.
Headers
Bearer wm_live_… or Bearer wm_test_…. See Authentication.
Makes a retry safe: the same key with the same body returns the first request instead of starting another. See Idempotency.
Body parameters
The file: a public http or https URL, a file an earlier request made (file_…), or an object in your connected bucket. See Sources.
Where to post the request when it finishes. Defaults to the account's webhook, if set. See Webhooks.
Your own reference for who the request is for. Returned with it, and totalled by GET /v1/usage?group_by=customer.
Up to 20 keys of your own, returned with the request and in its webhooks.
The webhook events to send. Defaults to the three finishing ones; add request.progress for progress while it runs. See Webhooks.
Seconds to wait for the result in this response. Finished in time, the answer is 200 with the finished request; otherwise 202, and the request goes on. See Waiting.
curl -X POST https://api.watermark.ws/v1/videos/read \
-H "Authorization: Bearer $WATERMARK_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"source": "https://example.com/clip.mp4"
}'
$client = new \Watermark\Api\Client(getenv('WATERMARK_API_KEY'));
$request = $client->videos->read('https://example.com/clip.mp4');
# Waits for the result; add --no-wait to return as soon as it is queued.
watermark video read https://example.com/clip.mp4
{
"id": 1234,
"object": "request",
"endpoint": "videos/read",
"status": "queued",
"livemode": true,
"source": "https://example.com/clip.mp4",
"created_at": "2026-10-11T15:00:00Z"
}
Screenshot video
Save one frame as an image.
Headers
Bearer wm_live_… or Bearer wm_test_…. See Authentication.
Makes a retry safe: the same key with the same body returns the first request instead of starting another. See Idempotency.
Body parameters
The file: a public http or https URL, a file an earlier request made (file_…), or an object in your connected bucket. See Sources.
Which moment, in seconds from the start. A moment at or past the end takes the frame from the video's last second; the result's data.seconds says which moment was used.
Treat seconds as a preference: when the frame there is blank (a black or white opening, a fade), take one from 10% of the way in, or failing that the middle. The result's data.seconds says which moment was used.
The file to make. This endpoint makes one.
Show 3 child fields
Your name for it, unique in the request, such as preview or thumb.
jpgpngWhere the output goes. Left out, the API keeps it for you and links to it. A presigned URL or your own bucket need an account that has bought credits. See Destinations.
How to save the result: the same as one output named result. Send outputs instead for more than one file.
Show child field
The file format of the result.
jpgpngWhere to post the request when it finishes. Defaults to the account's webhook, if set. See Webhooks.
Your own reference for who the request is for. Returned with it, and totalled by GET /v1/usage?group_by=customer.
Up to 20 keys of your own, returned with the request and in its webhooks.
The webhook events to send. Defaults to the three finishing ones; add request.progress for progress while it runs. See Webhooks.
Seconds to wait for the result in this response. Finished in time, the answer is 200 with the finished request; otherwise 202, and the request goes on. See Waiting.
curl -X POST https://api.watermark.ws/v1/videos/screenshot \
-H "Authorization: Bearer $WATERMARK_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"source": "https://example.com/clip.mp4",
"seconds": 5,
"output": {
"format": "jpg"
}
}'
$client = new \Watermark\Api\Client(getenv('WATERMARK_API_KEY'));
$request = $client->videos->screenshot('https://example.com/clip.mp4', 5, [
'output' => ['format' => 'jpg'],
]);
# Waits for the result; add --no-wait to return as soon as it is queued.
watermark video screenshot https://example.com/clip.mp4 \
--format jpg --seconds 5 --out clip-frame.jpg
{
"id": 1234,
"object": "request",
"endpoint": "videos/screenshot",
"status": "queued",
"livemode": true,
"source": "https://example.com/clip.mp4",
"created_at": "2026-10-11T15:00:00Z"
}
Documents
Watermark every page, render one page as an image, or turn an office document into a PDF. PDF, Word (DOCX and DOC), OpenDocument text, RTF and PowerPoint (PPTX) in. A PDF stays a PDF and a DOCX a DOCX; the others come out as a PDF, a deck one page per slide. Snapshots are images.
Process document
Run operations on every page of a PDF.
Headers
Bearer wm_live_… or Bearer wm_test_…. See Authentication.
Makes a retry safe: the same key with the same body returns the first request instead of starting another. See Idempotency.
Body parameters
The file: a public http or https URL, a file an earlier request made (file_…), or an object in your connected bucket. See Sources.
Run in order, top to bottom. Each is {"type": …} plus that operation's parameters. See Operations.
The file to make. This endpoint makes one.
Show 3 child fields
Your name for it, unique in the request, such as preview or thumb.
pdfdocxWhere the output goes. Left out, the API keeps it for you and links to it. A presigned URL or your own bucket need an account that has bought credits. See Destinations.
Only keep the first this many pages.
Where to post the request when it finishes. Defaults to the account's webhook, if set. See Webhooks.
Your own reference for who the request is for. Returned with it, and totalled by GET /v1/usage?group_by=customer.
Up to 20 keys of your own, returned with the request and in its webhooks.
The webhook events to send. Defaults to the three finishing ones; add request.progress for progress while it runs. See Webhooks.
Seconds to wait for the result in this response. Finished in time, the answer is 200 with the finished request; otherwise 202, and the request goes on. See Waiting.
curl -X POST https://api.watermark.ws/v1/documents/process \
-H "Authorization: Bearer $WATERMARK_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"source": "https://example.com/contract.pdf",
"operations": [
{"type": "watermark", "image_url": "https://example.com/logo.png", "x": 36, "y": 36}
]
}'
$client = new \Watermark\Api\Client(getenv('WATERMARK_API_KEY'));
$request = $client->documents->process('https://example.com/contract.pdf', [
['type' => 'watermark', 'image_url' => 'https://example.com/logo.png', 'x' => 36, 'y' => 36],
]);
# Waits for the result; add --no-wait to return as soon as it is queued.
watermark document process https://example.com/contract.pdf \
--op watermark:image_url=https://example.com/logo.png,x=36,y=36 \
--out contract-watermarked.pdf
{
"id": 1234,
"object": "request",
"endpoint": "documents/process",
"status": "queued",
"livemode": true,
"source": "https://example.com/contract.pdf",
"created_at": "2026-10-11T15:00:00Z"
}
Read document
Read the page count and page size.
Headers
Bearer wm_live_… or Bearer wm_test_…. See Authentication.
Makes a retry safe: the same key with the same body returns the first request instead of starting another. See Idempotency.
Body parameters
The file: a public http or https URL, a file an earlier request made (file_…), or an object in your connected bucket. See Sources.
Where to post the request when it finishes. Defaults to the account's webhook, if set. See Webhooks.
Your own reference for who the request is for. Returned with it, and totalled by GET /v1/usage?group_by=customer.
Up to 20 keys of your own, returned with the request and in its webhooks.
The webhook events to send. Defaults to the three finishing ones; add request.progress for progress while it runs. See Webhooks.
Seconds to wait for the result in this response. Finished in time, the answer is 200 with the finished request; otherwise 202, and the request goes on. See Waiting.
curl -X POST https://api.watermark.ws/v1/documents/read \
-H "Authorization: Bearer $WATERMARK_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"source": "https://example.com/contract.pdf"
}'
$client = new \Watermark\Api\Client(getenv('WATERMARK_API_KEY'));
$request = $client->documents->read('https://example.com/contract.pdf');
# Waits for the result; add --no-wait to return as soon as it is queued.
watermark document read https://example.com/contract.pdf
{
"id": 1234,
"object": "request",
"endpoint": "documents/read",
"status": "queued",
"livemode": true,
"source": "https://example.com/contract.pdf",
"created_at": "2026-10-11T15:00:00Z"
}
Snapshot document
Render one page as an image.
Headers
Bearer wm_live_… or Bearer wm_test_…. See Authentication.
Makes a retry safe: the same key with the same body returns the first request instead of starting another. See Idempotency.
Body parameters
The file: a public http or https URL, a file an earlier request made (file_…), or an object in your connected bucket. See Sources.
Which page, from 1.
What the page's empty parts become. transparent keeps them see-through, as for a logo drawn on a page; it needs a png output.
whitetransparentTrim the empty edge around what the page shows, so a logo comes out as just the logo.
The file to make. This endpoint makes one.
Show 3 child fields
Your name for it, unique in the request, such as preview or thumb.
jpgpngWhere the output goes. Left out, the API keeps it for you and links to it. A presigned URL or your own bucket need an account that has bought credits. See Destinations.
How to save the result: the same as one output named result. Send outputs instead for more than one file.
Show child field
The file format of the result.
jpgpngWhere to post the request when it finishes. Defaults to the account's webhook, if set. See Webhooks.
Your own reference for who the request is for. Returned with it, and totalled by GET /v1/usage?group_by=customer.
Up to 20 keys of your own, returned with the request and in its webhooks.
The webhook events to send. Defaults to the three finishing ones; add request.progress for progress while it runs. See Webhooks.
Seconds to wait for the result in this response. Finished in time, the answer is 200 with the finished request; otherwise 202, and the request goes on. See Waiting.
curl -X POST https://api.watermark.ws/v1/documents/snapshot \
-H "Authorization: Bearer $WATERMARK_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"source": "https://example.com/contract.pdf",
"page": 1,
"output": {
"format": "png"
}
}'
$client = new \Watermark\Api\Client(getenv('WATERMARK_API_KEY'));
$request = $client->documents->snapshot('https://example.com/contract.pdf', 1, [
'output' => ['format' => 'png'],
]);
# Waits for the result; add --no-wait to return as soon as it is queued.
watermark document snapshot https://example.com/contract.pdf \
--format png --page 1 --out contract-page.png
{
"id": 1234,
"object": "request",
"endpoint": "documents/snapshot",
"status": "queued",
"livemode": true,
"source": "https://example.com/contract.pdf",
"created_at": "2026-10-11T15:00:00Z"
}
Convert document
Turn a Word, PowerPoint, OpenDocument or RTF file into a PDF of every page, a deck one page per slide, to show or keep it as a PDF. A PDF source fails with unsupported_media, as there is nothing to convert.
Headers
Bearer wm_live_… or Bearer wm_test_…. See Authentication.
Makes a retry safe: the same key with the same body returns the first request instead of starting another. See Idempotency.
Body parameters
The file: a public http or https URL, a file an earlier request made (file_…), or an object in your connected bucket. See Sources.
The file to make. This endpoint makes one.
Show 3 child fields
Your name for it, unique in the request, such as preview or thumb.
pdfWhere the output goes. Left out, the API keeps it for you and links to it. A presigned URL or your own bucket need an account that has bought credits. See Destinations.
How to save the result: the same as one output named result. Send outputs instead for more than one file.
Show child field
The file format of the result.
pdfWhere to post the request when it finishes. Defaults to the account's webhook, if set. See Webhooks.
Your own reference for who the request is for. Returned with it, and totalled by GET /v1/usage?group_by=customer.
Up to 20 keys of your own, returned with the request and in its webhooks.
The webhook events to send. Defaults to the three finishing ones; add request.progress for progress while it runs. See Webhooks.
Seconds to wait for the result in this response. Finished in time, the answer is 200 with the finished request; otherwise 202, and the request goes on. See Waiting.
curl -X POST https://api.watermark.ws/v1/documents/convert \
-H "Authorization: Bearer $WATERMARK_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"source": "https://example.com/proposal.docx"
}'
$client = new \Watermark\Api\Client(getenv('WATERMARK_API_KEY'));
$request = $client->documents->convert('https://example.com/proposal.docx');
# Waits for the result; add --no-wait to return as soon as it is queued.
watermark document convert https://example.com/proposal.docx \
--out proposal.pdf
{
"id": 1234,
"object": "request",
"endpoint": "documents/convert",
"status": "queued",
"livemode": true,
"source": "https://example.com/contract.pdf",
"created_at": "2026-10-11T15:00:00Z"
}
Requests
Follow, list and abort requests.
List requests
The account's requests, newest first.
Query parameters
How many requests to return.
Only requests older than this id. Pass the last id of a page to get the next one.
curl "https://api.watermark.ws/v1/requests?limit=20" \
-H "Authorization: Bearer $WATERMARK_API_KEY"
$client = new \Watermark\Api\Client(getenv('WATERMARK_API_KEY'));
$requests = $client->requests->list(20);
watermark requests --limit 20
{
"object": "list",
"data": [
{
"id": 1234,
"object": "request",
"endpoint": "images/process",
"status": "succeeded",
"livemode": true,
"created_at": "2026-10-11T15:00:00Z"
}
],
"has_more": true
}
Get request
One request, with its result once it has succeeded. Download links in the result work until the result is deleted.
Query parameters
The request's id.
Seconds to wait for the request to finish before answering.
curl https://api.watermark.ws/v1/requests/1234 \
-H "Authorization: Bearer $WATERMARK_API_KEY"
$client = new \Watermark\Api\Client(getenv('WATERMARK_API_KEY'));
$request = $client->requests->get(1234);
watermark request get 1234
{
"id": 1234,
"object": "request",
"endpoint": "images/process",
"status": "succeeded",
"livemode": true,
"source": "https://example.com/photo.jpg",
"result": {
"data": {
"width": 1600,
"height": 1067,
"format": "WEBP",
"size": 183021
},
"files": [
{
"id": "file_2kqV7PzM1aT4hQ0bR9sX3c",
"object": "file",
"name": "full",
"format": "webp",
"size": 183021,
"data": {
"width": 1600,
"height": 1067
},
"url": "https://api.watermark.ws/v1/files/file_2kqV7PzM1aT4hQ0bR9sX3c/content?expires=1792335604&signature=…",
"url_expires_at": "2026-10-18T15:00:04Z",
"deleted_at": "2026-10-18T15:00:04Z",
"created_at": "2026-10-11T15:00:04Z"
},
{
"id": "file_8bWc1LmN4pQ7rS2tU5vX9y",
"object": "file",
"name": "thumb",
"format": "webp",
"size": 9120,
"data": {
"width": 400,
"height": 267
},
"url": "https://api.watermark.ws/v1/files/file_8bWc1LmN4pQ7rS2tU5vX9y/content?expires=1792335604&signature=…",
"url_expires_at": "2026-10-18T15:00:04Z",
"deleted_at": "2026-10-18T15:00:04Z",
"created_at": "2026-10-11T15:00:04Z"
}
],
"deleted_at": "2026-10-18T15:00:04Z"
},
"price": {
"amount": "0.004000",
"currency": "usd",
"micro_usd": 4000,
"breakdown": [
{
"output": "full",
"micro_usd": 2000
},
{
"output": "thumb",
"micro_usd": 2000
}
]
},
"customer": "cus_42",
"created_at": "2026-10-11T15:00:00Z",
"completed_at": "2026-10-11T15:00:04Z"
}
Download result
The link in result.files[].url: open it as given, with no key. It works until the result is deleted (url_expires_at) and redirects to the file. Anyone with the link can download the file.
Query parameters
The request's id.
Part of the link.
Part of the link.
curl -L -o photo-watermarked.webp "https://api.watermark.ws/v1/results/1234?expires=1792335604&signature=9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08"
$request = $client->requests->get(1234);
file_put_contents('photo-watermarked.webp', file_get_contents($request['result']['files'][0]['url']));
# --out on a process command downloads the file for you; a link you already have is a plain download.
curl -L -o photo-watermarked.webp "https://api.watermark.ws/v1/results/1234?expires=1792335604&signature=9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08"
Abort request
Stop a request that has not finished. It is not charged.
Path parameters
The request's id.
curl -X POST https://api.watermark.ws/v1/requests/1235/abort \
-H "Authorization: Bearer $WATERMARK_API_KEY"
$client = new \Watermark\Api\Client(getenv('WATERMARK_API_KEY'));
$request = $client->requests->abort(1235);
watermark request abort 1235
{
"id": 1235,
"object": "request",
"endpoint": "videos/process",
"status": "aborted",
"livemode": true,
"source": "https://example.com/clip.mp4",
"price": {
"amount": "0.000000",
"currency": "usd",
"micro_usd": 0
},
"created_at": "2026-10-11T15:00:00Z",
"completed_at": "2026-10-11T15:00:09Z"
}
List events
The account's finishing events since a moment, oldest first, as their webhooks carried them (or would have). Catch up after your receiver was down, instead of polling every request. Kept for 30 days.
Query parameters
Only events after this moment, ISO 8601.
How many events to return.
curl "https://api.watermark.ws/v1/events?since=2026-10-13T15%3A00%3A00Z" \
-H "Authorization: Bearer $WATERMARK_API_KEY"
$client = new \Watermark\Api\Client(getenv('WATERMARK_API_KEY'));
$events = $client->events->since('2026-10-13T15:00:00Z');
watermark events --since 2026-10-13T15:00:00Z
{}
Files
The files requests made: read, download and delete them.
Get file
One of the account's files, with a fresh download link while the API keeps it.
Path parameters
The file's id.
curl https://api.watermark.ws/v1/files/file_2kqV7PzM1aT4hQ0bR9sX3c \
-H "Authorization: Bearer $WATERMARK_API_KEY"
$client = new \Watermark\Api\Client(getenv('WATERMARK_API_KEY'));
$file = $client->files->get('file_2kqV7PzM1aT4hQ0bR9sX3c');
watermark file get file_2kqV7PzM1aT4hQ0bR9sX3c
{
"id": "file_2kqV7PzM1aT4hQ0bR9sX3c",
"object": "file",
"request": 1234,
"name": "full",
"format": "webp",
"size": 183021,
"data": {
"width": 1600,
"height": 1067
},
"url": "https://api.watermark.ws/v1/files/file_2kqV7PzM1aT4hQ0bR9sX3c/content?expires=1792335604&signature=…",
"url_expires_at": "2026-10-18T15:00:04Z",
"deleted_at": "2026-10-18T15:00:04Z",
"created_at": "2026-10-11T15:00:04Z"
}
Delete file
Delete a file the API keeps before it would expire. Its links stop working at once. Files written to your own storage are not the API's to delete (409 file_not_managed).
Path parameters
The file's id.
curl -X DELETE https://api.watermark.ws/v1/files/file_2kqV7PzM1aT4hQ0bR9sX3c \
-H "Authorization: Bearer $WATERMARK_API_KEY"
$client = new \Watermark\Api\Client(getenv('WATERMARK_API_KEY'));
$file = $client->files->delete('file_2kqV7PzM1aT4hQ0bR9sX3c');
watermark file delete file_2kqV7PzM1aT4hQ0bR9sX3c
{
"id": "file_2kqV7PzM1aT4hQ0bR9sX3c",
"object": "file",
"request": 1234,
"name": "full",
"format": "webp",
"size": 183021,
"data": {
"width": 1600,
"height": 1067
},
"url": "https://api.watermark.ws/v1/files/file_2kqV7PzM1aT4hQ0bR9sX3c/content?expires=1792335604&signature=…",
"url_expires_at": "2026-10-18T15:00:04Z",
"deleted_at": "2026-10-18T15:00:04Z",
"created_at": "2026-10-11T15:00:04Z"
}
Download file
The link in a file's url: open it as given, with no key. It works until the file is deleted (url_expires_at) and redirects to the file.
Query parameters
The file's id.
Part of the link.
Part of the link.
curl -L -o photo-watermarked.webp "https://api.watermark.ws/v1/files/file_2kqV7PzM1aT4hQ0bR9sX3c/content?expires=1792335604&signature=9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08"
$request = $client->requests->get(1234);
file_put_contents('photo-watermarked.webp', file_get_contents($request['result']['files'][0]['url']));
# --out on a process command downloads the file for you; a link you already have is a plain download.
curl -L -o photo-watermarked.webp "https://api.watermark.ws/v1/files/file_2kqV7PzM1aT4hQ0bR9sX3c/content?expires=1792335604&signature=9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08"
Uploads
Upload a file to the API for a request to read, when it is not on the web: a file in your workspace, attached to a chat or on the user's computer.
Create upload
Get a URL to upload a file to, then send the upload's id as a request's source. The first request that succeeds uses it up and the file is deleted; a request that fails leaves it for a retry. Unused uploads are deleted after a day.
Headers
Bearer wm_live_… or Bearer wm_test_…. See Authentication.
Makes a retry safe: the same key with the same body returns the first request instead of starting another. See Idempotency.
Body parameters
Bytes; at most your account's max_source_bytes.
Such as image/heic, video/mp4 or application/pdf. The PUT must send the same.
curl -X POST https://api.watermark.ws/v1/uploads \
-H "Authorization: Bearer $WATERMARK_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"filename": "IMG_4471.heic",
"size": 3185122,
"content_type": "image/heic"
}'
$client = new \Watermark\Api\Client(getenv('WATERMARK_API_KEY'));
$upload = $client->uploads->create('IMG_4471.heic') // reads the file, makes the upload and PUTs it;
watermark upload IMG_4471.heic
{
"id": "upl_9f3Tq1LmA2bC4dE6fG8hJ0",
"object": "upload",
"filename": "IMG_4471.heic",
"size": 3185122,
"content_type": "image/heic",
"status": "pending",
"upload": {
"method": "PUT",
"url": "https://uploads.watermark.ws/…?X-Amz-Signature=…",
"headers": {
"Content-Type": "image/heic"
},
"expires_at": "2026-10-13T16:00:00Z"
},
"expires_at": "2026-10-14T15:00:00Z",
"created_at": "2026-10-13T15:00:00Z"
}
Get upload
An upload's status, with a fresh PUT URL while nothing has been uploaded.
Path parameters
The upload's id.
curl https://api.watermark.ws/v1/uploads/upl_9f3Tq1LmA2bC4dE6fG8hJ0 \
-H "Authorization: Bearer $WATERMARK_API_KEY"
$client = new \Watermark\Api\Client(getenv('WATERMARK_API_KEY'));
$upload = $client->uploads->get('upl_9f3Tq1LmA2bC4dE6fG8hJ0');
watermark upload get upl_9f3Tq1LmA2bC4dE6fG8hJ0
{
"id": "upl_9f3Tq1LmA2bC4dE6fG8hJ0",
"object": "upload",
"filename": "IMG_4471.heic",
"size": 3185122,
"content_type": "image/heic",
"status": "pending",
"upload": {
"method": "PUT",
"url": "https://uploads.watermark.ws/…?X-Amz-Signature=…",
"headers": {
"Content-Type": "image/heic"
},
"expires_at": "2026-10-13T16:00:00Z"
},
"expires_at": "2026-10-14T15:00:00Z",
"created_at": "2026-10-13T15:00:00Z"
}
Delete upload
Delete an upload no request is using.
Path parameters
The upload's id.
curl -X DELETE https://api.watermark.ws/v1/uploads/upl_9f3Tq1LmA2bC4dE6fG8hJ0 \
-H "Authorization: Bearer $WATERMARK_API_KEY"
$client = new \Watermark\Api\Client(getenv('WATERMARK_API_KEY'));
$upload = $client->uploads->delete('upl_9f3Tq1LmA2bC4dE6fG8hJ0');
watermark upload delete upl_9f3Tq1LmA2bC4dE6fG8hJ0
{
"id": "upl_9f3Tq1LmA2bC4dE6fG8hJ0",
"object": "upload",
"filename": "IMG_4471.heic",
"size": 3185122,
"content_type": "image/heic",
"status": "pending",
"upload": {
"method": "PUT",
"url": "https://uploads.watermark.ws/…?X-Amz-Signature=…",
"headers": {
"Content-Type": "image/heic"
},
"expires_at": "2026-10-13T16:00:00Z"
},
"expires_at": "2026-10-14T15:00:00Z",
"created_at": "2026-10-13T15:00:00Z"
}
Storage
Connect a bucket of your own, so requests read from it and results are delivered into it instead of through a download link.
curl https://api.watermark.ws/v1/storage \
-H "Authorization: Bearer $WATERMARK_API_KEY"
$client = new \Watermark\Api\Client(getenv('WATERMARK_API_KEY'));
$connections = $client->storage->list();
watermark storage list
{}
Connect storage
Connect an S3 bucket of yours. Create an IAM role that may read and write under the prefixes you list, give it the returned trust_policy, then verify the connection. The API assumes the role with the external_id it made for this connection, so no other account can use your role. Accounts that have bought credits only.
Headers
Bearer wm_live_… or Bearer wm_test_…. See Authentication.
Makes a retry safe: the same key with the same body returns the first request instead of starting another. See Idempotency.
Body parameters
s3Such as us-east-1.
The role the API assumes.
Key prefixes ending in /; requests may only use keys under these.
curl -X POST https://api.watermark.ws/v1/storage \
-H "Authorization: Bearer $WATERMARK_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"provider": "s3",
"bucket": "acme-photos",
"region": "us-east-1",
"role_arn": "arn:aws:iam::123456789012:role/watermark-api",
"prefixes": [
"photos/",
"renders/"
]
}'
$client = new \Watermark\Api\Client(getenv('WATERMARK_API_KEY'));
$storage = $client->storage->connect([
'provider' => 's3',
'bucket' => 'acme-photos',
'region' => 'us-east-1',
'role_arn' => 'arn:aws:iam::123456789012:role/watermark-api',
'prefixes' => ['photos/', 'renders/'],
]);
watermark storage connect --bucket acme-photos --region us-east-1 --role-arn arn:aws:iam::123456789012:role/watermark-api --prefix photos/ --prefix renders/
{
"id": "stg_7a",
"object": "storage",
"provider": "s3",
"bucket": "acme-photos",
"region": "us-east-1",
"role_arn": "arn:aws:iam::123456789012:role/watermark-api",
"prefixes": [
"photos/",
"renders/"
],
"read": true,
"write": true,
"status": "unverified",
"external_id": "wmx_Qk8pW3c9Lm2Zt7Hs1aB4nV6xR0yE5dFg",
"trust_policy": {
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Principal": {
"AWS": [
"arn:aws:iam::841837852274:role/laravel-vapor-role",
"arn:aws:iam::841837852274:role/watermark-fargate-task-role"
]
},
"Action": "sts:AssumeRole",
"Condition": {
"StringEquals": {
"sts:ExternalId": "wmx_Qk8pW3c9Lm2Zt7Hs1aB4nV6xR0yE5dFg"
}
}
}
]
},
"permissions_policy": {
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"s3:GetObject",
"s3:PutObject",
"s3:DeleteObject"
],
"Resource": [
"arn:aws:s3:::acme-photos/photos/*",
"arn:aws:s3:::acme-photos/renders/*"
]
}
]
},
"created_at": "2026-10-13T15:00:00Z"
}
Get storage
One storage connection.
Path parameters
The connection's id.
curl https://api.watermark.ws/v1/storage/stg_7a \
-H "Authorization: Bearer $WATERMARK_API_KEY"
$client = new \Watermark\Api\Client(getenv('WATERMARK_API_KEY'));
$storage = $client->storage->get('stg_7a');
watermark storage get stg_7a
{
"id": "stg_7a",
"object": "storage",
"provider": "s3",
"bucket": "acme-photos",
"region": "us-east-1",
"role_arn": "arn:aws:iam::123456789012:role/watermark-api",
"prefixes": [
"photos/",
"renders/"
],
"read": true,
"write": true,
"status": "verified",
"external_id": "wmx_Qk8pW3c9Lm2Zt7Hs1aB4nV6xR0yE5dFg",
"trust_policy": {
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Principal": {
"AWS": [
"arn:aws:iam::841837852274:role/laravel-vapor-role",
"arn:aws:iam::841837852274:role/watermark-fargate-task-role"
]
},
"Action": "sts:AssumeRole",
"Condition": {
"StringEquals": {
"sts:ExternalId": "wmx_Qk8pW3c9Lm2Zt7Hs1aB4nV6xR0yE5dFg"
}
}
}
]
},
"permissions_policy": {
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"s3:GetObject",
"s3:PutObject",
"s3:DeleteObject"
],
"Resource": [
"arn:aws:s3:::acme-photos/photos/*",
"arn:aws:s3:::acme-photos/renders/*"
]
}
]
},
"verified_at": "2026-10-13T15:10:00Z",
"created_at": "2026-10-13T15:00:00Z"
}
Change storage
Change the prefixes, or whether the connection may read or write; the bucket, region and role stay. Send the whole new list of prefixes. The API checks the new settings as verify does before keeping them, so a connection requests use only changes to settings your role allows: give the role the new permissions first, such as an added prefix, then send the change. The response has the permissions_policy the role now needs; remove what it no longer lists.
If the check fails, the answer is a 422 with the check's code (as verify's) and, in error.permissions_policy, the policy the new settings need. A verified connection is then left as it was. One that was not verified yet takes the new settings and becomes failed, as a failed verify leaves it.
Headers
Bearer wm_live_… or Bearer wm_test_…. See Authentication.
Makes a retry safe: the same key with the same body returns the first request instead of starting another. See Idempotency.
Path and body parameters
The connection's id.
The whole new list of key prefixes, each ending in /.
Whether requests may read through the connection.
Whether requests may write through the connection.
curl -X PATCH https://api.watermark.ws/v1/storage/stg_7a \
-H "Authorization: Bearer $WATERMARK_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"prefixes": [
"photos/",
"renders/",
"archive/"
]
}'
$client = new \Watermark\Api\Client(getenv('WATERMARK_API_KEY'));
$storage = $client->storage->update('stg_7a', [
'prefixes' => ['photos/', 'renders/', 'archive/'],
]);
watermark storage update stg_7a --prefix photos/ --prefix renders/ --prefix archive/
{
"id": "stg_7a",
"object": "storage",
"provider": "s3",
"bucket": "acme-photos",
"region": "us-east-1",
"role_arn": "arn:aws:iam::123456789012:role/watermark-api",
"prefixes": [
"photos/",
"renders/",
"archive/"
],
"read": true,
"write": true,
"status": "verified",
"external_id": "wmx_Qk8pW3c9Lm2Zt7Hs1aB4nV6xR0yE5dFg",
"trust_policy": {
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Principal": {
"AWS": [
"arn:aws:iam::841837852274:role/laravel-vapor-role",
"arn:aws:iam::841837852274:role/watermark-fargate-task-role"
]
},
"Action": "sts:AssumeRole",
"Condition": {
"StringEquals": {
"sts:ExternalId": "wmx_Qk8pW3c9Lm2Zt7Hs1aB4nV6xR0yE5dFg"
}
}
}
]
},
"permissions_policy": {
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"s3:GetObject",
"s3:PutObject",
"s3:DeleteObject"
],
"Resource": [
"arn:aws:s3:::acme-photos/photos/*",
"arn:aws:s3:::acme-photos/renders/*",
"arn:aws:s3:::acme-photos/archive/*"
]
}
]
},
"verified_at": "2026-10-13T15:10:00Z",
"created_at": "2026-10-13T15:00:00Z"
}
Disconnect storage
Requests can no longer use the connection. Nothing in the bucket is touched.
Path parameters
The connection's id.
curl -X DELETE https://api.watermark.ws/v1/storage/stg_7a \
-H "Authorization: Bearer $WATERMARK_API_KEY"
$client = new \Watermark\Api\Client(getenv('WATERMARK_API_KEY'));
$storage = $client->storage->disconnect('stg_7a');
watermark storage disconnect stg_7a
{
"id": "stg_7a",
"object": "storage",
"deleted": true
}
Verify storage
The API assumes your role, then under each prefix writes, reads back and deletes a small object, as the connection allows. Requests can use it once verified; a failure says why in last_error.
Path parameters
The connection's id.
curl -X POST https://api.watermark.ws/v1/storage/stg_7a/verify \
-H "Authorization: Bearer $WATERMARK_API_KEY"
$client = new \Watermark\Api\Client(getenv('WATERMARK_API_KEY'));
$storage = $client->storage->verify('stg_7a');
watermark storage verify stg_7a
{
"id": "stg_7a",
"object": "storage",
"provider": "s3",
"bucket": "acme-photos",
"region": "us-east-1",
"role_arn": "arn:aws:iam::123456789012:role/watermark-api",
"prefixes": [
"photos/",
"renders/"
],
"read": true,
"write": true,
"status": "verified",
"external_id": "wmx_Qk8pW3c9Lm2Zt7Hs1aB4nV6xR0yE5dFg",
"trust_policy": {
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Principal": {
"AWS": [
"arn:aws:iam::841837852274:role/laravel-vapor-role",
"arn:aws:iam::841837852274:role/watermark-fargate-task-role"
]
},
"Action": "sts:AssumeRole",
"Condition": {
"StringEquals": {
"sts:ExternalId": "wmx_Qk8pW3c9Lm2Zt7Hs1aB4nV6xR0yE5dFg"
}
}
}
]
},
"permissions_policy": {
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"s3:GetObject",
"s3:PutObject",
"s3:DeleteObject"
],
"Resource": [
"arn:aws:s3:::acme-photos/photos/*",
"arn:aws:s3:::acme-photos/renders/*"
]
}
]
},
"verified_at": "2026-10-13T15:10:00Z",
"created_at": "2026-10-13T15:00:00Z"
}
Account
Balance, usage and the operation catalog.
Get account
The account behind the key: balance, tier, and the key's mode and limits.
curl https://api.watermark.ws/v1/account \
-H "Authorization: Bearer $WATERMARK_API_KEY"
$client = new \Watermark\Api\Client(getenv('WATERMARK_API_KEY'));
$account = $client->account->get();
watermark account
{
"object": "account",
"id": 7,
"name": "Acme Photos",
"email": "dev@example.com",
"tier": "paid",
"balance": {
"amount": "18.420000",
"currency": "usd",
"micro_usd": 18420000
},
"webhook_url": "https://example.com/hooks/watermark",
"livemode": true,
"billing": "prepaid",
"limits": {
"requests_per_minute": 120,
"max_source_bytes": 2147483648,
"concurrent_requests": 10,
"concurrent_extended": 2,
"max_operations": 20
},
"suspended": false,
"created_at": "2026-10-11T14:52:10Z"
}
Get usage
Requests, spend and bytes over at most 92 days, grouped by day, endpoint, customer or status.
Query parameters
First day, YYYY-MM-DD. Defaults to 29 days ago.
Last day, YYYY-MM-DD. Defaults to today.
What each row totals.
dayendpointcustomerstatusOnly this customer's requests.
curl "https://api.watermark.ws/v1/usage?from=2026-10-01&group_by=endpoint" \
-H "Authorization: Bearer $WATERMARK_API_KEY"
$client = new \Watermark\Api\Client(getenv('WATERMARK_API_KEY'));
$usage = $client->account->usage([
'from' => '2026-10-01',
'group_by' => 'endpoint',
]);
watermark usage --from 2026-10-01 --group-by endpoint
{
"object": "usage",
"from": "2026-10-01",
"to": "2026-10-13",
"group_by": "endpoint",
"data": [
{
"endpoint": "images/process",
"requests": 1840,
"succeeded": 1822,
"failed": 18,
"spent": "3.644000",
"spent_micro_usd": 3644000,
"source_bytes": 912455120,
"result_bytes": 301228873
}
]
}
List fonts
The built-in fonts a text operation can name in font. Your own font goes in font_url instead.
curl https://api.watermark.ws/v1/fonts \
-H "Authorization: Bearer $WATERMARK_API_KEY"
$client = new \Watermark\Api\Client(getenv('WATERMARK_API_KEY'));
$fonts = $client->fonts->list();
watermark fonts
{
"object": "list",
"data": [
{
"name": "inter-bold",
"family": "Inter",
"style": "Bold",
"category": "sans-serif",
"license": "OFL-1.1"
}
]
}
List operations
Every operation, its parameters and the output formats, per media type: what a client needs to build requests. The same catalog, with pictures, is at https://api.watermark.ws/docs/operations.
curl https://api.watermark.ws/v1/operations \
-H "Authorization: Bearer $WATERMARK_API_KEY"
$client = new \Watermark\Api\Client(getenv('WATERMARK_API_KEY'));
$catalog = $client->account->operations();
watermark operations
{
"object": "operations",
"data": {
"image": {
"formats": [
"jpg",
"png",
"webp",
"gif",
"tif",
"bmp"
],
"operations": {
"resize": {
"description": "Resize to a width and height.",
"params": {
"width": {
"description": "The width in pixels.",
"required": true
},
"height": {
"description": "The height in pixels.",
"required": true
},
"preserve_aspect_ratio": {
"description": "Fit inside the box instead of stretching to it.",
"required": false,
"default": true
},
"crop_center": {
"description": "Fill the box and crop what overflows, centered.",
"required": false,
"default": false
}
}
}
}
}
}
}