Clarity AI Pro Upscaler API Documentation
Playground
Try it on WaveSpeedAI!Clarity Pro Upscaler is a photorealistic image upscaler from Clarity AI with identity preservation, creative detail control, and up to 16x scaling. Ready-to-use REST inference API, best performance, no coldstarts, affordable pricing.
Features
Clarity AI Pro Upscaler upscales images with Clarity AI while exposing a simple target_megapixels control for predictable output sizing. Scaling settings are selected automatically so the final image lands close to the requested megapixel target.
Why Choose This?
-
Predictable output sizing Set the desired output directly with
target_megapixelsfor easier delivery planning and cost control. -
Simple enhancement workflow Upload an image, choose the target megapixels, optionally adjust creativity, and generate the result.
-
Flexible restoration strength Use
creativityto balance stricter source preservation against stronger generated detail. -
Reliable output delivery Generated images are delivered via the WaveSpeed CDN for fast preview and download.
-
Modern Clarity AI pipeline Powered by the latest Clarity AI upscaling technology.
Parameters
| Parameter | Required | Description |
|---|---|---|
image | Yes | Input image URL or uploaded image. |
target_megapixels | No | Requested output size in megapixels. Use 4 MP for quick tests, 8–16 MP for high-quality web or print assets, and larger values for large-format delivery. |
creativity | No | Negative values stay closer to the source, while positive values add more generated detail. |
How to Use
- Upload your image — paste a URL or upload the source image.
- Choose target megapixels — select the output size that matches your delivery needs.
- Adjust creativity (optional) — lower values keep the result stricter to the source, while higher values add more generated detail.
- Submit — run the model and download the upscaled image.
Quick Sizing Guide
- 4 MP — fast testing and lightweight output
- 8–16 MP — high-quality web, e-commerce, and standard print assets
- 25 MP+ — large-format delivery and premium output needs
Pricing
Pricing is based on the requested target_megapixels.
- Rate: $0.03 per target megapixel
Example Costs
| Target Megapixels | Cost |
|---|---|
| 4 MP | $0.12 |
| 8 MP | $0.24 |
| 16 MP | $0.48 |
| 64 MP | $1.92 |
Billing Rules
- Pricing scales linearly with
target_megapixels - Each additional megapixel adds $0.03
creativitydoes not affect pricing
Best Use Cases
- Photo enhancement — improve resolution while preserving structure and natural detail
- E-commerce assets — prepare sharper product images for listings, ads, and catalogs
- Creative delivery — generate larger outputs for campaigns, presentations, and design workflows
- Print preparation — produce higher-resolution assets for brochures, posters, and other print use
- AI image cleanup — refine generated images into cleaner, more usable high-resolution outputs
Pro Tips
- Start with a smaller megapixel target first, then increase only when you need a larger final output.
- Keep
creativitylower when identity, structure, or product accuracy matters most. - Increase
creativitygradually if you want stronger generated texture or sharper enhancement. - Use the cleanest source image available for better detail recovery.
Notes
- The input may be resized before upscaling so the output stays close to the requested
target_megapixels. - Clean, high-quality inputs generally produce the best results.
- Output size is controlled by the requested megapixel target rather than a fixed resolution tier.
Authentication
For authentication details, please refer to the Authentication Guide.
API Endpoints
Submit Task & Query Result
set -euo pipefail
export WAVESPEED_API_KEY="your-api-key"
REQUEST_BODY=$(cat <<'JSON'
{
"image": "https://interactive-examples.mdn.mozilla.net/media/cc0-images/painted-hand-298-332.jpg",
"target_megapixels": 4,
"creativity": 0
}
JSON
)
# 1. Submit the prediction.
SUBMIT_RESPONSE=$(curl --silent --show-error --fail-with-body \
-X POST "https://api.wavespeed.ai/api/v3/clarity-ai/pro-upscaler" \
-H "Authorization: Bearer ${WAVESPEED_API_KEY}" \
-H "Content-Type: application/json" \
-d "${REQUEST_BODY}")
TASK=$(printf '%s' "${SUBMIT_RESPONSE}" | jq 'if type == "object" and has("data") then .data else . end')
PREDICTION_ID=$(printf '%s' "${TASK}" | jq -r '.id // empty')
if [ -z "${PREDICTION_ID}" ]; then
printf 'Submission response did not contain a prediction id
' >&2
exit 1
fi
RESULT_URL="https://api.wavespeed.ai/api/v3/predictions/${PREDICTION_ID}/result"
# 2. Poll until the prediction finishes.
while true; do
RESPONSE=$(curl --silent --show-error --fail-with-body \
"${RESULT_URL}" \
-H "Authorization: Bearer ${WAVESPEED_API_KEY}")
RESULT=$(printf '%s' "${RESPONSE}" | jq 'if type == "object" and has("data") then .data else . end')
STATUS=$(printf '%s' "${RESULT}" | jq -r '.status // empty')
case "${STATUS}" in
completed) printf '%s\n' "${RESULT}" | jq '.outputs'; break ;;
failed|cancelled|timeout|deleted) printf '%s\n' "${RESULT}" | jq . >&2; exit 1 ;;
*) sleep 2 ;;
esac
doneParameters
Task Submission Parameters
Request Parameters
| Parameter | Type | Required | Default | Range | Description |
|---|---|---|---|---|---|
| image | string | Yes | - | Input image to upscale. | |
| target_megapixels | number | No | 4 | 1 ~ 64 | Requested output size in megapixels. Range: 1-64 MP. |
| creativity | number | No | 0 | -10 ~ 10 | Negative values stay stricter to the source; positive values add more generated detail. |
Response Parameters
| Parameter | Type | Description |
|---|---|---|
| code | integer | HTTP status code (e.g., 200 for success) |
| message | string | Status message (e.g., “success”) |
| data.id | string | Unique identifier for the prediction, Task Id |
| data.model | string | Model ID used for the prediction |
| data.outputs | array | Output values, usually URL strings; some models return text strings or structured result objects (empty when status is not completed) |
| data.urls | object | Object containing related API endpoints |
| data.status | string | Task status. completed is successful; failed, cancelled, timeout, and deleted are failure terminal statuses. |
| data.created_at | string | ISO timestamp of when the request was created (e.g., “2023-04-01T12:34:56.789Z”) |
| data.error | string | Error message (empty if no error occurred) |
| data.timings | object | Object containing timing details |
| data.timings.inference | integer | Inference time in milliseconds |
Result Request Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| id | string | Yes | - | Task ID |
Result Response Parameters
| Parameter | Type | Description |
|---|---|---|
| code | integer | HTTP status code (e.g., 200 for success) |
| message | string | Status message (e.g., “success”) |
| data | object | The prediction data object containing all details |
| data.id | string | Unique identifier for the prediction |
| data.model | string | Model ID used for the prediction |
| data.outputs | array<string | object> | Array of generated outputs (empty when status is not completed). Items are usually URL strings, but may be text strings or structured result objects, depending on the model. |
| data.urls | object | Object containing related API endpoints |
| data.status | string | Status: completed is successful; failed, cancelled, timeout, and deleted are failure terminal statuses |
| data.created_at | string | ISO timestamp of when the request was created |
| data.error | string | Error message (empty if no error occurred) |
| data.timings | object | Object containing timing details |
| data.timings.inference | integer | Inference time in milliseconds |