AI Image Generator
Create an image from text prompt
Choose a model
Choose a style
The selected style is only available to PRO users. Please upgrade or try a different style

See what AI Art other users are creating!
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.
API Docs
Recently generated images:
AI Image Generator API Documentation
Pricing: $5 per 100 API calls, or $5 per 500 for DeepAI Pro subscribers
API Options
grid_size
Pass a string, either "1" or "2"
“2” is the default, which returns a 2x2 grid with 4 images.
Pass “1” to only receive 1 image.
width, height
Pass a string, eg "256" or "768" (default 512)
Use values between 128 and 1536.
Note: values above approximately 700 or below 256 may produce strange outputs.
image_generator_version
Pass a string, either "standard" or "hd" (default standard)
negative_prompt
Pass a string to indicate what you want to be removed from the image
Can be used to enhance image quality and details.
Example negative prompts: bad anatomy,bad proportions, blurry, cloned face, cropped, deformed, dehydrated, disfigured, duplicate, error, extra arms, extra fingers, extra legs, extra limbs, fused fingers, gross proportions, jpeg artifacts, long neck, low quality, lowres, malformed limbs, missing arms, missing legs, morbid, mutated hands, mutation, mutilated, out of frame, poorly drawn face, poorly drawn hands, signature, text, too many fingers, ugly, username, watermark, worst quality.
Frequently Asked Questions
Is commercial use allowed?
Yes, all commercial use is allowed for the generated images.
You can use these images in general for any legal purpose you wish.
Please see our full terms of service here: Terms of Service
Can I use the generated images for NFT?
Yes.
Who owns the output?
The images are considered public domain, that is, they have no owner.
Copyright on output?
The images generated by the AI have no copyright.
Can I get higher resolution or higher quality images?
At this time we don't offer higher quality or higher resolution. What you see is what we have available, which will improve over time.
Is the quality of the images good enough for printing?
In general the quality is good enough for printing smaller images. Larger prints might become very blurry.
AI Image Generator 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);
})()
AI Image Generator 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_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())
AI Image Generator 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
Write here your review about post.