Image Editor API
Upload your file and then enter editing prompt
Switch to url upload Switch to file upload
The selected style is only available to PRO users. Please upgrade or try a different style

Recently generated images:
QUICK START API REQUEST
curl \
-F 'image=YOUR_IMAGE_URL' \
-F 'text=YOUR_IMAGE_URL' \
-H 'api-key:YOUR_API_KEY' \
https://api.deepai.org/api/image-editor
Image Editor API Documentation
Pricing: $5 per 100 API calls, or $5 per 500 for DeepAI Pro subscribers
Image Editor cURL Examples
# Example posting a image URL:
curl \
-F 'image=YOUR_IMAGE_URL' \
-F 'text=YOUR_IMAGE_URL' \
-H 'api-key:YOUR_API_KEY' \
https://api.deepai.org/api/image-editor
# Example posting a local image file:
curl \
-F 'image=@/path/to/your/file.jpg' \
-F 'text=@/path/to/your/file.txt' \
-H 'api-key:YOUR_API_KEY' \
https://api.deepai.org/api/image-editor
Image Editor Javascript Examples
// Get the 'deepai' package here (Compatible with browser & nodejs):
// https://www.npmjs.com/package/deepai
// All examples use JS async-await syntax, be sure to call the API inside an async function.
// Learn more about async-await here: https://javascript.info/async-await
// Example posting a image URL:
const deepai = require('deepai'); // OR include deepai.min.js as a script tag in your HTML
deepai.setApiKey('YOUR_API_KEY');
(async function() {
var resp = await deepai.callStandardApi("image-editor", {
image: "YOUR_IMAGE_URL",
text: "YOUR_IMAGE_URL",
});
console.log(resp);
})()
// Example posting file picker input image (Browser only):
const deepai = require('deepai'); // OR include deepai.min.js as a script tag in your HTML
deepai.setApiKey('YOUR_API_KEY');
(async function() {
var resp = await deepai.callStandardApi("image-editor", {
image: document.getElementById('yourFileInputId'),
text: document.getElementById('yourFileInputId'),
});
console.log(resp);
})()
// Example posting a local image file (Node.js only):
const fs = require('fs');
const deepai = require('deepai'); // OR include deepai.min.js as a script tag in your HTML
deepai.setApiKey('YOUR_API_KEY');
(async function() {
var resp = await deepai.callStandardApi("image-editor", {
image: fs.createReadStream("/path/to/your/file.jpg"),
text: fs.createReadStream("/path/to/your/file.txt"),
});
console.log(resp);
})()
Image Editor Python Examples
# Example posting a image URL:
import requests
r = requests.post(
"https://api.deepai.org/api/image-editor",
data={
'image': 'YOUR_IMAGE_URL',
'text': 'YOUR_IMAGE_URL',
},
headers={'api-key': 'YOUR_API_KEY'}
)
print(r.json())
# Example posting a local image file:
import requests
r = requests.post(
"https://api.deepai.org/api/image-editor",
files={
'image': open('/path/to/your/file.jpg', 'rb'),
'text': open('/path/to/your/file.txt', 'rb'),
},
headers={'api-key': 'YOUR_API_KEY'}
)
print(r.json())
Image Editor Ruby Examples
# Example posting a image URL:
require 'rest_client'
r = RestClient::Request.execute(method: :post, url: 'https://api.deepai.org/api/image-editor', timeout: 600,
headers: {'api-key' => 'YOUR_API_KEY'},
payload: {
'image' => 'YOUR_IMAGE_URL',
'text' => 'YOUR_IMAGE_URL',
}
)
puts r
# Example posting a local image file:
require 'rest_client'
r = RestClient::Request.execute(method: :post, url: 'https://api.deepai.org/api/image-editor', timeout: 600,
headers: {'api-key' => 'YOUR_API_KEY'},
payload: {
'image' => File.new('/path/to/your/file.jpg'),
'text' => File.new('/path/to/your/file.txt'),
}
)
puts r
Image Editor Csharp Examples
// Ensure your DeepAI.Client NuGet package is up to date: https://www.nuget.org/packages/DeepAI.Client
// Example posting a image URL:
using DeepAI; // Add this line to the top of your file
DeepAI_API api = new DeepAI_API(apiKey: "YOUR_API_KEY");
StandardApiResponse resp = api.callStandardApi("image-editor", new {
image = "YOUR_IMAGE_URL",
text = "YOUR_IMAGE_URL",
});
Console.Write(api.objectAsJsonString(resp));
// Example posting a local image file:
using DeepAI; // Add this line to the top of your file
DeepAI_API api = new DeepAI_API(apiKey: "YOUR_API_KEY");
StandardApiResponse resp = api.callStandardApi("image-editor", new {
image = File.OpenRead("C:\\path\\to\\your\\file.jpg"),
text = File.OpenRead("C:\\path\\to\\your\\file.txt"),
});
Console.Write(api.objectAsJsonString(resp));