DeepAI API
Simple AI APIs for image generation, super-resolution and text tasks.
What it does
DeepAI offers a set of simple one-call AI endpoints — text-to-image generation, image editing and upscaling, background removal, colourisation, a chat/text generator and various analysis models. Each model is a single POST that returns a result URL or JSON.
Base URL
Authentication
Register at deepai.org and copy your key from the dashboard. Send it as the api-key header. There is a small free trial allowance; after that it is pay-as-you-go (a minimum top-up, then a few cents per call depending on the model).
Code examples
curl -X POST https://api.deepai.org/api/text2img \ -H "api-key: $DEEPAI_API_KEY" \ -F text="a cabin in a pine forest, morning fog"
import requests
r = requests.post(
"https://api.deepai.org/api/text2img",
headers={"api-key": KEY},
data={"text": "a cabin in a pine forest, morning fog"},
timeout=60)
print(r.json()["output_url"])Rate limits & quotas
No published per-minute rate limit; the constraint is your prepaid balance and each model’s per-call price. Generated image URLs are hosted by DeepAI — download and re-host anything you need to keep.
Key response fields
| output_url | URL of the generated or processed image |
| output | Text output for language models |
| id | Request id, useful for support |
| err | Present only when the call failed |
Common errors
| 401 / "Missing api-key" | Header not sent or wrong name (api-key). |
| 402 | Out of credit — top up. |
| 400 | Missing required form field (e.g. text or image). |
| 500 | Model error — retry once, then try a different input. |
When to use it (and alternatives)
Handy for quick, cheap, no-frills image tasks and demos where you don’t need fine control. For production-grade generation and editing use Stability AI or Replicate.
FAQ
How long are DeepAI output images available?
The hosted URLs are not guaranteed to be permanent. If you need to keep an image, download it from output_url and store it yourself.
Is there a free tier?
There is a limited free trial. Continued use requires a minimum account top-up, then you are charged per call by model.
Can I pick the image size or model?
Some endpoints accept extra form parameters (grid size, image dimensions, style). Check the individual model’s docs page — options vary per endpoint.
New to APIs?
Short guides for working with this API — and any other.
🛠️ Handy LarzOS tools
Free tools to help you work with this API.
Prompt ImproverLearn Prompt Engineering