canonical: https://jentic.com/apis/deepai.org/deepai

# DeepAI API

DeepAI is a multi-model AI provider whose v1 API exposes five vision endpoints: text-to-image generation, background removal, photo editing, image colorization, and torch-srgan super resolution. Each endpoint accepts a single POST and returns the generated or transformed image synchronously, which keeps integration straightforward for one-shot creative tasks. Authentication is a single api-key header. The surface is intentionally narrow - one endpoint per model - making it easy to wire up without orchestration.

## For AI agents

Generate images from text, remove backgrounds, colorize photos, edit images by prompt, and run super-resolution upscaling through DeepAI's five-model vision API.

## Scope

Does not handle text generation, audio transcription, or video models - use for DeepAI vision tasks (generation, background removal, colorization, editing, super resolution) only.

## Capabilities

- Generate an image from a text prompt at /text2img
- Remove the background from an uploaded image via /background-remover
- Edit an image by natural-language instructions through /image-editor
- Colorize a black-and-white photo with /colorizer
- Upscale and sharpen an image using torch-srgan super resolution

## Use cases

### Marketing creative generation from copy

Marketing workflows that already have ad copy can pass the headline straight to /text2img and produce candidate visuals in seconds, then run /torch-srgan on the chosen image for higher resolution and /background-remover to drop it onto a brand template. The synchronous, one-shot response per endpoint suits ad-iteration loops where dozens of variants are evaluated quickly.

Example prompt: POST /text2img with the headline as the text prompt, take the returned image URL, then POST /torch-srgan to upscale it to ad-ready resolution.

### Restoring and re-publishing archive imagery

Editorial teams handling historical archives can run /colorizer to add colour to monochrome scans and /torch-srgan to recover lost detail. Each is a single POST returning the processed image URL, so the workflow can scale across thousands of archive items by simply iterating the source list and storing the outputs.

Example prompt: POST /colorizer with each archive image URL, then POST /torch-srgan on the result and store both URLs alongside the original record.

### On-demand product photo cleanup

E-commerce listings that arrive with cluttered or low-resolution photos can be cleaned in two calls: /background-remover for a transparent-background asset, then /torch-srgan to push the resolution up. The synchronous responses make this viable inside a request-time admin tool, not just a batch job.

Example prompt: POST /background-remover with the source URL, then POST /torch-srgan on the result and update the product image field with the final URL.

### AI agent generating visuals through Jentic

An agent producing creative for a campaign can search Jentic for 'generate an image from text' and call DeepAI without ever holding the api-key. Because each model is a separate endpoint, the agent can compose multi-step pipelines (generate, then upscale, then remove background) with three discrete Jentic executions and predictable schemas.

Example prompt: Search Jentic for 'generate an image from text', execute /text2img with the prompt, then chain /torch-srgan and /background-remover as needed.

## Key endpoints

| Method | Path | Description |
| --- | --- | --- |
| POST | /text2img | Generate an image from a text prompt |
| POST | /background-remover | Remove the background from an image |
| POST | /image-editor | Edit an image with a natural-language instruction |
| POST | /colorizer | Colorize a black-and-white photo |
| POST | /torch-srgan | Upscale and sharpen with super resolution |

## Key resources

- **Images** — Vision models for generation, background removal, colorization, editing, and super resolution
- **Text** — Text-to-image generation that takes a natural-language prompt

## Why Jentic

- **Setup:** Wiring the DeepAI API by hand means learning its api-key header and mapping each vision model to its own path, from text2img to background-remover to torch-srgan. Through Jentic you install once, import the DeepAI API from the API Directory, store the API key once, and your agent calls it.
- **Permission scoping:** DeepAI carries the image or prompt in the request body rather than as a resource id in the URL path, so limit the agent to the operations it needs, such as generating an image or colorizing a photo. Because you pick the operations, the agent runs only the vision tasks you grant.
- **Credential handling:** Your DeepAI api-key is stored once, encrypted, by your own Jentic One instance and set in the header at execution time. It never enters the agent's prompt, logs, or context.
- **Discovery method:** Agents search Jentic by intent such as 'generate an image from text' or 'colorize a black-and-white photo', and Jentic returns the matching DeepAI operation with its input schema so the agent calls the right endpoint without learning each model's path by hand.

## Related APIs

- **OpenAI API** — Includes DALL-E for text-to-image alongside language and audio models.
- **Stability AI API** — Stable Diffusion-based image generation with fine-grained control parameters.
- **Replicate API** — Run thousands of community-hosted vision and language models.
- **remove.bg API** — Specialist background removal with high-quality alpha cutouts.

## FAQ

### What authentication does the DeepAI API use?

DeepAI uses an API key passed in the api-key request header on every endpoint. Through Jentic the key is held in the encrypted vault and applied at execution time, so the raw key never enters the agent's prompt or response.

### Can I run text-to-image generation with DeepAI?

Yes. POST /text2img with a text prompt and DeepAI returns a generated image URL synchronously. There is one endpoint per model, so this is a one-shot call rather than a job-and-poll flow.

### How do I upscale an image with DeepAI?

POST /torch-srgan with the source image and DeepAI returns a higher-resolution version using torch-srgan super resolution. Pair with /background-remover or /colorizer when the workflow needs more than just upscaling.

### What are the rate limits for the DeepAI API?

The OpenAPI spec does not document explicit rate limits. Each endpoint is a synchronous POST, so for batch creative generation, fan out client-side rather than chaining sequentially to keep wall-clock time reasonable.

### How do I generate an image through Jentic?

Run pip install jentic, search for 'generate an image from text', and Jentic returns the /text2img operation with its input schema. Load it, supply the prompt, and execute. The response includes the URL of the generated image, ready to download or pass to a downstream tool.

### Does DeepAI offer language models or audio APIs in this spec?

Not in this OpenAPI spec. The five endpoints documented here are vision models: text-to-image, background removal, image editor, colorizer, and super resolution. For text generation or audio, choose a different provider rather than expecting it from this surface.

### Can I limit what my agent is allowed to do with the DeepAI API?

Yes. Because Jentic One is self-hosted, you run it yourself and your own rules decide which of DeepAI's five vision operations the agent may call. You can grant only the endpoints a given agent needs, for example /text2img for text-to-image generation and /colorizer for photo colorization, while withholding /background-remover, /image-editor, or /torch-srgan. Since DeepAI carries the image or prompt in the request body rather than as a resource id in the path, scoping happens at the operation level, and the agent runs only the vision tasks you grant.
