API reference · Editing

Upscale image

POSThttps://api.imagemcpserver.com/playground/upscale
💳 15 credits🛠️ MCP tool: upscale_imageimagemcp.js upscale

Runs a crisp upscaler over the input image and returns the enlarged result. Use it as the last step before print or a hero placement, after generation and editing are settled — upscaling first and editing later throws the extra detail away.

Overview

Increase an image's resolution while sharpening detail.

Flat 15 credits per call at any scale factor.

Request

Headers

FieldTypeDescription
AuthorizationrequiredstringBearer <IMAGEMCP_API_KEY>. The header x-api-key: <key> is accepted as an alternative.
Content-Typerequiredstringapplication/json

Body parameters

FieldTypeDescription
imagerequiredstringInput image as an https URL or a base64 data URI. imageBase64 is accepted as an alias for the same value.
scaleFactorstringEnlargement factor, defaults to "4x". Echoed back as result.scaleFactor. The MCP tool names this argument scale and maps it across for you.
responseFormat"url" | "b64_json"Defaults to "url". Pass "b64_json" to also receive result.b64_json and result.imageBase64 alongside the hosted URL.

Examples

The same call in five forms. The MCP tab is what an MCP client sends under the hood; the CLI tab is what an agent with the agent skill runs.

upscale_image
curl -X POST "https://api.imagemcpserver.com/playground/upscale" \
  -H "Authorization: Bearer $IMAGEMCP_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "image": "https://example.com/photo.jpg",
  "scaleFactor": "4x"
}'

Response

Response fields

FieldTypeDescription
result.imageUrlstringPublic URL of the upscaled image.
result.scaleFactorstringScale factor that was applied.
deductedCreditsnumberAlways 15.
userCreditsnumberBalance remaining after the call.
200 OK
{
  "success": true,
  "message": "Image upscaled successfully via Fal.ai Crisp Upscaler",
  "deductedCredits": 15,
  "userCredits": 2424,
  "result": {
    "imageUrl": "https://cdn.imagemcpserver.com/upscale/upscale_5142312.png",
    "scaleFactor": "4x",
    "action": "upscale",
    "hasInputImage": true,
    "model": "fal-ai/recraft/upscale/crisp",
    "seed": 118427,
    "latency": "6.12s",
    "cost": "$0.0250",
    "deductedCredits": 15,
    "userCredits": 2424
  }
}

When it fails

Errors return success: false with a message. See errors & troubleshooting for the status codes and whether a retry is worth it.

FAQ

Does a larger scale factor cost more?

No. Upscaling is a flat 15 credits per call whatever scale factor you request.

Should I upscale before or after editing?

After. Editing a small image and upscaling last preserves the detail the upscaler adds; doing it the other way round discards it.