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 Image Editor
AI Characters


Note: Only public submissions need to be reviewed.

Pricing
APIs

AI Image Generator

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

Yes, this is the one you've been waiting for. This text to image generator uses AI to understand your words and convert them to a unique image each time. Like magic.

This can be used to generate AI art, or for general silliness.

Don't expect the quality to be photorealistic, however. You would need a really really big AI to do that, and have you priced those lately?

If you can't think of something, try "Balloon in the shape of X" where X is something you wouldn't find in balloon form.

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

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

Image Colorizer

Colorize black and white images or videos using the image colorizer. Add color to old family photos and historic images, or bring an old film back to life with colorization. This image colorization API is a deep learning model that has been trained on pairs of color images with their grayscale counterpart. After hours of training, the models learns how to add color back to black and white images.

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

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