Home API AI Outfit API

AI Clothes Changer API

An API to change clothes virtually is here! LightX AI Clothes Changer API is a virtual clothing try-on API that swaps clothes in photos. It analyzes your picture and generates the clothes based on the description you provide. It creates a realistic look so you can see how the new outfit would actually appear on you.

Virtual outfit changer transforms a girl's look into office attire, glam style, and a floral dress.

Swap Clothes and Try On Virtual Outfits for Every Occasion

Swap into a breezy sundress or a stylish jumpsuit for your next getaway.

Easy Integration with Popular Frameworks
Easily integrate our API with CSS, React, Tailwind, JS, and Python for versatile and powerful applications.
import requests

url = 'https://api.lightxeditor.com/external/api/v1/outfit'
headers = {
'Content-Type': 'application/json',
'x-api-key': '<Insert your API Key>'  # Replace with your actual API key
}

data = {
"imageUrl": "https://example.com/your-image.jpg",  # Replace with the URL of your input image
"textPrompt": "YourInputPrompt"  # Replace with your specific input prompt
}

response = requests.post(url, headers=headers, json=data)

# Check if the request was successful
if response.status_code == 200:
print("Request was successful!")
print(response.json())
else:
print(f"Request failed with status code: {response.status_code}")
print(response.text)
const fetch = require('node-fetch');  // Only needed if you are using Node.js

const url = 'https://api.lightxeditor.com/external/api/v1/outfit';
const apiKey = '<Insert your API Key>';  // Replace with your actual API key

const data = {
"imageUrl": "https://example.com/your-image.jpg",  // Replace with the URL of your input image
"textPrompt": "YourInputPrompt"  // Replace with your specific input prompt
};

const options = {
method: 'POST',
headers: {
    'Content-Type': 'application/json',
    'x-api-key': apiKey
},
body: JSON.stringify(data)
};

fetch(url, options)
.then(response => {
    if (!response.ok) {
        throw new Error(`Request failed with status code ${response.status}`);
    }
    return response.json();
})
.then(data => {
    console.log('Request was successful!');
    console.log(data);
})
.catch(error => {
    console.error('Error:', error);
});

}
import Foundation

// Define the URL and API key
let url = URL(string: "https://api.lightxeditor.com/external/api/v1/outfit")!
let apiKey = "<Insert your API Key>"  // Replace with your actual API key

// Define the request body
let requestBody: [String: Any] = [
"imageUrl": "https://example.com/your-image.jpg",  // Replace with the URL of your input image
"textPrompt": "YourInputPrompt"  // Replace with your specific input prompt
]

// Convert request body to JSON data
let jsonData = try! JSONSerialization.data(withJSONObject: requestBody, options: [])

// Create the URLRequest object
var request = URLRequest(url: url)
request.httpMethod = "POST"
request.setValue("application/json", forHTTPHeaderField: "Content-Type")
request.setValue(apiKey, forHTTPHeaderField: "x-api-key")
request.httpBody = jsonData

// Create the URLSession data task
let task = URLSession.shared.dataTask(with: request) { data, response, error in
// Handle the response
if let error = error {
    print("Error: \(error)")
    return
}

guard let httpResponse = response as? HTTPURLResponse, (200...299).contains(httpResponse.statusCode) else {
    print("Unexpected response")
    return
}

if let data = data {
    do {
        // Parse and print the JSON response
        let jsonResponse = try JSONSerialization.jsonObject(with: data, options: [])
        print("Response: \(jsonResponse)")
    } catch {
        print("Error parsing JSON: \(error)")
    }
}
}

// Start the task
task.resume()
import okhttp3.MediaType.Companion.toMediaType
import okhttp3.OkHttpClient
import okhttp3.Request
import okhttp3.RequestBody.Companion.toRequestBody
import okhttp3.Response
import org.json.JSONObject

fun main() {
// Define the URL and API key
val url = "https://api.lightxeditor.com/external/api/v1/outfit' \"
val apiKey = "<Insert your API Key>"  // Replace with your actual API key

// Define the request body
val requestBody = JSONObject().apply {
    put("imageUrl", "https://example.com/your-image.jpg")  // Replace with the URL of your input image
    put("textPrompt", "YourInputPrompt")  // Replace with your specific input prompt
}.toString()

// Create OkHttpClient
val client = OkHttpClient()

// Create the request
val request = Request.Builder()
    .url(url)
    .post(requestBody.toRequestBody("application/json; charset=utf-8".toMediaType()))
    .addHeader("x-api-key", apiKey)
    .build()

// Make the request
client.newCall(request).execute().use { response ->
    if (!response.isSuccessful) {
        throw IOException("Unexpected code $response")
    }

    // Print the response
    val responseData = response.body?.string()
    println("Response: $responseData")
}
}
  Method- Post
curl --location 'https://api.lightxeditor.com/external/api/v1/outfit' \
--header 'Content-Type: application/json' \
--header 'x-api-key: <Insert your API Key>' \
--data '{
"imageUrl": "https://example.com/your-image.jpg",  // Replace with the URL of your input image
"textPrompt": "YourInputPrompt"  // Replace with your specific input prompt
}'

Choose Your Plan

Explore a variety of pricing plans designed to meet your unique requirements. Find the perfect fit and start today.

Create your own outfits with text prompts

Get your clothing transformation with custom outfits using simple text inputs. Just describe the look you want, and the AI changes the outfit based on your prompt. You can specify details like color, style, and fabric (e.g., "navy blue velvet gown") or keep it general with styles like "boho" or "winters." You can even request celebrity-inspired looks by saying, "dress me like [celebrity name]." The AI makes it easy to try on any look you imagine!

Outfit editor transforms a girl's look from boho style to a blue velvet gown.

Change outfits virtually to create Instagram and Pinterest aesthetic

Love the outfits you see on Instagram and Pinterest? LightX API is your virtual dressing room. It helps you create trendy, social media-ready outfits that match those popular styles. For influencers, this is a game changer—it saves time, allows experimentation with new styles, and keeps your feed fresh and stylish.

Real-time clothes changer dresses a Brazilian model in a pink short with a white blazer and a Hollywood glam gown.

Visualize outfits virtually with accuracy: Realistic fit and sizing

Worried about how clothes will fit? Our tool makes it easy to see how outfits would look on different body types with accurate sizing. You’ll get a realistic idea of how the clothes will fit.The LightX Outfit Changer API not only generates custom outfits but does so in a way that ensures they fit and look realistic. The clothes blend seamlessly with your body without altering your face, hair, or background, giving you a natural, lifelike result every time.

Clothing swap tool changes a plus-size man’s denim shirt to a black woolen pullover, keeping his body shape intact.

Generate AI outfits with faster processing and higher-quality outputs

LightX AI replaces clothes quickly and with high-quality results. Experience a smooth, fast experience creating and trying on virtual outfits, keeping you engaged and excited to explore new looks. The API not only generates custom outfits but does so in a way that ensures they fit and look realistic. The clothes blend seamlessly with your body without editing your face, hair, or background, giving you a natural, lifelike result every time.

Clothes changer transforms a good-looking American man’s casual business outfit into a t-shirt, jeans, and tattooed arms.

Start with Free Credits

Get started with LightX APIs today! Receive 25 free credits instantly on API signup – no credit card required

Frequently Asked Questions

To integrate the LightX Clothes Changer API into your application, visit the API documentation for detailed guidelines. The documentation provides step-by-step instructions, code examples, and support for multiple programming languages to help you implement the API smoothly.

Still Unsure? Allow Us To Assist You!

Write to us and we'd love to understand your requirements

Drop an image anywhere to upload
Upload one image at a time