Skip to main content
POST
Upscale an image to a higher resolution (all 4 models)
Upscale one source image to a higher target_resolution with one of four models. The call returns 202 Accepted with a job id; poll GET /images/upscales/{id} for the result. The image takes exactly one of image_id, url, or base64 + mime_type. Requires the images.transform scope.

Example: one source per mode

Example: magnific-creative with options

Body
The 202 response is the async job handle:
202 Accepted
model is crystal (default), seedvr, magnific-creative, or magnific-precision. target_resolution is required and drawn from a closed set: 2K, 4K, 6K, 8K, 10K, 12K, 14K, 16K, 20K, 24K, 28K, 32K, 38K. Classes above 16K are valid for crystal only. The per-model factor and area caps are validated before any credits are charged — an over-cap request is a 422, never a charged job.
options are per-model, typed, and strictly validated: supply magnific_creative for the magnific-creative model or magnific_precision for magnific-precision. seedvr and crystal take no options — supplying options for them is a 422. Unknown keys or out-of-range values are 422.
  • magnific_creative: prompt (≤ 500 chars), optimized_for (standard · soft_portraits · hard_portraits · art_n_illustration · videogame_assets · nature_n_landscapes · films_n_photography · 3d_renders · science_fiction_n_horror), creativity/hdr/resemblance/ fractality (integers −10…10), engine (automatic · magnific_illusio · magnific_sharpy · magnific_sparkle).
  • magnific_precision: sharpen/smart_grain/ultra_detail (integers 0…100), flavor (sublime (default) · photo · photo_denoiser).

Credits

Cost is the resolution tier (2K:5, 4K:10, 6K:20, 8K:25, 10K:35, 12K:45, 14K:60, 16K:80) multiplied by the model credit multiplier (Magnific ×3); Crystal above 12K prices by output megapixels. The estimated_credits in the 202 response equals the deduction exactly. See Pricing.

Errors

Authorizations

Authorization
string
header
required

Organization API key as a bearer token: Authorization: Bearer samsa_sk_....

Body

application/json

POST /images/upscales body (SAM-819 / S8.7 — ADR §7, §8, §10).

Upscale ONE source image to a higher target_resolution with one of the four public models. The source is exactly one of image_id (an image in your organization's context), an https url, or base64+mime_type. target_resolution is a CLOSED set — the per-model factor/area caps are validated BEFORE charging (an over-cap request is a 422, never a charged job). options are per-model, typed, and STRICTLY validated (out-of-range / unknown values are 422 — a documented deviation from the app's clamping). Cost is the existing upscale estimator: the resolution tier (2K:5, 4K:10, 6K:20, 8K:25, 10K:35, 12K:45, 14K:60, 16K:80) x the model credit multiplier (Magnific x3); Crystal above 12K prices by output megapixels. estimated_credits in the 202 equals the deduction exactly.

image
PublicImageEditSource · object
required

The source image: exactly one of image_id, an https url, or base64+mime_type.

target_resolution
enum<string>
required

Target resolution class (REQUIRED) — one of 2K, 4K, 6K, 8K, 10K, 12K, 14K, 16K, 20K, 24K, 28K, 32K, 38K. Classes above 16K are only valid for crystal. The per-model factor/area caps are validated before charging.

Available options:
2K,
4K,
6K,
8K,
10K,
12K,
14K,
16K,
20K,
24K,
28K,
32K,
38K
Example:

"4K"

model
enum<string>
default:crystal

Upscale model: seedvr, crystal (default), magnific-creative, or magnific-precision.

Available options:
seedvr,
crystal,
magnific-creative,
magnific-precision
Example:

"crystal"

options
PublicUpscaleOptions · object | null

Per-model tuning options (typed). Only magnific-creative and magnific-precision accept options — supplying options for seedvr/crystal is a 422.

webhook_url
string | null

Optional https webhook notified once on terminal status (signed per the webhook signature scheme; see the webhooks docs).

Example:

"https://example.com/webhooks/samsa"

Response

Successful Response

Shared 202 body for the transform-op submits (SAM-813 / S8 wave).

Every POST /images/<op> returns the async job handle {id, status, estimated_credits}. The initial status is pending (the job is queued), with ONE exception: background-removals and vectorizations answer an owned-image_id cache hit (a ready result already exists for that image) with status: "completed" and estimated_credits: 0 — no new job is queued, the completed webhook event is emitted immediately for a supplied webhook_url, and the result is already available from the op's GET .../{id} endpoint. The other transform ops (img2img, variations, resizes, upscales) always start pending.

id
string<uuid>
required

The job id — poll the op's GET .../{id} endpoint.

status
enum<string>
required

Initial status: pending (job queued — enter the polling flow), or completed with estimated_credits: 0 when background-removals / vectorizations serve an owned-image cache hit (the result is immediately available).

Available options:
pending,
processing,
completed,
failed,
cancelled
Example:

"pending"

estimated_credits
integer
required

Credits this job is expected to cost — 0 on a cache-hit completed response.

Example:

5