sparkleDocumentation

Welcome to the world of AI made fun and easy

Dive In

What We Do
New Features
How-To-Guides
AI Chat
AI Image Generator
AI Video Generator
AI Image Editor
AI Characters


Note: Only public submissions need to be reviewed.

Pricing
APIs

Pricing: $5 per 100 API calls, or $5 per 500 for DeepAI Pro subscribers

AI Image Generator

This is an AI Image Generator. It creates an image from scratch from a text description.

cURL Examples

# Example posting a text URL:

curl \
    -F 'text=YOUR_TEXT_URL' \
    -H 'api-key:YOUR_API_KEY' \
    https://api.deepai.org/api/text2img 


# Example posting a local text file:

curl \
    -F 'text=@/path/to/your/file.txt' \
    -H 'api-key:YOUR_API_KEY' \
    https://api.deepai.org/api/text2img 


# Example directly sending a text string:

curl \
    -F 'text=YOUR_TEXT_HERE' \
    -H 'api-key:YOUR_API_KEY' \
    https://api.deepai.org/api/text2img 

Javascript Examples

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


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

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

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

// Example posting a local text file (Node.js only):
const fs = require('fs');
(async function() {
       const formData = new FormData();
       const txtFileStream = fs.createReadStream("/path/to/your/file.txt"),
       formData.append('text', txtFileStream);

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

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

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

Python Examples

# Example posting a text URL:

import requests
r = requests.post(
    "https://api.deepai.org/api/text2img",
    data={
        'text': 'YOUR_TEXT_URL',
    },
    headers={'api-key': 'YOUR_API_KEY'}
)
print(r.json())


# Example posting a local text file:

import requests
r = requests.post(
    "https://api.deepai.org/api/text2img",
    files={
        'text': open('/path/to/your/file.txt', 'rb'),
    },
    headers={'api-key': 'YOUR_API_KEY'}
)
print(r.json())


# Example directly sending a text string:

import requests
r = requests.post(
    "https://api.deepai.org/api/text2img",
    data={
        'text': 'YOUR_TEXT_HERE',
    },
    headers={'api-key': 'YOUR_API_KEY'}
)
print(r.json())

Ruby Examples

# Example posting a text URL:

require 'rest_client'
r = RestClient::Request.execute(method: :post, url: 'https://api.deepai.org/api/text2img', timeout: 600,
    headers: {'api-key' => 'YOUR_API_KEY'},
    payload: {
        'text' => 'YOUR_TEXT_URL',
    }
)
puts r


# Example posting a local text file:

require 'rest_client'
r = RestClient::Request.execute(method: :post, url: 'https://api.deepai.org/api/text2img', timeout: 600,
    headers: {'api-key' => 'YOUR_API_KEY'},
    payload: {
        'text' => File.new('/path/to/your/file.txt'),
    }
)
puts r


# Example directly sending a text string:

require 'rest_client'
r = RestClient::Request.execute(method: :post, url: 'https://api.deepai.org/api/text2img', timeout: 600,
    headers: {'api-key' => 'YOUR_API_KEY'},
    payload: {
        'text' => 'YOUR_TEXT_HERE',
    }
)
puts r

Background Remover

Remove image background with AI.

cURL Examples

# Example posting a image URL:

curl \
    -F 'image=YOUR_IMAGE_URL' \
    -H 'api-key:YOUR_API_KEY' \
    https://api.deepai.org/api/background-remover 


# Example posting a local image file:

curl \
    -F 'image=@/path/to/your/file.jpg' \
    -H 'api-key:YOUR_API_KEY' \
    https://api.deepai.org/api/background-remover 

Javascript Examples

// Example posting a image URL:
(async function() {
    const resp = await fetch('https://api.deepai.org/api/background-remover', {
        method: 'POST',
        headers: {
            'Content-Type': 'application/json',
            'api-key': 'YOUR_API_KEY'
        },
        body: JSON.stringify({
            image: "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 formData = new FormData();
       formData.append('image', this.files[0]);

       const resp = await fetch('https://api.deepai.org/api/background-remover', {
           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');
(async function() {
       const formData = new FormData();
       const jpgFileStream = fs.createReadStream("/path/to/your/file.jpg"),
       formData.append('image', jpgFileStream);

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

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

Python Examples

# Example posting a image URL:

import requests
r = requests.post(
    "https://api.deepai.org/api/background-remover",
    data={
        'image': '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/background-remover",
    files={
        'image': open('/path/to/your/file.jpg', 'rb'),
    },
    headers={'api-key': 'YOUR_API_KEY'}
)
print(r.json())

Ruby Examples

# Example posting a image URL:

require 'rest_client'
r = RestClient::Request.execute(method: :post, url: 'https://api.deepai.org/api/background-remover', timeout: 600,
    headers: {'api-key' => 'YOUR_API_KEY'},
    payload: {
        'image' => '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/background-remover', timeout: 600,
    headers: {'api-key' => 'YOUR_API_KEY'},
    payload: {
        'image' => File.new('/path/to/your/file.jpg'),
    }
)
puts r

AI Image Editor

Edit images with AI.

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 

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 formData = new FormData();
       formData.append('image', this.files[0]);
       formData.append('text', this.files[1]);

       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');
(async function() {
       const formData = new FormData();
       const jpgFileStream = fs.createReadStream("/path/to/your/file.jpg"),
       formData.append('image', jpgFileStream);
       const txtFileStream = fs.createReadStream("/path/to/your/file.txt"),
       formData.append('text', txtFileStream);

       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);
});

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())

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

Wojak Meme Generator

Generate a wojak meme to roast any topic or group!

cURL Examples

# Example posting a text URL:

curl \
    -F 'text=YOUR_TEXT_URL' \
    -H 'api-key:YOUR_API_KEY' \
    https://api.deepai.org/api/wojak-meme-generator 


# Example posting a local text file:

curl \
    -F 'text=@/path/to/your/file.txt' \
    -H 'api-key:YOUR_API_KEY' \
    https://api.deepai.org/api/wojak-meme-generator 


# Example directly sending a text string:

curl \
    -F 'text=YOUR_TEXT_HERE' \
    -H 'api-key:YOUR_API_KEY' \
    https://api.deepai.org/api/wojak-meme-generator 

Javascript Examples

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


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

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

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

// Example posting a local text file (Node.js only):
const fs = require('fs');
(async function() {
       const formData = new FormData();
       const txtFileStream = fs.createReadStream("/path/to/your/file.txt"),
       formData.append('text', txtFileStream);

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

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

// Example directly sending a text string:
(async function() {
    const resp = await fetch('https://api.deepai.org/api/wojak-meme-generator', {
        method: 'POST',
        headers: {
            'Content-Type': 'application/json',
            'api-key': 'YOUR_API_KEY'
        },
        body: JSON.stringify({
            text: "YOUR_TEXT_HERE",
        })
    });
    
    const data = await resp.json();
    console.log(data);
})()

Python Examples

# Example posting a text URL:

import requests
r = requests.post(
    "https://api.deepai.org/api/wojak-meme-generator",
    data={
        'text': 'YOUR_TEXT_URL',
    },
    headers={'api-key': 'YOUR_API_KEY'}
)
print(r.json())


# Example posting a local text file:

import requests
r = requests.post(
    "https://api.deepai.org/api/wojak-meme-generator",
    files={
        'text': open('/path/to/your/file.txt', 'rb'),
    },
    headers={'api-key': 'YOUR_API_KEY'}
)
print(r.json())


# Example directly sending a text string:

import requests
r = requests.post(
    "https://api.deepai.org/api/wojak-meme-generator",
    data={
        'text': 'YOUR_TEXT_HERE',
    },
    headers={'api-key': 'YOUR_API_KEY'}
)
print(r.json())

Ruby Examples

# Example posting a text URL:

require 'rest_client'
r = RestClient::Request.execute(method: :post, url: 'https://api.deepai.org/api/wojak-meme-generator', timeout: 600,
    headers: {'api-key' => 'YOUR_API_KEY'},
    payload: {
        'text' => 'YOUR_TEXT_URL',
    }
)
puts r


# Example posting a local text file:

require 'rest_client'
r = RestClient::Request.execute(method: :post, url: 'https://api.deepai.org/api/wojak-meme-generator', timeout: 600,
    headers: {'api-key' => 'YOUR_API_KEY'},
    payload: {
        'text' => File.new('/path/to/your/file.txt'),
    }
)
puts r


# Example directly sending a text string:

require 'rest_client'
r = RestClient::Request.execute(method: :post, url: 'https://api.deepai.org/api/wojak-meme-generator', timeout: 600,
    headers: {'api-key' => 'YOUR_API_KEY'},
    payload: {
        'text' => 'YOUR_TEXT_HERE',
    }
)
puts r

AI Headshot Generator

Get Professional AI Headshots in seconds with Our AI Headshot Generator. Save time and money while achieving stunning, high-quality results effortlessly.

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/ai-headshots 


# 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/ai-headshots 

Javascript Examples

// Example posting a image URL:
(async function() {
    const resp = await fetch('https://api.deepai.org/api/ai-headshots', {
        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 formData = new FormData();
       formData.append('image', this.files[0]);
       formData.append('text', this.files[1]);

       const resp = await fetch('https://api.deepai.org/api/ai-headshots', {
           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');
(async function() {
       const formData = new FormData();
       const jpgFileStream = fs.createReadStream("/path/to/your/file.jpg"),
       formData.append('image', jpgFileStream);
       const txtFileStream = fs.createReadStream("/path/to/your/file.txt"),
       formData.append('text', txtFileStream);

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

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

Python Examples

# Example posting a image URL:

import requests
r = requests.post(
    "https://api.deepai.org/api/ai-headshots",
    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/ai-headshots",
    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())

Ruby Examples

# Example posting a image URL:

require 'rest_client'
r = RestClient::Request.execute(method: :post, url: 'https://api.deepai.org/api/ai-headshots', 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/ai-headshots', 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

Face to Sticker

Transform anyone into a sticker.

cURL Examples

# Example posting a image URL:

curl \
    -F 'image=YOUR_IMAGE_URL' \
    -H 'api-key:YOUR_API_KEY' \
    https://api.deepai.org/api/face-to-sticker 


# Example posting a local image file:

curl \
    -F 'image=@/path/to/your/file.jpg' \
    -H 'api-key:YOUR_API_KEY' \
    https://api.deepai.org/api/face-to-sticker 

Javascript Examples

// Example posting a image URL:
(async function() {
    const resp = await fetch('https://api.deepai.org/api/face-to-sticker', {
        method: 'POST',
        headers: {
            'Content-Type': 'application/json',
            'api-key': 'YOUR_API_KEY'
        },
        body: JSON.stringify({
            image: "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 formData = new FormData();
       formData.append('image', this.files[0]);

       const resp = await fetch('https://api.deepai.org/api/face-to-sticker', {
           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');
(async function() {
       const formData = new FormData();
       const jpgFileStream = fs.createReadStream("/path/to/your/file.jpg"),
       formData.append('image', jpgFileStream);

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

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

Python Examples

# Example posting a image URL:

import requests
r = requests.post(
    "https://api.deepai.org/api/face-to-sticker",
    data={
        'image': '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/face-to-sticker",
    files={
        'image': open('/path/to/your/file.jpg', 'rb'),
    },
    headers={'api-key': 'YOUR_API_KEY'}
)
print(r.json())

Ruby Examples

# Example posting a image URL:

require 'rest_client'
r = RestClient::Request.execute(method: :post, url: 'https://api.deepai.org/api/face-to-sticker', timeout: 600,
    headers: {'api-key' => 'YOUR_API_KEY'},
    payload: {
        'image' => '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/face-to-sticker', timeout: 600,
    headers: {'api-key' => 'YOUR_API_KEY'},
    payload: {
        'image' => File.new('/path/to/your/file.jpg'),
    }
)
puts r

Image Colorizer

Add color to old family photos and historic images, or bring an old film back to life with colorization.

cURL Examples

# Example posting a image URL:

curl \
    -F 'image=YOUR_IMAGE_URL' \
    -H 'api-key:YOUR_API_KEY' \
    https://api.deepai.org/api/colorizer 


# Example posting a local image file:

curl \
    -F 'image=@/path/to/your/file.jpg' \
    -H 'api-key:YOUR_API_KEY' \
    https://api.deepai.org/api/colorizer 

Javascript Examples

// Example posting a image URL:
(async function() {
    const resp = await fetch('https://api.deepai.org/api/colorizer', {
        method: 'POST',
        headers: {
            'Content-Type': 'application/json',
            'api-key': 'YOUR_API_KEY'
        },
        body: JSON.stringify({
            image: "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 formData = new FormData();
       formData.append('image', this.files[0]);

       const resp = await fetch('https://api.deepai.org/api/colorizer', {
           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');
(async function() {
       const formData = new FormData();
       const jpgFileStream = fs.createReadStream("/path/to/your/file.jpg"),
       formData.append('image', jpgFileStream);

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

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

Python Examples

# Example posting a image URL:

import requests
r = requests.post(
    "https://api.deepai.org/api/colorizer",
    data={
        'image': '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/colorizer",
    files={
        'image': open('/path/to/your/file.jpg', 'rb'),
    },
    headers={'api-key': 'YOUR_API_KEY'}
)
print(r.json())

Ruby Examples

# Example posting a image URL:

require 'rest_client'
r = RestClient::Request.execute(method: :post, url: 'https://api.deepai.org/api/colorizer', timeout: 600,
    headers: {'api-key' => 'YOUR_API_KEY'},
    payload: {
        'image' => '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/colorizer', timeout: 600,
    headers: {'api-key' => 'YOUR_API_KEY'},
    payload: {
        'image' => File.new('/path/to/your/file.jpg'),
    }
)
puts r

AI Selfie Generator

Make Yourself AI! Upload an image, add a text prompt, and receive a stunning AI portrait. Experience personalized art like never before!

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/ai-selfie-generator 


# 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/ai-selfie-generator 

Javascript Examples

// Example posting a image URL:
(async function() {
    const resp = await fetch('https://api.deepai.org/api/ai-selfie-generator', {
        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 formData = new FormData();
       formData.append('image', this.files[0]);
       formData.append('text', this.files[1]);

       const resp = await fetch('https://api.deepai.org/api/ai-selfie-generator', {
           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');
(async function() {
       const formData = new FormData();
       const jpgFileStream = fs.createReadStream("/path/to/your/file.jpg"),
       formData.append('image', jpgFileStream);
       const txtFileStream = fs.createReadStream("/path/to/your/file.txt"),
       formData.append('text', txtFileStream);

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

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

Python Examples

# Example posting a image URL:

import requests
r = requests.post(
    "https://api.deepai.org/api/ai-selfie-generator",
    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/ai-selfie-generator",
    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())

Ruby Examples

# Example posting a image URL:

require 'rest_client'
r = RestClient::Request.execute(method: :post, url: 'https://api.deepai.org/api/ai-selfie-generator', 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/ai-selfie-generator', 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

Face Retoucher

Enhance your portraits to achieve your preferred appearance.

cURL Examples

# Example posting a image URL:

curl \
    -F 'image=YOUR_IMAGE_URL' \
    -H 'api-key:YOUR_API_KEY' \
    https://api.deepai.org/api/face-retoucher 


# Example posting a local image file:

curl \
    -F 'image=@/path/to/your/file.jpg' \
    -H 'api-key:YOUR_API_KEY' \
    https://api.deepai.org/api/face-retoucher 

Javascript Examples

// Example posting a image URL:
(async function() {
    const resp = await fetch('https://api.deepai.org/api/face-retoucher', {
        method: 'POST',
        headers: {
            'Content-Type': 'application/json',
            'api-key': 'YOUR_API_KEY'
        },
        body: JSON.stringify({
            image: "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 formData = new FormData();
       formData.append('image', this.files[0]);

       const resp = await fetch('https://api.deepai.org/api/face-retoucher', {
           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');
(async function() {
       const formData = new FormData();
       const jpgFileStream = fs.createReadStream("/path/to/your/file.jpg"),
       formData.append('image', jpgFileStream);

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

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

Python Examples

# Example posting a image URL:

import requests
r = requests.post(
    "https://api.deepai.org/api/face-retoucher",
    data={
        'image': '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/face-retoucher",
    files={
        'image': open('/path/to/your/file.jpg', 'rb'),
    },
    headers={'api-key': 'YOUR_API_KEY'}
)
print(r.json())

Ruby Examples

# Example posting a image URL:

require 'rest_client'
r = RestClient::Request.execute(method: :post, url: 'https://api.deepai.org/api/face-retoucher', timeout: 600,
    headers: {'api-key' => 'YOUR_API_KEY'},
    payload: {
        'image' => '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/face-retoucher', timeout: 600,
    headers: {'api-key' => 'YOUR_API_KEY'},
    payload: {
        'image' => File.new('/path/to/your/file.jpg'),
    }
)
puts r

Super Resolution

The Super Resolution API uses machine learning to clarify, sharpen, and upscale the photo without losing its content and defining characteristics. Blurry images are unfortunately common and are a problem for professionals and hobbyists alike. Super resolution uses machine learning techniques to upscale images in a fraction of a second.

cURL Examples

# Example posting a image URL:

curl \
    -F 'image=YOUR_IMAGE_URL' \
    -H 'api-key:YOUR_API_KEY' \
    https://api.deepai.org/api/torch-srgan 


# Example posting a local image file:

curl \
    -F 'image=@/path/to/your/file.jpg' \
    -H 'api-key:YOUR_API_KEY' \
    https://api.deepai.org/api/torch-srgan 

Javascript Examples

// Example posting a image URL:
(async function() {
    const resp = await fetch('https://api.deepai.org/api/torch-srgan', {
        method: 'POST',
        headers: {
            'Content-Type': 'application/json',
            'api-key': 'YOUR_API_KEY'
        },
        body: JSON.stringify({
            image: "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 formData = new FormData();
       formData.append('image', this.files[0]);

       const resp = await fetch('https://api.deepai.org/api/torch-srgan', {
           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');
(async function() {
       const formData = new FormData();
       const jpgFileStream = fs.createReadStream("/path/to/your/file.jpg"),
       formData.append('image', jpgFileStream);

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

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

Python Examples

# Example posting a image URL:

import requests
r = requests.post(
    "https://api.deepai.org/api/torch-srgan",
    data={
        'image': '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/torch-srgan",
    files={
        'image': open('/path/to/your/file.jpg', 'rb'),
    },
    headers={'api-key': 'YOUR_API_KEY'}
)
print(r.json())

Ruby Examples

# Example posting a image URL:

require 'rest_client'
r = RestClient::Request.execute(method: :post, url: 'https://api.deepai.org/api/torch-srgan', timeout: 600,
    headers: {'api-key' => 'YOUR_API_KEY'},
    payload: {
        'image' => '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/torch-srgan', timeout: 600,
    headers: {'api-key' => 'YOUR_API_KEY'},
    payload: {
        'image' => File.new('/path/to/your/file.jpg'),
    }
)
puts r

Waifu2x

Waifu2x is an algorithm that upscales images while reducing noise within the image. It gets its name from the anime-style art known as 'waifu' that it was largely trained on. Even though waifus made up most of the training data, this waifu2x api still performs well on photographs and other types of imagery. You can use Waifu2x to double the size of your images while reducing noise.

cURL Examples

# Example posting a image URL:

curl \
    -F 'image=YOUR_IMAGE_URL' \
    -H 'api-key:YOUR_API_KEY' \
    https://api.deepai.org/api/waifu2x 


# Example posting a local image file:

curl \
    -F 'image=@/path/to/your/file.jpg' \
    -H 'api-key:YOUR_API_KEY' \
    https://api.deepai.org/api/waifu2x 

Javascript Examples

// Example posting a image URL:
(async function() {
    const resp = await fetch('https://api.deepai.org/api/waifu2x', {
        method: 'POST',
        headers: {
            'Content-Type': 'application/json',
            'api-key': 'YOUR_API_KEY'
        },
        body: JSON.stringify({
            image: "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 formData = new FormData();
       formData.append('image', this.files[0]);

       const resp = await fetch('https://api.deepai.org/api/waifu2x', {
           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');
(async function() {
       const formData = new FormData();
       const jpgFileStream = fs.createReadStream("/path/to/your/file.jpg"),
       formData.append('image', jpgFileStream);

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

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

Python Examples

# Example posting a image URL:

import requests
r = requests.post(
    "https://api.deepai.org/api/waifu2x",
    data={
        'image': '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/waifu2x",
    files={
        'image': open('/path/to/your/file.jpg', 'rb'),
    },
    headers={'api-key': 'YOUR_API_KEY'}
)
print(r.json())

Ruby Examples

# Example posting a image URL:

require 'rest_client'
r = RestClient::Request.execute(method: :post, url: 'https://api.deepai.org/api/waifu2x', timeout: 600,
    headers: {'api-key' => 'YOUR_API_KEY'},
    payload: {
        'image' => '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/waifu2x', timeout: 600,
    headers: {'api-key' => 'YOUR_API_KEY'},
    payload: {
        'image' => File.new('/path/to/your/file.jpg'),
    }
)
puts r

Search and Replace

Revamp your images with object replacement! Upload your image, specify search and replacement prompts, and receive a seamlessly edited AI image—transform your editing experience today!

cURL Examples

# Example posting a image URL:

curl \
    -F 'image=YOUR_IMAGE_URL' \
    -F 'search_prompt=YOUR_IMAGE_URL' \
    -F 'prompt=YOUR_IMAGE_URL' \
    -H 'api-key:YOUR_API_KEY' \
    https://api.deepai.org/api/search-and-replace 


# Example posting a local image file:

curl \
    -F 'image=@/path/to/your/file.jpg' \
    -F 'search_prompt=@/path/to/your/file.txt' \
    -F 'prompt=@/path/to/your/file.txt' \
    -H 'api-key:YOUR_API_KEY' \
    https://api.deepai.org/api/search-and-replace 

Javascript Examples

// Example posting a image URL:
(async function() {
    const resp = await fetch('https://api.deepai.org/api/search-and-replace', {
        method: 'POST',
        headers: {
            'Content-Type': 'application/json',
            'api-key': 'YOUR_API_KEY'
        },
        body: JSON.stringify({
            image: "YOUR_IMAGE_URL",
            search_prompt: "YOUR_IMAGE_URL",
            prompt: "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 formData = new FormData();
       formData.append('image', this.files[0]);
       formData.append('search_prompt', this.files[1]);
       formData.append('prompt', this.files[2]);

       const resp = await fetch('https://api.deepai.org/api/search-and-replace', {
           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');
(async function() {
       const formData = new FormData();
       const jpgFileStream = fs.createReadStream("/path/to/your/file.jpg"),
       formData.append('image', jpgFileStream);
       const txtFileStream = fs.createReadStream("/path/to/your/file.txt"),
       formData.append('search_prompt', txtFileStream);
       const txtFileStream = fs.createReadStream("/path/to/your/file.txt"),
       formData.append('prompt', txtFileStream);

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

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

Python Examples

# Example posting a image URL:

import requests
r = requests.post(
    "https://api.deepai.org/api/search-and-replace",
    data={
        'image': 'YOUR_IMAGE_URL',
        'search_prompt': 'YOUR_IMAGE_URL',
        'prompt': '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/search-and-replace",
    files={
        'image': open('/path/to/your/file.jpg', 'rb'),
        'search_prompt': open('/path/to/your/file.txt', 'rb'),
        'prompt': open('/path/to/your/file.txt', 'rb'),
    },
    headers={'api-key': 'YOUR_API_KEY'}
)
print(r.json())

Ruby Examples

# Example posting a image URL:

require 'rest_client'
r = RestClient::Request.execute(method: :post, url: 'https://api.deepai.org/api/search-and-replace', timeout: 600,
    headers: {'api-key' => 'YOUR_API_KEY'},
    payload: {
        'image' => 'YOUR_IMAGE_URL',
        'search_prompt' => 'YOUR_IMAGE_URL',
        'prompt' => '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/search-and-replace', timeout: 600,
    headers: {'api-key' => 'YOUR_API_KEY'},
    payload: {
        'image' => File.new('/path/to/your/file.jpg'),
        'search_prompt' => File.new('/path/to/your/file.txt'),
        'prompt' => File.new('/path/to/your/file.txt'),
    }
)
puts r

Uncrop

Expand your images effortlessly with our AI-powered uncropper: upload your image and watch it intelligently expand, preserving details and enhancing your visual compositions with unparalleled precision!

cURL Examples

# Example posting a image URL:

curl \
    -F 'image=YOUR_IMAGE_URL' \
    -H 'api-key:YOUR_API_KEY' \
    https://api.deepai.org/api/zoom-out 


# Example posting a local image file:

curl \
    -F 'image=@/path/to/your/file.jpg' \
    -H 'api-key:YOUR_API_KEY' \
    https://api.deepai.org/api/zoom-out 

Javascript Examples

// Example posting a image URL:
(async function() {
    const resp = await fetch('https://api.deepai.org/api/zoom-out', {
        method: 'POST',
        headers: {
            'Content-Type': 'application/json',
            'api-key': 'YOUR_API_KEY'
        },
        body: JSON.stringify({
            image: "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 formData = new FormData();
       formData.append('image', this.files[0]);

       const resp = await fetch('https://api.deepai.org/api/zoom-out', {
           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');
(async function() {
       const formData = new FormData();
       const jpgFileStream = fs.createReadStream("/path/to/your/file.jpg"),
       formData.append('image', jpgFileStream);

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

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

Python Examples

# Example posting a image URL:

import requests
r = requests.post(
    "https://api.deepai.org/api/zoom-out",
    data={
        'image': '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/zoom-out",
    files={
        'image': open('/path/to/your/file.jpg', 'rb'),
    },
    headers={'api-key': 'YOUR_API_KEY'}
)
print(r.json())

Ruby Examples

# Example posting a image URL:

require 'rest_client'
r = RestClient::Request.execute(method: :post, url: 'https://api.deepai.org/api/zoom-out', timeout: 600,
    headers: {'api-key' => 'YOUR_API_KEY'},
    payload: {
        'image' => '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/zoom-out', timeout: 600,
    headers: {'api-key' => 'YOUR_API_KEY'},
    payload: {
        'image' => File.new('/path/to/your/file.jpg'),
    }
)
puts r