ClarityAI Creative Upscaler Serverless API

Creative image upscaling with fine detail enhancement.

~139.80s
POST /v2/clarityai-creative-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    "clarityai-creative-upscaler",
 9    image="https://segmind-resources.s3.amazonaws.com/input/be12721d-9990-4202-bbca-198812452fdf-3_before.png",
10    scale_factor=4,
11    creativity=4,
12    resemblance=3,
13    dynamic=4,
14    fractality=1,
15    style="portrait",
16    prompt="masterpiece, best quality, highres.",
17)
18print(result["status"])                      # COMPLETED
19print(result.get("output"))                  # model output (e.g. media URL)
20print(result["metrics"]["inference_time"])   # server compute seconds
21
22# --- Or submit + poll manually (track request_id, control the cadence) ---
23from segmind import SegmindClient, InferenceFailed, InferenceTimeout
24
25client = SegmindClient()                      # reads SEGMIND_API_KEY
26payload = {
27    "image": "https://segmind-resources.s3.amazonaws.com/input/be12721d-9990-4202-bbca-198812452fdf-3_before.png",
28    "scale_factor": 4,
29    "creativity": 4,
30    "resemblance": 3,
31    "dynamic": 4,
32    "fractality": 1,
33    "style": "portrait",
34    "prompt": "masterpiece, best quality, highres.",
35}
36job = client.submit_async("clarityai-creative-upscaler", **payload)
37print(job.request_id)                         # available immediately
38try:
39    result = job.wait(timeout=600, interval=1.0)
40except InferenceTimeout as e:
41    print("still running:", e.request_id)
42except InferenceFailed as e:
43    print("failed:", e.detail)

API Endpoint

POSThttps://api.segmind.com/v1/clarityai-creative-upscaler

Parameters

creativityoptional
integer

Adjusts the creativity effect; higher values for unique transformations, 2 for balance.

Default: 2Range: -10 - 10
dynamicoptional
integer

Modifies dynamic range; 0 retains original, higher for more contrast.

Default: 0Range: -10 - 10
fractalityoptional
integer

Adds fractal texture; 1 for subtlety, 5 for pronounced detail.

Default: 1Range: -10 - 10
imageoptional
string (uri)

Provides a reference image for styling. Use unique images for specific effects.

promptoptional
string

Guides the upscaling process with text; use 'vibrant color' for vivid results.

Default: "Maximize detail with vibrant color enhancement."
resemblanceoptional
integer

Controls how much the result resembles the original; use 3 for moderate similarity.

Default: 3Range: -10 - 10
scale_factoroptional
integer

Determines upscaling quality. Use 4x for high detail, and 8x for larger projects.

Default: 4Range: 2 - 16
styleoptional
string

Selects final image style; 'portrait' for faces, 'anime' for stylized art.

Default: "portrait"
Allowed values :
"default""portrait""anime"

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/clarityai-creative-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