Basic
Model APIs
- Introduction
- LLM API
- Image, Audio and Video
GPUs
- GPU Instance
- Serverless GPUs
ADetailer
curl --request POST \
--url https://api.novita.ai/v3/async/adetailer \
--header 'Authorization: <authorization>' \
--header 'Content-Type: <content-type>' \
--data '{
"extra": {
"response_image_type": "<string>",
"webhook": {
"url": "<string>",
"test_mode": {
"enabled": true,
"return_task_status": "<string>"
}
},
"custom_storage": {
"aws_s3": {
"region": "<string>",
"bucket": "<string>",
"path": "<string>",
"save_to_path_directly": true
}
},
"enterprise_plan": {
"enabled": true
},
"enable_nsfw_detection": true,
"nsfw_detection_level": 123
},
"request": {
"model_name": "<string>",
"prompt": "<string>",
"steps": 123,
"guidance_scale": {},
"sampler_name": "<string>",
"image_assets_ids": [
"<string>"
],
"image_urls": [
"<string>"
],
"negative_prompt": "<string>",
"seed": 123,
"sd_vae": "<string>",
"loras": [
{
"model_name": "<string>",
"strength": {}
}
],
"embeddings": [
{
"model_name": "<string>"
}
],
"clip_skip": 123,
"strength": {}
}
}'
{
"task_id": "<string>"
}
ADetailer features auto-detection, masking, and inpainting using a detection model.
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.
Request Headers
Enum: application/json
Bearer authentication format, for example: Bearer {{API Key}}.
Request Body
Optional extra parameters for the request.
Show properties
Show properties
The returned image type. Default is png.
Enum: png
, webp
, jpeg
Webhook settings. More details can be found at Webhook Documentation.
Show properties
Show properties
The URL of the webhook endpoint. Novita AI will send the task generated outputs to your specified webhook endpoint.
By specifying Test Mode, a mock event will be sent to the webhook endpoint.
Show properties
Show properties
Set to true to enable Test Mode, or false to disable it. The default is false.
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.
Show properties
Show properties
AWS S3 Bucket settings.
Show properties
Show properties
AWS S3 regions, more details.
AWS S3 bucket name.
AWS S3 bucket path for saving generated outputs.
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.
Dedicated Endpoints settings, which only take effect for users who have already subscribed to the Dedicated Endpoints Documentation.
Show properties
Show properties
Set to true to schedule this task to use your Dedicated Endpoints’s dedicated resources. Default is false.
When set to true, NSFW detection will be enabled, incurring an additional cost of $0.0015 for each generated image.
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
Hide properties
Hide properties
This parameter specifies the name of the model checkpoint. Retrieve the corresponding sd_name value by invoking the Query Model API with filter.types=checkpoint as the query parameter.
Text input required to guide the image generation, divided by ,
. Range [1, 1024].
The number of denoising steps. More steps usually can produce higher quality images, but take more time to generate, Range [1, 100].
This setting says how close the Stable Diffusion will listen to your prompt, higer guidance forces the model to better follow the prompt, but result in lower quality output. Range [1, 30].
This parameter determines the denoising algorithm employed during the sampling phase of Stable Diffusion. Each option represents a distinct method by which the model incrementally generates new images. These algorithms differ significantly in their processing speed, output quality, and the specific characteristics of the images they generate, allowing users to tailor the image generation process to meet precise requirements. Get reference at A brief introduction to Sampler.
Enum: Euler a
, Euler
, LMS
, Heun
, DPM2
, DPM2 a
, DPM++ 2S a
, DPM++ 2M
, DPM++ SDE
, DPM fast
, DPM adaptive
, LMS Karras
, DPM2 Karras
, DPM2 a Karras
, DPM++ 2S a Karras
, DPM++ 2M Karras
, DPM++ SDE Karras
, DDIM
, PLMS
, UniPC
Either image_assets_ids or image_urls should be provided. Obtain image_assets_ids with guidance from Get image assets id.
Either image_assets_ids or image_urls should be provided. image_urls are the URLs for input images and must begin with https://faas-output-image.s3.ap-southeast-1.amazonaws.com.
Text input that specifies what to exclude from the generated images, divided by ,
. Range [1, 1024].
A seed is a number from which Stable Diffusion generates noise, which, makes generation deterministic. Using the same seed and set of parameters will produce identical image each time, minimum -1. Defaults to -1.
VAE (Variational Auto Encoder). sd_vae can be accessed in the endpoint Get Model API with query params type=vae, such as sd_name: customVAE.safetensors. For reference, see What are Variational Autoencoders (VAE)?.
LoRA is a fast and lightweight training method that inserts and trains a significantly smaller number of parameters instead of all the model parameters. Currently supports up to 5 LoRAs.
Show properties
Show properties
Name of lora, retrieve the corresponding sd_name_in_api value by invoking the Get Model API endpoint with filter.types=lora as the query parameter.
The strength value of lora. The larger the value, the more biased the effect is towards lora, Range [0, 1]
Textual Inversion is a training method for personalizing models by learning new text embeddings from a few example images, currently supports up to 5 embeddings.
Show properties
Show properties
Name of textual Inversion model, you can call the Get Model API endpoint with parameter filter.types=textualinversion to retrieve the sd_name_in_api field as the model_name.
This parameter indicates the number of layers to stop from the bottom during optimization, so clip_skip on 2 would mean, that in SD1.x model where the CLIP has 12 layers, you would stop at 10th layer, Range [1, 12], get reference at A brief introduction to Clip Skip.
Range [0, 1]; default is 0.8. Conceptually, the strength
indicates the degree to which the reference image_base64
should be transformed. It must be between 0 and 1. input_images
will be used as a starting point, with increasing levels of noise added as the strength value increases. The number of denoising steps depends on the amount of noise initially added. When strength
is 1, added noise will be at its maximum, and the denoising process will run for the full number of iterations specified in steps
. A value of 1, therefore, essentially ignores input_images
.
Response
Use the task_id to request the Task Result API to retrieve the generated outputs.
Was this page helpful?
curl --request POST \
--url https://api.novita.ai/v3/async/adetailer \
--header 'Authorization: <authorization>' \
--header 'Content-Type: <content-type>' \
--data '{
"extra": {
"response_image_type": "<string>",
"webhook": {
"url": "<string>",
"test_mode": {
"enabled": true,
"return_task_status": "<string>"
}
},
"custom_storage": {
"aws_s3": {
"region": "<string>",
"bucket": "<string>",
"path": "<string>",
"save_to_path_directly": true
}
},
"enterprise_plan": {
"enabled": true
},
"enable_nsfw_detection": true,
"nsfw_detection_level": 123
},
"request": {
"model_name": "<string>",
"prompt": "<string>",
"steps": 123,
"guidance_scale": {},
"sampler_name": "<string>",
"image_assets_ids": [
"<string>"
],
"image_urls": [
"<string>"
],
"negative_prompt": "<string>",
"seed": 123,
"sd_vae": "<string>",
"loras": [
{
"model_name": "<string>",
"strength": {}
}
],
"embeddings": [
{
"model_name": "<string>"
}
],
"clip_skip": 123,
"strength": {}
}
}'
{
"task_id": "<string>"
}