deAPI has no chat models in this plugin. Text features, such as title or excerpt generation, keep using your other AI providers.
What it adds
The plugin lists only the models available to your deAPI account. Transcription, music generation and the other deAPI endpoints are not part of the plugin, because the AI Client has no matching capability for them yet.
Prerequisites
- WordPress 7.0 or later. The plugin loads on WordPress 6.9, but does nothing without the AI Client.
- PHP 7.4 or later
- A deAPI account with credits. deAPI charges per request; see Pricing.
- A deAPI API key from the deAPI Dashboard. A key with the API role is enough. See API Keys.
Install and connect
- In the WordPress admin, open Plugins, add a new plugin, search for AI Provider for deAPI, then install and activate it.
- Go to Settings → Connectors and find deAPI.
- Paste your API key and save. WordPress checks the key with deAPI when you save it.
DEAPI_API_KEY environment variable or a constant in wp-config.php:
Try it with the AI plugin
The plugin has no screens of its own. To see deAPI at work, use a plugin built on the AI Client, such as the AI plugin from the WordPress AI Team:- Install and activate the AI plugin.
- Under Settings → AI, turn on Image Generation and Editing.
- Open Media → Generate Image, type a prompt and generate. The image comes from deAPI.
- To change a generated image, refine it with a text instruction. deAPI edits it with FLUX.2 [klein].
Use it from code
Every call goes through the AI Client. Namedeapi and the model in the model preference.
WP_Error when the request fails.
Images
deAPI waits for the GPU job to finish before it answers, so an image call takes several seconds. The plugin allows up to 5 minutes per request. In testing, a landscape image from FLUX.1 [schnell] took 24 seconds and an edit with FLUX.2 [klein] took 16 seconds.
Video
A video call blocks until the MP4 is ready. The plugin checks the job every 5 seconds and waits up to 10 minutes.
Speech
Output is always MP3. In testing, two sentences with Kokoro took 5 seconds. Voice lists are in Text-to-speech.
Embeddings
Bge_M3_FP16 returns 1024-dimensional vectors. It is listed when the site’s AI Client supports embeddings, which the plugin’s listing puts at WordPress 7.2 or later.
What the plugin sends
The plugin talks to deAPI’s OpenAI-compatible endpoint athttps://oai.deapi.ai/v1. Nothing is sent until an API key is configured.
- When you save the key, and when the AI Client needs the model list, the plugin sends the key to
/v1/models. - When a plugin asks the AI Client for an image, an edit, a video, speech or embeddings and deAPI is selected, the plugin sends the key, the prompt or input text, any source images and the requested options to the matching endpoint.
- Generated images can come back as links to
results.deapi.ai, which the AI Client may download.