Image Editor

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
Pro Tip💡 try adding a simple instuction or style description. Example: make the sky red, add flowers to the background, turn the cat into a rabbit.

Edit images with AI.



API Docs
Recently generated images:

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

// Example posting a image URL:
(async function() {
    const resp = await fetch('https://api.deepai.org/api/image-editor', {
        method: 'POST',
        headers: {
            'Content-Type': 'application/json',
            'api-key': 'YOUR_API_KEY'
        },
        body: JSON.stringify({
            image: "YOUR_IMAGE_URL",
            text: "YOUR_IMAGE_URL",
        })
    });
    
    const data = await resp.json();
    console.log(data);
})()


// Example posting file picker input image (Browser only):
document.getElementById('yourFileInputId').addEventListener('change', async function() {
       const file = this.files[0];
       const formData = new FormData();
       formData.append('text', file);

       const resp = await fetch('https://api.deepai.org/api/image-editor', {
           method: 'POST',
           headers: {
               'api-key': 'YOUR_API_KEY'
           },
           body: formData
       });

       const data = await resp.json();
       console.log(data);
});

// Example posting a local image file (Node.js only):
const fs = require('fs');
const axios = require('axios');
(async function() {
       const fileStream = fs.createReadStream('/path/to/your/file.txt');

       const resp = await axios.post('https://api.deepai.org/api/image-editor', fileStream, {
           headers: {
               'Content-Type': 'application/json',
               'api-key': 'YOUR_API_KEY'
           }
       });

       console.log(resp.data);
});

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

Please sign up or login with your details

Forgot password? Click here to reset