SillyTavern Auto Image Generation With a Text API
This API writes text and does not draw pictures. In SillyTavern it can run the chat and write the image prompts, while a separate image backend renders them.

No card needed. After sign-up, claim $0.50 of free test credit with one click (once per person).
Get API keyWhat the API does and does not do for images
People who search for sillytavern auto image generation usually want one thing: a chat where a picture of the scene appears after each reply without any manual steps. That feature has two halves. One half is a language model that understands the scene and turns it into a short description. The other half is an image model that turns the description into pixels.
This service covers the first half only. It is a hosted, OpenAI-compatible text API with one open-weight model, ID uncensored, run by an independent provider. There is no image generation, no audio, no video and no embeddings. If a page promises that this API will return a PNG, it is wrong. What you get is the chat model for your characters and the prompt writer for whatever image backend you connect.
That split is not a drawback in practice. SillyTavern already keeps the two roles apart: the chat model is configured under API Connections, and the image extension has its own source setting. You pay for text tokens here and for images wherever you render them. The rest of this article shows how to wire the text side so the whole pipeline works.
One rule applies to everything you send: the model is tuned to skip content refusals for lawful adult use, with a hard limit on sexual content involving minors. Fiction and roleplay between adults are fine. Anything involving minors is not, and requests of that kind are outside what the service supports.
Step 1: get a key and some credit
Open the API key page and sign up with Google or with email and password. After sign-up, the key page has a button that claims $0.50 of trial credit. It is one per person, valid for 7 days, and needs no payment. A trial key allows 2 concurrent requests and 60 requests per minute, which is plenty for a single chat window.
When the trial is gone, top up from the same page. This site takes crypto only: USDT on TRC20 or USDC on Base. You can add any whole amount from $20 to $500, with a bonus of 5% from $50, 10% from $100 and 15% from $200. Credit never expires and there is no subscription. The pricing page lists the same numbers.
Before touching SillyTavern, test the key from a terminal. If this works, any later problem is a client setting and not the account.
curl https://api.uncensoredimagegenerator.cc/v1/chat/completions \
-H "Authorization: Bearer YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{"model":"uncensored","messages":[{"role":"user","content":"Say hello in five words."}]}'
A JSON reply with a choices array means the key is live. The response headers include X-Balance-USD, so you can watch your balance without opening the dashboard.
Step 2: connect the chat model in SillyTavern
In SillyTavern, open the plug icon for API Connections. Set the API type to Chat Completion. In the Chat Completion Source list, choose Custom (OpenAI-compatible). Menu wording shifts a little between SillyTavern versions, but the three fields below are the same everywhere.
- Custom Endpoint (Base URL):
https://api.uncensoredimagegenerator.cc/v1. Keep the/v1at the end and do not add/chat/completions. - Custom API Key: the key from the key page. SillyTavern sends it as
Authorization: Bearer. - Model ID:
uncensored. If your version offers a model list, press connect and the list is loaded fromGET /v1/models.
Press Connect. A green status means the request to the models route came back. Send one message to a character to confirm that completions work too.
Two settings are worth checking right away. First, turn on streaming so replies appear as they are written; the API supports server-sent events and sends usage at the end. Second, set the context size. The window is 100,000 tokens for prompt plus reply, so you can raise SillyTavern's context slider far above the usual 8,000 if your character definitions and lorebooks are large. Bigger contexts cost more per message, as the cost section below shows.
Step 3: let the chat model write the image prompt
Now the image half. In the Extensions panel, open the Image Generation extension. Choose a source that you actually have: a local Stable Diffusion web UI, ComfyUI, or a hosted image service. This API is not in that list because it makes no images, and that is expected.
The extension builds each picture prompt from the chat and from a set of prompt templates. In most versions it can use the connected chat model to rewrite the scene into a tag list or a descriptive sentence, and you can edit the prompt before it is sent. That rewrite is a normal chat completion, so it goes to uncensored through the connection you made in step 2. There is nothing else to configure for the text side.
For the automatic behavior, look for the interactive or auto-generation options in the same panel. Depending on your version they trigger an image after a message, after trigger phrases, or on a slash command such as /sd. The manual wand button on a message does the same job on demand. Test with the manual button first. If the prompt that comes back is sensible, switch on the automatic option.
A few habits improve the prompts:
- Keep character appearance in a short fixed block, so the same hair, clothes and setting appear in every picture.
- Ask the model for a single line of comma-separated visual details and nothing else, with no commentary around it.
- Lower temperature for the prompt-writing step. A value around 0.3 to 0.5 keeps the descriptions consistent, while chat replies can stay at 0.8 or higher.
- Set a small
max_tokensfor prompt requests. It is optional on this API, but 150 tokens is enough for a prompt and stops the model from rambling.
The model will describe fiction involving adults without refusing, but it will not describe minors in a sexual way, and neither should your templates.
What a long chat costs
Pricing is $0.15 per 1M input tokens and $0.50 per 1M output tokens. Roleplay is input heavy because SillyTavern resends the character definition, the lorebook entries and the history with every message. Here is the math for a typical turn.
| Case | Input tokens | Output tokens | Cost per call |
|---|---|---|---|
| Chat turn, 8,000 token context | 8,000 | 250 | $0.0012 + $0.000125 = $0.001325 |
| Chat turn, 50,000 token context | 50,000 | 250 | $0.0075 + $0.000125 = $0.007625 |
| Image prompt rewrite | 1,500 | 120 | $0.000225 + $0.00006 = $0.000285 |
A hundred chat turns at 8,000 tokens cost $0.1325. The same hundred turns at 50,000 tokens cost $0.7625, so a very long history is the biggest lever on your bill. If an image prompt is written after every reply, add $0.000285 per turn, which is small next to the chat call itself.
The $0.50 trial credit divides into about 377 turns at the 8,000 token size. Failed or refused requests are not charged, so retries after an error do not eat the balance. Image rendering is billed by whoever runs your image backend, and you should check their current pricing.
Fixing the common errors
Most failures come from a handful of causes.
401 or invalid key
The key was pasted with a trailing space or the wrong field was used. Paste it again into the Custom API Key field and reconnect.
404 or no models found
The base URL is wrong. It must end in /v1. A pasted URL that already ends in /chat/completions also fails.
429 with code concurrency
Too many requests were running at once. This is common in group chats or when the image extension fires a prompt request while a reply is still streaming. A streamed request holds its slot until the stream ends. A trial key has 2 slots and a full key has 8. Wait for the reply to finish, or fund the account to move from trial limits to full limits.
429 with code rate_limited, or a Retry-After header
The first means you passed the requests-per-minute cap, 60 on a trial key and 300 on a full key. The second is a short overload, and the response carries Retry-After: 5. In both cases waiting a few seconds and trying again is the fix.
Replies cut off or very slow
If the context slider is set near the 100,000 token window, the prompt eats the room left for the reply. Leave space for the completion, or trim the history. Details on parameters are in the API documentation.
When this setup is the wrong fit
If you want one service that returns both text and pictures from a single key, this is not it. You would need an image provider as well, and the two bills stay separate. If you only ever want pictures and no chat, the text API gives you nothing. If your need is a large knowledge-base search, note that embeddings are not offered either.
For everything else in SillyTavern, a hosted model with a 100,000 token window, streaming and no content refusals for lawful adult use covers the chat, the narration and the prompt writing. Prompts are not used for training. Pay-as-you-go credit means a quiet month costs nothing. For a second use of the same key, see how per-token text pricing compares with image pipelines.
More guides
Questions and answers
Can this API generate the images inside SillyTavern?
No. It is text only. It can run the chat and write the image prompts, while a separate image backend such as a local web UI renders the pictures.
Which chat completion source should I pick in SillyTavern?
Choose Custom (OpenAI-compatible), set the endpoint to the API base URL ending in /v1, add your key and use the model ID uncensored.
Does automatic image generation cost extra on the text side?
Each prompt rewrite is a normal chat call. A rewrite of 1,500 input and 120 output tokens costs about $0.000285.
Why do I get 429 errors when images are generated automatically?
The image prompt request can run while the chat reply is still streaming, and a trial key allows only 2 concurrent requests. Wait for the stream to end or move to a funded key with 8 slots.
Is the trial enough to test the setup?
Yes. The $0.50 trial credit covers roughly 377 chat turns at an 8,000 token context, valid for 7 days with no payment.
Your key is one form away
Create an account, copy the key, change the base URL. That is the whole setup.
Key points
- The API is text only, so pictures come from an image backend you run or rent elsewhere.
- Connect it in SillyTavern as a Custom (OpenAI-compatible) chat completion source with model ID uncensored.
- The text model can write the image prompt from the recent chat, which is the part automatic image generation needs from an LLM.
- An 8,000 token chat turn costs about $0.0013, so the $0.50 trial credit covers roughly 377 such turns.