Before you start
- A valid Bearer token. See Authentication.
- Enough credits. A failed generation is refunded, but the request is rejected up front with
402 insufficient_creditsif your balance is too low. Check the per-model cost withGET /apps/watermark-remover/info. - A publicly reachable image URL. The API fetches the image server-side, so it cannot be behind a login, a signed-URL expiry, or a firewall.
Step 1 — Check available models
Model IDs and prices change. Read them from the API rather than hard-coding them:tier, its pricing.credits, and whether it requires_prompt:
Step 2 — Choose a model tier
model_id accepts either a full model ID or one of three friendly aliases:
Start with
lite and only move up if the output disappoints. If you omit model_id entirely you get lite.
The tiers are aliases, not separate endpoints —
"model_id": "pro" and "model_id": "replicate/pruna-image-edit" are the same request. Aliases stay stable when the underlying model is swapped, so prefer them.Step 3 — Submit the image
Note the explicit timeout in each example. This is the step people get wrong.Request fields
Step 4 — Read the response
Treat
output_urls as opaque. The hostname and path shape are not part of the contract — results are normally served from the GoStudio CDN, but if mirroring does not complete you get the provider’s own URL instead. Do not hardcode or CSP-pin the host.
Credits are reserved when the job is accepted. If the generation fails, they are refunded automatically — a failed request does not cost you anything.
Step 5 — Optional: receive results by webhook
Pass awebhook_url and GoStudio will POST the finished result to it, so you are not depending solely on holding the connection open.
data object shown in Step 4:
POST and does not read your response status, so a non-2xx (or a timeout on your side) triggers no retry and no redelivery. Return quickly and do any real work asynchronously, and treat the HTTP response of the original request — not the webhook — as the source of truth. If you miss a delivery, re-fetch the result with GET /api/v2/apps/watermark-remover/{jobId} (Step 6).
The URL must be HTTPS. A plain http:// webhook is rejected up front with 400 invalid_webhook_url.
Step 6 — Look up an earlier job
You do not need this for a normal generation — Step 3 already returns the finished image. It is here for re-fetching the outputs of a past job, or checking on one whose connection dropped:output_urls and credits_deducted appear only once status is completed. When it is failed, you get an error field instead.
Common issues
See Errors for the full code reference.

