Upscale
POST/v1/upscale
Increases the resolution of an image by 2x or 4x. Images may be upscaled to a maximum resolution of 6000x6000px. Upscaled images are returned in JPEG format unless the input image contained alpha channels, in which case the output will be PNG format.
Input Image Limits:
- Max size: 25MB
- Min resolution: 64x64px
- Max resolution (2x): 3000x3000px
- Max resolution (4x): 1500x1500px
Request
Header Parameters
Acceptable response media type(s). application/json
, image/*
. Default is application/json
.
- application/json
- multipart/form-data
Body
URL of the image to be processed.
Possible values: [2
, 4
]
The scale factor.
Body
URL of the image to be processed.
Binary file of the image to be processed, this is mutually exclusive with image_url, if both are provided the image will be used.
Possible values: [2
, 4
]
The scale factor.
Responses
- 200
- 400
- 401
- 403
- 429
- 500
Success
- application/json
- image/*
- Schema
- Example (from schema)
Schema
A URL to access the resultant image which is valid for 1 hour. File format will be the same as the input format.
{
"result_url": "https://assets.pixelcut.app/public/result/a16646be-91c8-4e3a-b359.jpg"
}
- Schema
Schema
Resultant image in binary format. The file format will be the same as the input format.
The input could not be processed, often returned when the input image exceeds API limits.
- application/json
- Schema
- Example (from schema)
Schema
invalid_request_body
: The request body was empty or invalid.missing_parameter
: A required parameter was not provided.invalid_parameter
: A parameter was provided but it was invalid.unsupported_content_type
: The content type of the request was not application/json or multipart/form-data.malformed_image
: The image could not be decoded.unsupported_image_format
: The image format is not supported.file_size_too_large
: The image file size is too large.resolution_too_high
: The image resolution is too high.unknown_foreground
: The foreground subject of the image could not be detected.
A description of the error.
Possible values: [invalid_request_body
, missing_parameter
, invalid_parameter
, unsupported_content_type
, malformed_image
, unsupported_image_format
, file_size_too_large
, resolution_too_high
, unknown_foreground
]
The error codes provide a way to programmatically handle errors.
The following error codes are currently in use:
{
"error": "File size too large",
"error_code": "file_size_too_large"
}
The authentication token is missing or invalid.
- application/json
- Schema
- Example (from schema)
Schema
Possible values: [invalid_auth_token
]
{
"error": "API Token not found",
"error_code": "invalid_auth_token"
}
Returned when you have insufficient credits to perform the requested action.
- application/json
- Schema
- Example (from schema)
Schema
Possible values: [insufficient_api_credits
]
{
"error": "Insufficient credits available",
"error_code": "insufficient_api_credits"
}
Rate limit exceeded
- application/json
- Schema
- Example (from schema)
Schema
Possible values: [rate_limit_exceeded
]
{
"error": "Too many requests",
"error_code": "rate_limit_exceeded"
}
Internal service error