🚀 Fantastic news! Now you can get twice credits for the same price! Limited time offer during October!

Documentation

Login to create your API key

Updates

21.09.2024: Added link to OpenAPI specification
21.09.2024: Added information about the new automatic mask generation feature
16.09.2024: Added link to pricing page
11.05.2024: Added curl usage example.
10.05.2024: Updated API documentation to be in sync with the current version of the API.

Authorization

To authorize your requests, you need to pass your API key in the header of your request.

Authorization: Bearer <your_api_key>

Undress API

Create Undress

Accepts the source image, the image mask and one of the styles (standard, premium, BDSM, nurse, etc.)

Source image should be base64 encoded image in jpeg format, mask should be base64 encoded image in png format. Mask should contain 2 colors: white for regions which should be undressed and black for rest of the image.

Available styles: standard, premium, nurse, bdsm, underwear_white, underwear_black, underwear_pink

Example request:

curl -X POST https://nodress.io/api/v1/undress \
  -H "Authorization: Bearer <your_api_key>" \
  -H "Content-Type: application/json" \
  -d '{"source_image": "<base64_encoded_image>", "mask": "<base64_encoded_mask>", "style": "standard"}'

Example request with automatic mask generation:

curl -X POST https://nodress.io/api/v1/undress \
  -H "Authorization: Bearer <your_api_key>" \
  -H "Content-Type: application/json" \
  -d '{"source_image": "<base64_encoded_image>", "automask": true, "style": "standard"}'

The API returns a JSON object with the identifier of the job or error message. Example responses:

HTTP status code: 201

{"id": "69d280ab-42c5-4f49-9881-51076afb1747"}

HTTP status code: 400

{"error": "no_credits"}

HTTP status code: 400

{"error": "invalid_params", "errors": ["Image is invalid"]}

Get Undress Result

Accepts the identifier of the job and returns the generated image and the generated mask or the generation status.

Example request:

curl https://nodress.io/api/v1/undress/<identifier> \
  -H "Authorization: Bearer <your_api_key>" \
  -H "Content-Type: application/json"

The API returns a JSON object with the generated image or the generation status. Example responses:

HTTP status code: 200

{"status": "completed", "image": "<result image url>"}

HTTP status code: 200

{"status": "pending"}

HTTP status code: 200

{"status": "failed"}

HTTP status code: 404

{"error": "NOT_FOUND"}

curl usage example

Example of interaction with the API using curl:

SOURCE_IMAGE=$(cat img.jpeg | base64)
MASK=$(cat mask.png | base64)
curl -X POST https://nodress.io/api/v1/undress \
  -H "Authorization: Bearer <your_api_key>" \
  -H "Content-Type: application/json" \
  -d '{"source_image": "'$SOURCE_IMAGE'", "mask":"'$MASK'", "style": "standard"}'

To check status and fetch final image

curl https://nodress.io/api/v1/undress/<id_from_response> \
  -H "Authorization: Bearer <your_api_key>" \
  -H "Content-Type: application/json"
# {"status":"pending"}
# {"status":"completed", "image": "<result image url>"}

Need a face swap API for photos or videos?

Drop us a line at [email protected] to get started.