Watermark API
Reference

API reference

View as Markdown

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.

The same reference as Markdown, and as an OpenAPI 3.1 spec for Postman, Insomnia or a code generator.
Base URL
https://api.watermark.ws
Authentication
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

id integer

The request's id.

object string

Always request.

endpoint string

Which endpoint started it, such as images/process.

status string

Where the request is. Only succeeded is charged.

queuedprocessingsucceededfailedaborted
livemode boolean

false for a test key's request.

source object

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.

input object

What was sent besides the source: operations, output and the endpoint's own fields.

stage string

While unfinished: waiting for a worker, waiting for a long-video worker to start (about a minute), or being worked on.

queuedstartingprocessing
runtime string

Where it runs, once started: inline while you waited, standard on a queue worker, extended on a worker for long videos.

inlinestandardextended
progress integer, 0 to 100

How far a video has got while it is processing.

result object

Once succeeded.

Show 4 child fields
result.data object

About the output: dimensions and format for images, duration and codec for videos, pages and size for PDFs.

result.files array of operations

The files made, one per output, in the order the outputs were sent. Read endpoints make none.

result.deleted_at timestamp

When the first file is deleted. Each file has its own deleted_at.

result.partial boolean

On a failed request: the files listed were written before the output that failed.

error object

Once failed. See Errors.

Show 4 child fields
error.code string

Stable; branch on it.

error.message string

For people.

error.output string

The output that could not be written, when that was the failure.

error.retryable boolean

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.

price object
customer string

As sent.

metadata object

As sent.

created_at timestamp

When the request was accepted.

completed_at timestamp

When it finished.

