Quality Enhancer (Upscale)
The Quality Enhancer endpoint allows you to intelligently upscale and enhance the resolution and finer details of images, supporting up to 4K resolution.
Model Name: upscale
Lifecycle: stable
Processing Time: ~8s–20s
Output Format: Auto (JPEG or PNG)
Delivery Methods: URL
Credits: 3 to 4 per image (2k: 3, 4k: 4)
Request
Submit your image and target resolution to the universal /v1/run endpoint:
https://fititon.app/api/v1/runRequest Examples
curl -X POST https://fititon.app/api/v1/run \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_KEY" \
-d '{
"model_name": "upscale",
"inputs": {
"imageUrl": "https://example.com/1k-image.jpg",
"targetQuality": "2k"
}
}'Response
Because upscaling can take up to 20 seconds, the /v1/run endpoint returns a 201 Created status immediately with an asynchronous job id. You must poll the Status API using this id to retrieve the final image. Alternatively, you can configure webhooks to receive notifications automatically. Please note that our webhook dispatcher enforces a strict 15-second timeout. Your server must acknowledge the webhook with a 2xx status code within 15 seconds, or we will consider it failed and retry it later.
{
"id": "123a87r9-4129-4bb3-be18-9c9fb5bd7fc1",
"status": "starting",
"created_at": "2024-03-10T12:00:00Z",
"model_name": "upscale"
}When the job completes (status: "success"), the output field will contain the array of resulting URLs:
{
"id": "123a87r9-4129-4bb3-be18-9c9fb5bd7fc1",
"status": "success",
"output": [
"https://cdn.fititon.app/users/123/results/upscale-123.jpg"
],
"error": null,
"created_at": "2024-03-10T12:00:00Z",
"updated_at": "2024-03-10T12:00:20Z"
}Request Parameters
Required Parameters
imageUrlRequiredstringThe source image you wish to upscale. Can be a publicly accessible URL or a Base64-encoded image string.
Formatting & Payload Requirement
When submitting a Base64 string, it must include the standard data URI prefix (e.g., data:image/jpeg;base64,...). Additionally, we strongly recommend using standard HTTP URLs for images larger than 3MB to avoid hitting global JSON payload size limits (HTTP 413).
targetQualityRequired'2k' | '4k'The desired output resolution tier.
Note: Images larger than 4.25 megapixels cannot use targetQuality="2k" and must target 4k.
Runtime Errors
Runtime errors for this feature use the shared set documented in Error Handling. If an error occurs during processing, the status will update to "error" and the error field will contain the specific failure reason.
Credit Cost
For Developer API requests, the cost scales depending on the targetQuality.
Formula: Cost = QualityCredits
| Parameter | Credits per Image |
|---|---|
targetQuality="2k" | 3 |
targetQuality="4k" | 4 |
