Skip to main content
SillyTavern is a self-hosted chat interface for roleplay and character chats. deAPI adds two things to it:
  • Images: the open-source deAPI Images extension generates pictures in a chat. SillyTavern’s built-in OpenAI image source always calls api.openai.com, so the extension is needed.
  • Voice: SillyTavern’s OpenAI Compatible text-to-speech provider works with deAPI as it is. No extension is needed.
Both were checked by sending deAPI the exact requests that the extension and SillyTavern’s TTS provider send.

Prerequisites


Image generation

  1. In SillyTavern, open Extensions → Install extension and paste:
  2. Open Extensions → deAPI Images.
  3. Paste your deAPI key into API key and click Test key.
  4. Pick a Model and a Size. The defaults, ZImageTurbo_INT8 at 512 × 512, work out of the box.
To make a picture, type the command in the chat box:
The image is posted to the chat. You can also open the wand menu and choose deAPI image, which asks for a prompt and fills in the last message. The command returns the image URL, so it also works in STscript. Prompt prefix is added before every prompt, which is handy for a fixed style such as anime style, soft light.

Text-to-speech

  1. Open Extensions → TTS and set the provider to OpenAI Compatible.
  2. Set Provider Endpoint to:
  3. Set Model to Kokoro.
  4. Set Available Voices to the voices you want to assign, e.g. af_nova,af_sky,am_onyx,bm_fable.
  5. Click the key button next to the endpoint, paste your deAPI key and save.
  6. Assign a voice to each character in the voice map below.
SillyTavern sends the request from its server and asks for MP3, which is the format Kokoro returns. In testing, a short line took 5 to 10 seconds.
Kokoro voices are tied to one language, set by the voice prefix: af_ and am_ are American English, bf_ and bm_ British English. Pick voices that match the language of your chats. The OpenAI names alloy, echo, fable, onyx, nova and shimmer also work and map to English voices. The full list is in Text-to-speech.

Privacy

The extension stores your key in your SillyTavern settings and sends it only to oai.deapi.ai. Its requests carry an X-Deapi-Source: sillytavern header, so deAPI can count traffic from the extension. Nothing about you or your chats is added. Generated images are saved with SillyTavern’s user images, like those from the built-in Image Generation extension.

Troubleshooting


Next steps

deAPI Images extension

Source code and issues

OpenAI Compatibility

Every endpoint, model and field the OpenAI-compatible API supports