A request that succeeded
{
    "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

id string

The same on every retry of a delivery. Use it to ignore a repeat.

object string

Always event.

type string

What happened.

request.succeededrequest.failedrequest.abortedrequest.progress
created integer

Unix time.

data Request object
POST to your webhook_url
{
    "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.

StatusMeaning
401No key, or not a valid one.
402No credit left, or the endpoint needs an account that has paid.
404Not found on this account.
409A conflict: the request has finished, or the Idempotency-Key was used for another request.
422Invalid input, or a URL the API will not use.
429Too many requests a minute (rate_limited, see Retry-After), or too many of the account's requests running at once (concurrency_limited).
Response 422 Unprocessable Content
{
    "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

POST/v1/images/process

Run operations on an image, in order, and save the result.

$0.002 per request Failed requests are free

Headers

Authorization header Required

Bearer wm_live_… or Bearer wm_test_…. See Authentication.

Idempotency-Key header, up to 255 characters

Makes a retry safe: the same key with the same body returns the first request instead of starting another. See Idempotency.

Body parameters

source object Required

The file: a public http or https URL, a file an earlier request made (file_…), or an object in your connected bucket. See Sources.

operations array of operations, 1 to 20

Required, unless outputs is sent: then it may be empty and each output have its own.

outputs array, 1 to 10

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
outputs[].name string Required

Your name for it, unique in the request, such as preview or thumb.

outputs[].format string default jpg
jpgpngwebpgiftifbmp
outputs[].quality integer, 1 to 100

Compression quality, 1-100.

outputs[].operations array of operations

Run after the shared operations, for this output only.

outputs[].destination object

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.

output object

How to save the result: the same as one output named result. Send outputs instead for more than one file.

Show child field
output.format string default jpg

The file format of the result.

jpgpngwebpgiftifbmp
webhook_url URL

Where to post the request when it finishes. Defaults to the account's webhook, if set. See Webhooks.

customer string, up to 64 characters

Your own reference for who the request is for. Returned with it, and totalled by GET /v1/usage?group_by=customer.

metadata object, up to 20 keys

Up to 20 keys of your own, returned with the request and in its webhooks.

events array

The webhook events to send. Defaults to the three finishing ones; add request.progress for progress while it runs. See Webhooks.

wait integer, 0 to 25 default 0

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.

Returns 202. Accepted, and not finished yet: queued, or still running when wait ended.

Returns 200. Finished within wait; or the request first sent with this Idempotency-Key.

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"
  }'
Response 202 Accepted
{
    "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

POST/v1/images/read

Read dimensions, format, colorspace and orientation; with level, also the angle that would level a tilted horizon (level_angle).

$0.0005 per request Failed requests are free

Headers

Authorization header Required

Bearer wm_live_… or Bearer wm_test_…. See Authentication.

Idempotency-Key header, up to 255 characters

Makes a retry safe: the same key with the same body returns the first request instead of starting another. See Idempotency.

Body parameters

source object Required

The file: a public http or https URL, a file an earlier request made (file_…), or an object in your connected bucket. See Sources.

level boolean default false

Also find the angle, in degrees, that would level a tilted horizon: result.data.level_angle, ready for rotate's straighten.

webhook_url URL

Where to post the request when it finishes. Defaults to the account's webhook, if set. See Webhooks.

customer string, up to 64 characters

Your own reference for who the request is for. Returned with it, and totalled by GET /v1/usage?group_by=customer.

metadata object, up to 20 keys

Up to 20 keys of your own, returned with the request and in its webhooks.

events array

The webhook events to send. Defaults to the three finishing ones; add request.progress for progress while it runs. See Webhooks.

wait integer, 0 to 25 default 0

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.

Returns 202. Accepted, and not finished yet: queued, or still running when wait ended.

Returns 200. Finished within wait; or the request first sent with this Idempotency-Key.

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
  }'
Response 202 Accepted
{
    "id": 1234,
    "object": "request",
    "endpoint": "images/read",
    "status": "queued",
    "livemode": true,
    "source": "https://example.com/photo.jpg",
    "created_at": "2026-10-11T15:00:00Z"
}
result.data once it has succeeded
{
    "frames": 1,
    "orientation": "Undefined",
    "format": "JPEG",
    "colorspace": "sRGB",
    "width": 900,
    "height": 600,
    "size": 97451
}

Create image

POST/v1/images/create

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.

$0.002 per request Failed requests are free

Headers

Authorization header Required

Bearer wm_live_… or Bearer wm_test_…. See Authentication.

Idempotency-Key header, up to 255 characters

Makes a retry safe: the same key with the same body returns the first request instead of starting another. See Idempotency.

Body parameters

width integer, 1 to 10000 Required

The canvas width in pixels.

height integer, 1 to 10000 Required

The canvas height in pixels.

background string default transparent

transparent or a hex color.

operations array of operations, 0 to 20 Required

Run in order, top to bottom. Each is {"type": …} plus that operation's parameters. See Operations.

outputs array, 1 to 10

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
outputs[].name string Required

Your name for it, unique in the request, such as preview or thumb.

outputs[].format string default jpg
jpgpngwebpgiftifbmp
outputs[].quality integer, 1 to 100

Compression quality, 1-100.

outputs[].operations array of operations

Run after the shared operations, for this output only.

outputs[].destination object

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.

output object

How to save the result: the same as one output named result. Send outputs instead for more than one file.

Show child field
output.format string default jpg

The file format of the result.

jpgpngwebpgiftifbmp
webhook_url URL

Where to post the request when it finishes. Defaults to the account's webhook, if set. See Webhooks.

customer string, up to 64 characters

Your own reference for who the request is for. Returned with it, and totalled by GET /v1/usage?group_by=customer.

metadata object, up to 20 keys

Up to 20 keys of your own, returned with the request and in its webhooks.

events array

The webhook events to send. Defaults to the three finishing ones; add request.progress for progress while it runs. See Webhooks.

wait integer, 0 to 25 default 0

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.

Returns 202. Accepted, and not finished yet: queued, or still running when wait ended.

Returns 200. Finished within wait; or the request first sent with this Idempotency-Key.

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
  }'
Response 202 Accepted
{
    "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

POST/v1/videos/process

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.

$0.03 per started minute of video Failed requests are free

Headers

Authorization header Required

Bearer wm_live_… or Bearer wm_test_…. See Authentication.

Idempotency-Key header, up to 255 characters

Makes a retry safe: the same key with the same body returns the first request instead of starting another. See Idempotency.

Body parameters

source object Required

The file: a public http or https URL, a file an earlier request made (file_…), or an object in your connected bucket. See Sources.

operations array of operations, 1 to 20 Required

Run in order, top to bottom. Each is {"type": …} plus that operation's parameters. See Operations.

outputs array, 1 to 3

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
outputs[].name string Required
outputs[].format string

The video's: mp4, mov, m4v, mkv, webm, avi, mpg, flv, wmv. An image's: jpg, png, webp, gif, tif, bmp.

outputs[].at number

Images only: which moment, in seconds.

outputs[].quality integer, 1 to 100

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.

outputs[].operations array of operations

Images only: run on the frame.

outputs[].destination object

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.

output object

How to save the result: the same as one output named result. Send outputs instead for more than one file.

Show child field
output.format string default mp4

The file format of the result.

mp4movm4vmkvwebmavimpgflvwmv
max_duration integer, 1 to 86400

Only keep the first this many seconds.

webhook_url URL

Where to post the request when it finishes. Defaults to the account's webhook, if set. See Webhooks.

customer string, up to 64 characters

Your own reference for who the request is for. Returned with it, and totalled by GET /v1/usage?group_by=customer.

metadata object, up to 20 keys

Up to 20 keys of your own, returned with the request and in its webhooks.

events array

The webhook events to send. Defaults to the three finishing ones; add request.progress for progress while it runs. See Webhooks.

wait integer, 0 to 25 default 0

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.

Returns 202. Accepted, and not finished yet: queued, or still running when wait ended.

Returns 200. Finished within wait; or the request first sent with this Idempotency-Key.

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"
  }'
Response 202 Accepted
{
    "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

POST/v1/videos/read

Read dimensions, duration, codec (h264, hevc, prores, ...), bit depth, bitrate and frame rate.

$0.001 per request Failed requests are free

Headers

Authorization header Required

Bearer wm_live_… or Bearer wm_test_…. See Authentication.

Idempotency-Key header, up to 255 characters

Makes a retry safe: the same key with the same body returns the first request instead of starting another. See Idempotency.

Body parameters

source object Required

The file: a public http or https URL, a file an earlier request made (file_…), or an object in your connected bucket. See Sources.

webhook_url URL

Where to post the request when it finishes. Defaults to the account's webhook, if set. See Webhooks.

customer string, up to 64 characters

Your own reference for who the request is for. Returned with it, and totalled by GET /v1/usage?group_by=customer.

metadata object, up to 20 keys

Up to 20 keys of your own, returned with the request and in its webhooks.

events array

The webhook events to send. Defaults to the three finishing ones; add request.progress for progress while it runs. See Webhooks.

wait integer, 0 to 25 default 0

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.

Returns 202. Accepted, and not finished yet: queued, or still running when wait ended.

Returns 200. Finished within wait; or the request first sent with this Idempotency-Key.

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"
  }'
Response 202 Accepted
{
    "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

POST/v1/videos/screenshot

Save one frame as an image.

$0.002 per request Failed requests are free

Headers

Authorization header Required

Bearer wm_live_… or Bearer wm_test_…. See Authentication.

Idempotency-Key header, up to 255 characters

Makes a retry safe: the same key with the same body returns the first request instead of starting another. See Idempotency.

Body parameters

source object Required

The file: a public http or https URL, a file an earlier request made (file_…), or an object in your connected bucket. See Sources.

seconds integer, 0 to 86400 Required

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.

auto boolean default false

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.

outputs array, 1 to 1

The file to make. This endpoint makes one.

Show 3 child fields
outputs[].name string Required

Your name for it, unique in the request, such as preview or thumb.

outputs[].format string default jpg
jpgpng
outputs[].destination object

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.

output object

How to save the result: the same as one output named result. Send outputs instead for more than one file.

Show child field
output.format string default jpg

The file format of the result.

jpgpng
webhook_url URL

Where to post the request when it finishes. Defaults to the account's webhook, if set. See Webhooks.

customer string, up to 64 characters

Your own reference for who the request is for. Returned with it, and totalled by GET /v1/usage?group_by=customer.

metadata object, up to 20 keys

Up to 20 keys of your own, returned with the request and in its webhooks.

events array

The webhook events to send. Defaults to the three finishing ones; add request.progress for progress while it runs. See Webhooks.

wait integer, 0 to 25 default 0

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.

Returns 202. Accepted, and not finished yet: queued, or still running when wait ended.

Returns 200. Finished within wait; or the request first sent with this Idempotency-Key.

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"
      }
  }'
