Why LightX API?
Ultra-Fast Performance
Optimised algorithms that are designed for fast execution and reduced processing time.
Instant Setup
Integrates smoothly with minimal code and quick setup.
Regular Updates
Stay ahead of the competition with timely updates and the latest features.
Ultimate Data Protection
Top-tier encryption, secure access controls, and continuous monitoring to safeguard your data.
Market-Leading Pricing
Benefit from the lowest prices in the market without compromising on quality.
Save Development Time
Utilize ready-made AI photo editing tools to avoid building from scratch.
Powerful Infrastructure
Servers designed to run your application smoothly even during peak times.
Dedicated Support Team
Receive personalised assistance tailored to your needs with our API support.
Our Impact: Transforming Millions of Images Monthly
50M+
Edits performed on our platform each month.
5M+
Backgrounds removed from images.
1M+
AI images generated monthly.
10+
AI tools with powerful editing features.
Easy Integration with Popular Frameworks
Integrate our API with CSS, React, Tailwind, JS, and Python smoothly for versatile and powerful applications.
import requests

url = 'https://api.lightxeditor.com/external/api/v1/remove-background'
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
"background": "color name or color code" # Replace with the desired background color name or color code
}

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/remove-background';
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
"background": "color name or color code" // Replace with the desired color name or color code
};

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/remove-background")!
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
"background": "color name or color code" // Replace with the background color name or color code
]

// 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/remove-background"
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("background", "color name or color code") // Replace with the color name or code
}.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/remove-background'
--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
"background": "color name or color code"
}
Our Pricing

Pricing

Starter

 
₹0
lifetime

25 free credits

Flexi

₹7.99
per credit
100 credits ₹799
1,000 credits ₹7,199
5,000 credits ₹31,999
10,000 credits ₹55,999
50,000 credits ₹239,999
100,000 credits ₹319,999

Enterprise

 
Custom
Pricing

Scalable pricing with volume based discounts

Looking for something more? We will create a customized AI for your brand, starting from $3,000 USD per month. Contact Us for more details!

API Pricing Framework

Each API call consumes a credit, which is deducted from your Credit Count balance based on the type of call you make.

API Service Pricing

API calls are associated with Credits. The credits are deducted from your Credit Count, based on the type of the API call that you make.

Module
Credits/generation
Remove Background

Seamlessly remove backgrounds from images in one click. Uses advanced segmentation algorithms for clean, professional results.

0.50
Cleanup Picture

A smart tool that flawlessly erases unwanted elements, refining images for focus and a polished finish.

0.50
AI Avatar

Generate personalized male or female avatars from photos, utilizing prompts or optionally using style images to capture exact facial features with stylistic preferences.

1.00
AI Cartoon Generator

Transform photos into stylized, high-definition cartoon representations with superior detail and color accuracy with the help of prompts or style images.

1.00
AI Caricature Generator

Create unique caricatures of your images, applying styles of exaggerated features and artistic flair through sophisticated image processing.

1.00
AI Expand

Precisely extend image canvases while maintaining natural aesthetics and ensuring continuity in visual elements.

1.00
AI Replace

Swap specific elements in images with all-new objects, guaranteeing contextual accuracy and visual consistency.

1.00
AI Product Phototshoot

Automatic product photography with dynamic background generation, ensuring consistent branding and professional presentation using either prompts or using style images.

1.00
AI Background Generator

Automatic product photography with dynamic background generation, ensuring consistent branding and professional presentation using either prompts or style images.

1.00
AI Image Generator

A state-of-the-art AI that produces high-quality images from text descriptions using advanced deep learning techniques.

1.00
AI Portrait

Create stunning portraits from text descriptions or existing images, transforming them with realistic details or artistic styles through advanced AI processing.

1.00
AI Face Swap

Swap faces in photos with any character for a whole new look. This tool makes the swap look as natural as possible, matching skin tones, lighting, and facial expressions.

0.50

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

LightX API allows developers to integrate advanced photo editing capabilities powered by artificial intelligence (AI) into their applications, websites, or services. Designed to simplify and enhance the photo editing process, LightX API makes it easier to build high-performing, visually appealing apps that meet modern user expectations.

Need Assistance? We're Here to Help!

Contact us, and our team will be happy to assist you with any questions or customised requirements you have.