Photo Enhancer AI
1 tokenToolsUpscale and enhance image quality (2x/4x/8x)
Overview
Photo Enhancer AI upscales images to higher resolution while enhancing detail and clarity. Choose from 2x, 4x, or 8x upscale factors. The AI adds realistic detail to low-resolution photos, sharpens edges, and improves overall image quality. Great for enlarging thumbnails, improving old photos, or preparing images for print.
Image input
Endpoint
POST /api/v1/generatebash
curl -X POST https://roomai.com/api/v1/generate \
-H "Authorization: Bearer rai_live_your_api_key" \
-H "Content-Type: application/json" \
-d '{"model": "enhance", ...}'Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
model | string | Required | Must be "enhance". enhance |
image | string | Required | URL of the image to upscale. |
hd | string | Optional | Upscale factor. Default: 248 |
format | string | Optional | Output format. Default: png |
Request Example
json
{
"model": "enhance",
"image": "https://example.com/low-res-photo.jpg",
"hd": "4"
}Response
Success (200)
json
{
"status": "success",
"result": {
"image_url": "https://storage.googleapis.com/...",
"model": "enhance",
"tokens_used": 1,
"processing_time_ms": 4500
}
}Error
json
{
"status": "error",
"error": {
"code": "INSUFFICIENT_TOKENS",
"message": "Not enough tokens",
"required": 1,
"balance": 0
}
}Code Examples
cURL
bash
curl -X POST https://roomai.com/api/v1/generate \
-H "Authorization: Bearer rai_live_your_api_key" \
-H "Content-Type: application/json" \
-d '{
"model": "enhance",
"image": "https://example.com/low-res-photo.jpg",
"hd": "4"
}'JavaScript / Node.js
javascript
const response = await fetch("https://roomai.com/api/v1/generate", {
method: "POST",
headers: {
"Authorization": "Bearer rai_live_your_api_key",
"Content-Type": "application/json",
},
body: JSON.stringify({
"model": "enhance",
"image": "https://example.com/low-res-photo.jpg",
"hd": "4"
}),
});
const data = await response.json();
if (data.status === "success") {
console.log("Image URL:", data.result.image_url);
console.log("Tokens used:", data.result.tokens_used);
} else {
console.error("Error:", data.error.message);
}Python
python
import requests
response = requests.post(
"https://roomai.com/api/v1/generate",
headers={
"Authorization": "Bearer rai_live_your_api_key",
"Content-Type": "application/json",
},
json={
"model": "enhance",
"image": "https://example.com/low-res-photo.jpg",
"hd": "4"
},
)
data = response.json()
if data["status"] == "success":
print("Image URL:", data["result"]["image_url"])
print("Tokens used:", data["result"]["tokens_used"])
else:
print("Error:", data["error"]["message"])Tips
- 1Start with 2x upscale for the fastest results. Use 4x or 8x when you need high-resolution output for printing or large displays.
- 28x upscale takes longer to process but produces the highest quality enlargement.
- 3Works on any image type — not just interior/exterior photos.