Response 202 Accepted
{
    "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

POST/v1/documents/process

Run operations on every page of a PDF.

$0.005 per page Failed requests are free

Headers

Authorization header Required

Bearer wm_live_… or Bearer wm_test_…. See Authentication.

Idempotency-Key header, up to 255 characters

Makes a retry safe: the same key with the same body returns the first request instead of starting another. See Idempotency.

Body parameters

source object Required

The file: a public http or https URL, a file an earlier request made (file_…), or an object in your connected bucket. See Sources.

operations array of operations, 1 to 20 Required

Run in order, top to bottom. Each is {"type": …} plus that operation's parameters. See Operations.

outputs array, 1 to 1

The file to make. This endpoint makes one.

Show 3 child fields
outputs[].name string Required

Your name for it, unique in the request, such as preview or thumb.

outputs[].format string default pdf
pdfdocx
outputs[].destination object

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.

max_pages integer, 1 to 2000

Only keep the first this many pages.

webhook_url URL

Where to post the request when it finishes. Defaults to the account's webhook, if set. See Webhooks.

customer string, up to 64 characters

Your own reference for who the request is for. Returned with it, and totalled by GET /v1/usage?group_by=customer.

metadata object, up to 20 keys

Up to 20 keys of your own, returned with the request and in its webhooks.

events array

The webhook events to send. Defaults to the three finishing ones; add request.progress for progress while it runs. See Webhooks.

wait integer, 0 to 25 default 0

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.

Returns 202. Accepted, and not finished yet: queued, or still running when wait ended.

Returns 200. Finished within wait; or the request first sent with this Idempotency-Key.

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}
    ]
  }'
