Image, video, speech and transcription backends for Hermes Agent on deAPI, a GPU inference API for open models (FLUX.2 Klein, Z-Image, Qwen Image Edit, LTX-2.5, Kokoro, Whisper, …) plus partner-served ones.
One plugin, four backends, all named deapi:
| Hermes tool | What it does | deAPI endpoint |
|---|---|---|
image_generate |
text-to-image | POST /api/v2/images/generations |
image_generate with image_url |
image editing (the image and any references are uploaded) | POST /api/v2/images/edits |
video_generate |
text-to-video | POST /api/v2/videos/generations |
video_generate with image_url |
image-to-video (the image is the first frame) | POST /api/v2/videos/animations |
text_to_speech (tts.provider: deapi) |
speech with preset voices | POST /api/v2/audio/speech |
speech-to-text (stt.provider: deapi) |
transcription of voice messages and voice mode | POST /api/v2/audio/transcriptions |
Every deAPI generation is an asynchronous job: the plugin submits it, polls
GET /api/v2/jobs/{request_id} until it is done, then saves the result: images and videos under
$HERMES_HOME/cache/generated/ with Hermes's own helpers (result URLs expire), speech to the
file Hermes asks for. A transcript comes back inside the job.
deAPI's chat models (DeepSeek, Qwen, Kimi, GLM, Seed, GPT-6 Luna, Hunyuan) are a separate plugin
in this repository, deapi-provider: a Hermes model provider on
deAPI's OpenAI-compatible API (installation below and in its README).
Upgrading from 0.2? The old
deapi-imageanddeapi-videoplugins are now one plugin,deapi. Remove the old ones first:hermes plugins remove deapi-imageandhermes plugins remove deapi-video.
hermes plugins install deapi --enableHermes 0.22.0 to 0.23.0 cannot read the current online catalog (it outgrew their size limit) and
only know the entries they shipped with. If the installer says deapi is not in the catalog,
install from GitHub: hermes plugins install deapi-ai/hermes-plugin-deapi --enable. The chat
plugin installs the same way: hermes plugins install deapi-provider --enable, or
hermes plugins install "https://github.com/deapi-ai/hermes-plugin-deapi#deapi-provider" --enable.
Create an API key at app.deapi.ai/settings/api-keys and give it to Hermes as
DEAPI_API_KEY (the install prompt asks for it, or add it to the .env of your Hermes home).
Then pick the backend:
hermes tools # Image Generation → deAPI, Video Generation → deAPI, Text-to-Speech → deAPIor in config.yaml (speech-to-text is set here):
image_gen:
provider: deapi
video_gen:
provider: deapi
tts:
provider: deapi
stt:
provider: deapiEach backend is used only where you select it, so you can take, say, just speech-to-text from deAPI and keep your other providers.
Models come from GET /api/v2/models for your key, so the list always matches your plan and
new models show up without an update. The picker in hermes tools shows them; own-fleet models
are listed first, partner-served models (billed at the partner's price) after.
Which model a call uses:
- Image:
image_gen.modelwhen it is a deAPI model id →image_gen.deapi.model→ the first own-fleet text-to-image model matching FLUX.2 Klein, then FLUX. An edit request with a text-only model uses an editing model from the catalog instead and says so in the result'snote. - Video:
video_gen.model→video_gen.deapi.model→ the first own-fleet LTX model.
A model id that is not in your catalog is never sent: the plugin falls back to the automatic
choice and explains it in note.
image_gen:
provider: deapi
deapi:
model: Flux1schnell # optional; any id from `hermes tools` or GET /api/v2/models
timeout: 300 # optional, seconds to wait for a job (default 300)
video_gen:
provider: deapi
deapi:
model: Ltx2_5_22B_Dist_INT8
timeout: 900 # default 900The speech backend offers the models of your plan that have preset voices (Kokoro, Chatterbox, Qwen3-TTS CustomVoice, …). Voice cloning and voice design models are not offered, because Hermes passes no reference recording or voice description to a speech backend.
- Model:
tts.modelwhen it is a deAPI model with preset voices →tts.deapi.model→ Kokoro, else the first own-fleet speech model. - Voice:
tts.voicewhen the model has it →tts.deapi.voice→ the model's default voice. A voice can be given by id (af_nova,bm_george) or by name (nova,George), so OpenAI voice names such asnova,echo,onyxandfablepick the matching Kokoro voice. A voice the model does not have is skipped (Hermes logs it), not sent. - Language: the voice's own language (Kokoro
bf_*voices speak British English), ortts.deapi.language(a language id such asen-gborpl, or its name) to choose it yourself. The voices of each model and language are inGET /api/v2/models. - Speed:
tts.speedor thespeedthe agent asks for, clamped to the model's range (Kokoro 0.5–2; most other models speak at 1 only). - Format: deAPI models currently produce MP3. When
tts.output_formatasks for another format, the file is written as.mp3and Hermes is given that path. For voice bubbles on Telegram, WhatsApp, Signal and the like, Hermes converts the MP3 to Opus withffmpeg(when it is installed); settts.deapi.voice_compatible: falseto always send a regular audio file. - Text length: each model has a character limit per request (Kokoro 10,000, Qwen3-TTS 5,000,
Chatterbox 2,000). Hermes splits long replies into chunks of 4,000 characters for a plugin
backend; for a model with a lower limit set
tts.deapi.max_text_lengthto it. Chatterbox and Qwen3-TTS also need at least 10 characters.
tts:
provider: deapi
voice: nova # optional; shared by all providers
speed: 1.0 # optional
deapi:
model: Kokoro # optional; any speech model id from `hermes tools`
voice: bf_emma # optional; used when tts.voice is not a voice of the model
language: en-gb # optional
timeout: 180 # optional, seconds to wait for a job (default 180)
# max_text_length: 2000 # for Chatterbox
# voice_compatible: false # send audio files instead of voice bubblesStreaming speech (sentence-by-sentence PCM) is not offered: deAPI returns a finished file.
With stt.provider: deapi, Hermes sends voice messages and voice-mode recordings to deAPI and
gets the text back. The default model is Whisper Large V3 CT2, which follows the language hint;
Whisper Large V3 auto-detects the language and ignores the hint.
- Language:
stt.deapi.language, elsestt.language(en,pl,en-US→en). Without one, deAPI detects the language. - Files: the formats Hermes passes (OGG/Opus voice notes, MP3, WAV, WebM, FLAC, AAC, M4A, MP4), up to 20 MB of audio (50 MB for MP4), uploaded once per recording.
- Vocabulary prompts (
stt.prompt) are not used: deAPI's transcription takes no prompt. - Silence gives an empty transcript, not an error.
stt:
provider: deapi
deapi:
model: WhisperLargeV3Ct2 # optional (default)
language: pl # optional
timeout: 300 # optional, seconds to wait for a job (default 300)Live dictation (stt.streaming) is not offered; recordings are transcribed as files.
deAPI publishes per-model limits (sizes, size grid, pixel budget, frames, fps, steps) and defaults. The plugin derives every request from the selected model's card:
- Image size:
landscape3:2,square1:1,portrait2:3 at the model's default long side, scaled into its limits and snapped to its size grid. - Video size: the requested aspect ratio with the requested resolution as the short side
(
720p16:9 → 1280×720), scaled down to the model's pixel budget and snapped to its grid. - Duration: frames = seconds × the model's fps, clamped to the model's frame range. Without a duration the model's default clip length is used.
- Steps: the model's default where the model takes steps. A seed is always sent (random unless you give one) and is returned in the result.
- Negative prompt (video): sent only to models that support it.
Successful results include request_id, the size used, and cost_usd (with
cost_is_estimate) as reported by deAPI for that job.
Image, video and transcription errors come back with an error_type: auth_error, insufficient_balance,
key_limit_exceeded, rate_limited, invalid_request (with deAPI's field messages),
job_failed (with deAPI's failure reason, whether a retry may help and whether the charge was
refunded), timeout and unknown_state. Speech errors are raised with the same messages, and
Hermes reports them as a failed text_to_speech call.
A submit is never sent twice. Only a 429, which deAPI returns before it accepts a job, is
retried. If the connection drops after a submit, or a job outlives the timeout, the error says
so and gives the request_id: the job may still run and be billed, so check the dashboard
before trying again.
- Network: prompts, source images, the text to speak, the recordings to transcribe and the
API key go to
api.deapi.aionly. Image URLs you pass as sources are downloaded by the plugin through Hermes's SSRF-guarded client, because deAPI takes source images as uploads. Result files are downloaded from deAPI's result URLs without the key. - Reads: local image files you pass as sources (a file is read in full only when its header is a PNG, JPEG, GIF, BMP or WebP image header, so no other kind of file can be uploaded), and the audio file Hermes hands to the speech-to-text backend.
- Writes: generated images and videos under
$HERMES_HOME/cache/generated/through Hermes's helpers, and speech to the output file Hermes chooses. The model catalog is cached in memory only (10 minutes, keyed by a hash of the key). - Credentials:
DEAPI_API_KEY, read withagent.secret_scope.get_secret; never logged or put in error messages. - Cost: every generation, every spoken reply and every transcription is billed to your deAPI
account. With
tts.provider: deapieach spoken reply is a paid request; withstt.provider: deapi, each voice message is. - No telemetry, shell commands, background processes, extra Python dependencies or self-updating code.
deAPI also has an OpenAI-compatible API, but the native API v2 fits Hermes's backends better: its model list carries each model's limits and defaults (so sizes, clip lengths, voices and text limits can be fitted per model), it lists every model on the plan including partner-served ones, it reports the price and failure reason of each job, and image-to-video takes the first frame directly.
The tests need a Hermes Agent checkout (the providers subclass its ABCs) and use a fake HTTP layer; nothing touches the network.
HERMES_AGENT_DIR=/path/to/hermes-agent python -m pytest
ruff check .
hermes plugins validate . --install-deps
hermes plugins validate deapi-provider --install-depsCI (.github/workflows/tests.yml) runs the same steps against the current Hermes Agent
main and against v0.22.0, the oldest supported release, on every push and pull request, and
weekly. Security reports: see SECURITY.md.
MIT