Bearer authentication format, for example: Bearer {{API Key}}.
object
extra
object
extra
object
Optional extra parameters for the request.
response_image_type
string
response_image_type
string
The returned image type. Default is png.
webhook
object
webhook
object
Webhook settings. More details can be found at
url
string
*
url
Required
string
The URL of the webhook endpoint. Novita AI will send the task generated outputs to your specified webhook endpoint.
test_mode
object
test_mode
object
By specifying Test Mode, a mock event will be sent to the webhook endpoint.
enabled
boolean
*
enabled
Required
boolean
Set to true to enable Test Mode, or false to disable it. The default is false.
return_task_status
string
*
return_task_status
Required
string
Control the data content of the mock event. When set to TASK_STATUS_SUCCEED, you’ll receive a normal response; when set to TASK_STATUS_FAILED, you’ll receive an error response.
custom_storage
object
custom_storage
object
Customer storage settings for saving the generated outputs.
aws_s3
object
aws_s3
object
AWS S3 Bucket settings.
region
string
*
region
Required
string
AWS S3 regions,
bucket
string
*
bucket
Required
string
AWS S3 bucket name.
path
string
*
path
Required
string
AWS S3 bucket path for saving generated outputs.
save_to_path_directly
boolean
save_to_path_directly
boolean
Set this option to True to save the generated outputs directly to the specified path without creating any additional directory hierarchy.
enterprise_plan
object
enterprise_plan
object
Dedicated Endpoints settings, which only take effect for users who have already subscribed to the
enabled
boolean
enabled
boolean
Set to true to schedule this task to use your Dedicated Endpoints’s dedicated resources. Default is false.
enable_nsfw_detection
boolean
enable_nsfw_detection
boolean
When set to true, NSFW detection will be enabled, incurring an additional cost of $0.0015 for each generated image.
nsfw_detection_level
integer
nsfw_detection_level
integer
0: Explicit Nudity, Explicit Sexual Activity, Sex Toys; Hate Symbols.
request
object
*
request
Required
object
model_name
string
*
model_name
Required
string
AI upscalers are models trained on massive amounts of data.
image_base64
string
*
image_base64
Required
string
The base64 of original image, with a maximum resolution of 2048x2048 and a maximum file size of 30 Mb.
scale_factor
number
*
scale_factor
Required
number
The scale_factor indicates the multiplier by which the original size will be upscaled. Valid range: (1, 4].
An indispensable tool for improving the quality of images generated by Stable Diffusion.
This is an asynchronous API; only the task_id will be returned. You should use the task_id to request the Task Result API to retrieve the image generation results.
Control the data content of the mock event. When set to TASK_STATUS_SUCCEED, you’ll receive a normal response; when set to TASK_STATUS_FAILED, you’ll receive an error response.
Enum: TASK_STATUS_SUCCEED, TASK_STATUS_FAILED
Customer storage settings for saving the generated outputs. By default, the generated outputs will be saved to Novita AI Storage temporarily and privately.
Set this option to True to save the generated outputs directly to the specified path without creating any additional directory hierarchy. If set to False, Novita AI will create an additional directory in the path to save the generated outputs. The default is False.
0: Explicit Nudity, Explicit Sexual Activity, Sex Toys; Hate Symbols. 1: Explicit Nudity, Explicit Sexual Activity, Sex Toys; Hate Symbols; Non-Explicit Nudity, Obstructed Intimate Parts, Kissing on the Lips. 2: Explicit Nudity, Explicit Sexual Activity, Sex Toys; Hate Symbols; Non-Explicit Nudity, Obstructed Intimate Parts, Kissing on the Lips; Female Swimwear or Underwear, Male Swimwear or Underwear.
Enum: 0, 1, 2
curl--location--request POST 'https://api.novita.ai/v3/async/upscale'\--header'Authorization: Bearer {{API Key}}'\--header'Content-Type: application/json'\--data-raw '{"extra":{"response_image_type":"jpeg"},"request":{"model_name":"RealESRGAN_x4plus_anime_6B","scale_factor":2,"image_base64":"{{base64 encoded image}}"}}'
HTTP status codes in the 2xx range indicate that the request has been successfully accepted; code 400 indicates a request parameter error, while status codes in the 5xx range indicate internal server errors.
HTTP status codes in the 2xx range indicate that the request has been successfully accepted, while status codes in the 5xx range indicate internal server errors.
You can find the image URLs in the imgs field of the response.