Upscale image
POST
https://api.imagemcpserver.com/playground/upscale💳 15 credits🛠️ MCP tool: upscale_image⌘ imagemcp.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
| Field | Type | Description |
|---|---|---|
Authorizationrequired | string | Bearer <IMAGEMCP_API_KEY>. The header x-api-key: <key> is accepted as an alternative. |
Content-Typerequired | string | application/json |
Body parameters
| Field | Type | Description |
|---|---|---|
imagerequired | string | Input image as an https URL or a base64 data URI. imageBase64 is accepted as an alias for the same value. |
scaleFactor | string | Enlargement 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"
}'imagemcp.js upscale --image ./photo.jpg --scale 4x --out ./photo-4k.pngconst res = await fetch("https://api.imagemcpserver.com/playground/upscale", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.IMAGEMCP_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"image": "https://example.com/photo.jpg",
"scaleFactor": "4x"
}),
});
const data = await res.json();
console.log(data.result.imageUrl);import os
import requests
res = requests.post(
"https://api.imagemcpserver.com/playground/upscale",
headers={"Authorization": f"Bearer {os.environ['IMAGEMCP_API_KEY']}"},
json={
"image": "https://example.com/photo.jpg",
"scaleFactor": "4x"
},
timeout=120,
)
print(res.json()){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "upscale_image",
"arguments": {
"image": "https://example.com/photo.jpg",
"scale": "4x"
}
}
}Response
Response fields
| Field | Type | Description |
|---|---|---|
result.imageUrl | string | Public URL of the upscaled image. |
result.scaleFactor | string | Scale factor that was applied. |
deductedCredits | number | Always 15. |
userCredits | number | Balance remaining after the call. |
{
"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.