API Directory › 🤖 AI & Machine Learning › DeepAI
API KeyHTTPSCORS

DeepAI API

Simple AI APIs for image generation, super-resolution and text tasks.

Auth
API Key
HTTPS
Yes
CORS
Yes
Open DeepAI docs ↗

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

https://api.deepai.org/api

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
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"
Python
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_urlURL of the generated or processed image
outputText output for language models
idRequest id, useful for support
errPresent only when the call failed

Common errors

401 / "Missing api-key"Header not sent or wrong name (api-key).
402Out of credit — top up.
400Missing required form field (e.g. text or image).
500Model 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

Related AI & Machine Learning APIs

← Back

More AI & Machine Learning APIs · All 196 APIs