Response 202 Accepted
{
    "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

POST/v1/documents/read

Read the page count and page size.

$0.0005 per request Failed requests are free

Headers

Authorization header Required

Bearer wm_live_… or Bearer wm_test_…. See Authentication.

Idempotency-Key header, up to 255 characters

Makes a retry safe: the same key with the same body returns the first request instead of starting another. See Idempotency.

Body parameters

source object Required

The file: a public http or https URL, a file an earlier request made (file_…), or an object in your connected bucket. See Sources.

webhook_url URL

Where to post the request when it finishes. Defaults to the account's webhook, if set. See Webhooks.

customer string, up to 64 characters

Your own reference for who the request is for. Returned with it, and totalled by GET /v1/usage?group_by=customer.

metadata object, up to 20 keys

Up to 20 keys of your own, returned with the request and in its webhooks.

events array

The webhook events to send. Defaults to the three finishing ones; add request.progress for progress while it runs. See Webhooks.

wait integer, 0 to 25 default 0

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.

Returns 202. Accepted, and not finished yet: queued, or still running when wait ended.

Returns 200. Finished within wait; or the request first sent with this Idempotency-Key.

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"
  }'
Response 202 Accepted
{
    "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

POST/v1/documents/snapshot

Render one page as an image.

$0.003 per request Failed requests are free

Headers

Authorization header Required

Bearer wm_live_… or Bearer wm_test_…. See Authentication.

Idempotency-Key header, up to 255 characters

Makes a retry safe: the same key with the same body returns the first request instead of starting another. See Idempotency.

Body parameters

source object Required

The file: a public http or https URL, a file an earlier request made (file_…), or an object in your connected bucket. See Sources.

page integer, 1 to 2000 default 1

Which page, from 1.

background string default white

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.

whitetransparent
trim boolean default false

Trim the empty edge around what the page shows, so a logo comes out as just the logo.

outputs array, 1 to 1

The file to make. This endpoint makes one.

Show 3 child fields
outputs[].name string Required

Your name for it, unique in the request, such as preview or thumb.

outputs[].format string default jpg
jpgpng
outputs[].destination object

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.

output object

How to save the result: the same as one output named result. Send outputs instead for more than one file.

Show child field
output.format string default jpg

The file format of the result.

jpgpng
webhook_url URL

Where to post the request when it finishes. Defaults to the account's webhook, if set. See Webhooks.

customer string, up to 64 characters

Your own reference for who the request is for. Returned with it, and totalled by GET /v1/usage?group_by=customer.

metadata object, up to 20 keys

Up to 20 keys of your own, returned with the request and in its webhooks.

events array

The webhook events to send. Defaults to the three finishing ones; add request.progress for progress while it runs. See Webhooks.

wait integer, 0 to 25 default 0

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.

Returns 202. Accepted, and not finished yet: queued, or still running when wait ended.

Returns 200. Finished within wait; or the request first sent with this Idempotency-Key.

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"
      }
  }'
