Clarity Upscaler Serverless API

High resolution creative image Upscaler and Enhancer. A free Magnific alternative.

~18.25s
POST /v2/clarity-upscaler · submit + poll
 1# pip install "segmind>=1.1.0"
 2# export SEGMIND_API_KEY="YOUR_API_KEY"
 3import segmind
 4
 5# Async (v2): submit to the queue and block until COMPLETED.
 6# run() returns the final result dict (600s deadline, 1.0s poll by default).
 7result = segmind.run(
 8    "clarity-upscaler",
 9    seed=1337,
10    image="https://segmind-sd-models.s3.amazonaws.com/display_images/clarity_upscale_input.png",
11    prompt="masterpiece, best quality, highres, <lora:more_details:0.5> <lora:SDXLrender_v2.0:1>",
12    dynamic=6,
13    handfix="disabled",
14    sharpen=0,
15    sd_model="juggernaut_reborn.safetensors [338b85bc4f]",
16    scheduler="DPM++ 3M SDE Karras",
17    creativity=0.35,
18    downscaling=False,
19    resemblance=0.6,
20    scale_factor=1,
21    tiling_width=112,
22    output_format="png",
23    tiling_height=144,
24    negative_prompt="(worst quality, low quality, normal quality:2) JuggernautNegative-neg",
25    num_inference_steps=18,
26    downscaling_resolution=768,
27)
28print(result["status"])                      # COMPLETED
29print(result.get("output"))                  # model output (e.g. media URL)
30print(result["metrics"]["inference_time"])   # server compute seconds
31
32# --- Or submit + poll manually (track request_id, control the cadence) ---
33from segmind import SegmindClient, InferenceFailed, InferenceTimeout
34
35client = SegmindClient()                      # reads SEGMIND_API_KEY
36payload = {
37    "seed": 1337,
38    "image": "https://segmind-sd-models.s3.amazonaws.com/display_images/clarity_upscale_input.png",
39    "prompt": "masterpiece, best quality, highres, <lora:more_details:0.5> <lora:SDXLrender_v2.0:1>",
40    "dynamic": 6,
41    "handfix": "disabled",
42    "sharpen": 0,
43    "sd_model": "juggernaut_reborn.safetensors [338b85bc4f]",
44    "scheduler": "DPM++ 3M SDE Karras",
45    "creativity": 0.35,
46    "downscaling": False,
47    "resemblance": 0.6,
48    "scale_factor": 1,
49    "tiling_width": 112,
50    "output_format": "png",
51    "tiling_height": 144,
52    "negative_prompt": "(worst quality, low quality, normal quality:2) JuggernautNegative-neg",
53    "num_inference_steps": 18,
54    "downscaling_resolution": 768,
55}
56job = client.submit_async("clarity-upscaler", **payload)
57print(job.request_id)                         # available immediately
58try:
59    result = job.wait(timeout=600, interval=1.0)
60except InferenceTimeout as e:
61    print("still running:", e.request_id)
62except InferenceFailed as e:
63    print("failed:", e.detail)

API Endpoint

POSThttps://api.segmind.com/v1/clarity-upscaler

Parameters

imagerequired
string (uri)

input image

creativityoptional
number

Creativity, try from 0.3 - 0.9

Default: 0.35Range: 0 - 1
custom_sd_modeloptional
string
Default: ""
downscalingoptional
boolean

Downscale the image before upscaling. Can improve quality and speed for images with high resolution but lower quality

Default: false
downscaling_resolutionoptional
integer

Downscaling resolution

Default: 768
dynamicoptional
number

HDR, try from 3 - 9

Default: 6Range: 1 - 50
handfixoptional
string

An enumeration.

Default: "disabled"
Allowed values :
"disabled""hands_only""image_and_hands"
lora_linksoptional
string

Link to a lora file you want to use in your upscaling. Multiple links possible, seperated by comma

Default: ""
maskoptional
string (uri)

Mask image to mark areas that should be preserved during upscaling

Default: null
negative_promptoptional
string

Negative Prompt

Default: "(worst quality, low quality, normal quality:2) JuggernautNegative-neg"
num_inference_stepsoptional
integer

Number of denoising steps

Default: 18Range: 1 - 100
output_formatoptional
string

An enumeration.

Default: "png"
Allowed values :
"webp""jpg""png"
promptoptional
string

Prompt

Default: "masterpiece, best quality, highres, <lora:more_details:0.5> <lora:SDXLrender_v2.0:1>"
resemblanceoptional
number

Resemblance, try from 0.3 - 1.6

Default: 0.6Range: 0 - 3
scale_factoroptional
number

Scale factor

Default: 1
scheduleroptional
string

An enumeration.

Default: "DPM++ 3M SDE Karras"
Allowed values (30 total):
"DPM++ 2M Karras""DPM++ SDE Karras""DPM++ 2M SDE Exponential""DPM++ 2M SDE Karras""Euler a""Euler""LMS""Heun""DPM2""DPM2 a"+20 more
sd_modeloptional
string

An enumeration.

Default: "juggernaut_reborn.safetensors [338b85bc4f]"
Allowed values :
"epicrealism_naturalSinRC1VAE.safetensors [84d76a0328]""juggernaut_reborn.safetensors [338b85bc4f]""flat2DAnimerge_v45Sharp.safetensors"
seedoptional
integer

Random seed. Leave blank to randomize the seed

Default: 1337
sharpenoptional
number

Sharpen the image after upscaling. The higher the value, the more sharpening is applied. 0 for no sharpening

Default: 0Range: 0 - 10
tiling_heightoptional
integer

An enumeration.

Default: 144
Allowed values (16 total):
163248648096112128144160+6 more
tiling_widthoptional
integer

An enumeration.

Default: 112
Allowed values (16 total):
163248648096112128144160+6 more

Response Type

Returns: Image

Asynchronous requests (v2)

Use Async for video, long-running (>~60s), or high-concurrency workloads; Sync is simplest for fast image & LLM calls. Async submits a request and you poll it to completion.

  1. 1
    POST /v2/clarity-upscaler

    Submitreturns request_id, status_url, response_url

  2. 2
    GET /v2/requests/{id}/status

    Polluntil COMPLETED or FAILED

  3. 3
    GET /v2/requests/{id}

    Resultfinal response body

Status states

QUEUEDAccepted, waiting for a worker
PROCESSINGRunning on a worker
COMPLETEDDone — result body is ready
FAILEDErrored (incl. content/RAI blocks)
  • A FAILED request is served as HTTP 422 — the body still carries the error detail.
  • An unknown or expired request_id returns HTTP 404.
  • Results are retained for 1 hour, then expire.
  • Content / RAI blocks surface as FAILED, not a separate state.
  • Track completion by polling the status endpoint.

Common Error Codes

The API returns standard HTTP status codes. Detailed error messages are provided in the response body.

400

Bad Request

Invalid parameters or request format

401

Unauthorized

Missing or invalid API key

403

Forbidden

Insufficient permissions

404

Not Found

Model or endpoint not found

406

Insufficient Credits

Not enough credits to process request

429

Rate Limited

Too many requests

500

Server Error

Internal server error

502

Bad Gateway

Service temporarily unavailable

504

Timeout

Request timed out