Response 202 Accepted
{
    "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

POST/v1/documents/convert

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.

$0.002 per request Failed requests are free

Headers

Authorization header Required

Bearer wm_live_… or Bearer wm_test_…. See Authentication.

Idempotency-Key header, up to 255 characters

Makes a retry safe: the same key with the same body returns the first request instead of starting another. See Idempotency.

Body parameters

source object Required

The file: a public http or https URL, a file an earlier request made (file_…), or an object in your connected bucket. See Sources.

outputs array, 1 to 1

The file to make. This endpoint makes one.

Show 3 child fields
outputs[].name string Required

Your name for it, unique in the request, such as preview or thumb.

outputs[].format string default pdf
pdf
outputs[].destination object

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.

output object

How to save the result: the same as one output named result. Send outputs instead for more than one file.

Show child field
output.format string default pdf

The file format of the result.

pdf
webhook_url URL

Where to post the request when it finishes. Defaults to the account's webhook, if set. See Webhooks.

customer string, up to 64 characters

Your own reference for who the request is for. Returned with it, and totalled by GET /v1/usage?group_by=customer.

metadata object, up to 20 keys

Up to 20 keys of your own, returned with the request and in its webhooks.

events array

The webhook events to send. Defaults to the three finishing ones; add request.progress for progress while it runs. See Webhooks.

wait integer, 0 to 25 default 0

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.

Returns 202. Accepted, and not finished yet: queued, or still running when wait ended.

Returns 200. Finished within wait; or the request first sent with this Idempotency-Key.

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"
  }'
Response 202 Accepted
{
    "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

GET/v1/requests

The account's requests, newest first.

Query parameters

limit integer, 1 to 100 default 20

How many requests to return.

before integer

Only requests older than this id. Pass the last id of a page to get the next one.

Returns 200. A page of requests.

curl "https://api.watermark.ws/v1/requests?limit=20" \
  -H "Authorization: Bearer $WATERMARK_API_KEY"
Response 200 OK
{
    "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

GET/v1/requests/{id}

One request, with its result once it has succeeded. Download links in the result work until the result is deleted.

Query parameters

id integer Required

The request's id.

wait integer, 0 to 25 default 0

Seconds to wait for the request to finish before answering.

Returns 200. The request.

curl https://api.watermark.ws/v1/requests/1234 \
  -H "Authorization: Bearer $WATERMARK_API_KEY"
Response 200 OK
{
    "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

GET/v1/results/{id}

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

id integer Required

The request's id.

expires integer Required

Part of the link.

signature string Required

Part of the link.

Returns 302. Redirects to the file.

curl -L -o photo-watermarked.webp "https://api.watermark.ws/v1/results/1234?expires=1792335604&signature=9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08"

Abort request

POST/v1/requests/{id}/abort

Stop a request that has not finished. It is not charged.

Path parameters

id integer Required

The request's id.

Returns 200. The aborted request. One that has already finished is a 409 request_finished.

curl -X POST https://api.watermark.ws/v1/requests/1235/abort \
  -H "Authorization: Bearer $WATERMARK_API_KEY"
Response 200 OK
{
    "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

GET/v1/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

since timestamp Required

Only events after this moment, ISO 8601.

limit integer, 1 to 100 default 100

How many events to return.

Returns 200. The events. With has_more, ask again from the last one's created.

curl "https://api.watermark.ws/v1/events?since=2026-10-13T15%3A00%3A00Z" \
  -H "Authorization: Bearer $WATERMARK_API_KEY"
Response 200 OK
{}

Files

The files requests made: read, download and delete them.

Get file

GET/v1/files/{id}

One of the account's files, with a fresh download link while the API keeps it.

Path parameters

id string Required

The file's id.

Returns 200. The file.

curl https://api.watermark.ws/v1/files/file_2kqV7PzM1aT4hQ0bR9sX3c \
  -H "Authorization: Bearer $WATERMARK_API_KEY"
Response 200 OK
{
    "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/v1/files/{id}

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

id string Required

The file's id.

Returns 200. The file, with deleted_at.

curl -X DELETE https://api.watermark.ws/v1/files/file_2kqV7PzM1aT4hQ0bR9sX3c \
  -H "Authorization: Bearer $WATERMARK_API_KEY"
Response 200 OK
{
    "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

GET/v1/files/{id}/content

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

id string Required

The file's id.

expires integer Required

Part of the link.

signature string Required

Part of the link.

Returns 302. Redirects to the file.

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

POST/v1/uploads

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

Authorization header Required

Bearer wm_live_… or Bearer wm_test_…. See Authentication.

Idempotency-Key header, up to 255 characters

Makes a retry safe: the same key with the same body returns the first request instead of starting another. See Idempotency.

Body parameters

filename string, up to 255 characters Required
size integer Required

Bytes; at most your account's max_source_bytes.

content_type string Required

Such as image/heic, video/mp4 or application/pdf. The PUT must send the same.

Returns 201. The upload, with its PUT URL.

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"
  }'
Response 201 Created
{
    "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

GET/v1/uploads/{id}

An upload's status, with a fresh PUT URL while nothing has been uploaded.

Path parameters

id string Required

The upload's id.

Returns 200. The upload.

curl https://api.watermark.ws/v1/uploads/upl_9f3Tq1LmA2bC4dE6fG8hJ0 \
  -H "Authorization: Bearer $WATERMARK_API_KEY"
Response 200 OK
{
    "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/v1/uploads/{id}

Delete an upload no request is using.

Path parameters

id string Required

The upload's id.

Returns 200. The upload, deleted.

curl -X DELETE https://api.watermark.ws/v1/uploads/upl_9f3Tq1LmA2bC4dE6fG8hJ0 \
  -H "Authorization: Bearer $WATERMARK_API_KEY"
Response 200 OK
{
    "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.

List storage

GET/v1/storage

The account's storage connections.

Returns 200. The connections.

curl https://api.watermark.ws/v1/storage \
  -H "Authorization: Bearer $WATERMARK_API_KEY"
Response 200 OK
{}

Connect storage

POST/v1/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

Authorization header Required

Bearer wm_live_… or Bearer wm_test_…. See Authentication.

Idempotency-Key header, up to 255 characters

Makes a retry safe: the same key with the same body returns the first request instead of starting another. See Idempotency.

Body parameters

provider string Required
s3
bucket string Required
region string Required

Such as us-east-1.

role_arn string Required

The role the API assumes.

prefixes array, 1 to 20 Required

Key prefixes ending in /; requests may only use keys under these.

read boolean default true
write boolean default true

Returns 201. The connection, unverified, with its policies.

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/"
      ]
  }'
Response 201 Created
{
    "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

GET/v1/storage/{id}

One storage connection.

Path parameters

id string Required

The connection's id.

Returns 200. The connection.

curl https://api.watermark.ws/v1/storage/stg_7a \
  -H "Authorization: Bearer $WATERMARK_API_KEY"
Response 200 OK
{
    "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

PATCH/v1/storage/{id}

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

Authorization header Required

Bearer wm_live_… or Bearer wm_test_…. See Authentication.

Idempotency-Key header, up to 255 characters

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

id string Required

The connection's id.

prefixes array, 1 to 20

The whole new list of key prefixes, each ending in /.

read boolean

Whether requests may read through the connection.

write boolean

Whether requests may write through the connection.

Returns 200. The connection, verified with its new settings.

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/"
      ]
  }'
Response 200 OK
{
    "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

DELETE/v1/storage/{id}

Requests can no longer use the connection. Nothing in the bucket is touched.

Path parameters

id string Required

The connection's id.

Returns 200. Disconnected.

curl -X DELETE https://api.watermark.ws/v1/storage/stg_7a \
  -H "Authorization: Bearer $WATERMARK_API_KEY"
Response 200 OK
{
    "id": "stg_7a",
    "object": "storage",
    "deleted": true
}

Verify storage

POST/v1/storage/{id}/verify

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

id string Required

The connection's id.

Returns 200. Verified.

curl -X POST https://api.watermark.ws/v1/storage/stg_7a/verify \
  -H "Authorization: Bearer $WATERMARK_API_KEY"
Response 200 OK
{
    "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

GET/v1/account

The account behind the key: balance, tier, and the key's mode and limits.

Returns 200. The account.

curl https://api.watermark.ws/v1/account \
  -H "Authorization: Bearer $WATERMARK_API_KEY"
Response 200 OK
{
    "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

GET/v1/usage

Requests, spend and bytes over at most 92 days, grouped by day, endpoint, customer or status.

Query parameters

from date

First day, YYYY-MM-DD. Defaults to 29 days ago.

to date

Last day, YYYY-MM-DD. Defaults to today.

group_by string default day

What each row totals.

dayendpointcustomerstatus
customer string, up to 64 characters

Only this customer's requests.

Returns 200. Usage.

curl "https://api.watermark.ws/v1/usage?from=2026-10-01&group_by=endpoint" \
  -H "Authorization: Bearer $WATERMARK_API_KEY"
Response 200 OK
{
    "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

GET/v1/fonts

The built-in fonts a text operation can name in font. Your own font goes in font_url instead.

Returns 200. The fonts.

curl https://api.watermark.ws/v1/fonts \
  -H "Authorization: Bearer $WATERMARK_API_KEY"
Response 200 OK
{
    "object": "list",
    "data": [
        {
            "name": "inter-bold",
            "family": "Inter",
            "style": "Bold",
            "category": "sans-serif",
            "license": "OFL-1.1"
        }
    ]
}

List operations

GET/v1/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.

Returns 200. The catalog. The example shows one operation of one media type.

curl https://api.watermark.ws/v1/operations \
  -H "Authorization: Bearer $WATERMARK_API_KEY"
Response 200 OK
{
    "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
                        }
                    }
                }
            }
        }
    }
}