EN ▾
Get API key
per 1M input tokens
$0.15
Output tokens / 1M
$0.50
token context
100,000
trial credit
$0.50
requests per minute
300

SillyTavern Image Prompt Templates for a Text LLM

SillyTavern does not draw anything itself. It asks a text model to write the picture description, then hands that text to an image backend. Here are templates that make the first half of that job reliable.

Updated

Isometric illustration of chat bubbles flowing into a projector that casts an empty canvas

Key points

  • The text model writes the image prompt; a separate image backend renders it.
  • Short, strict templates beat long ones: fixed fields, one line of output, no commentary.
  • Low max_tokens and a stop sequence keep every reply usable as a prompt.
  • Each prompt call costs a fraction of a cent at $0.15 and $0.50 per 1M tokens.

How the image step works in SillyTavern

People searching for sillytavern image prompt templates usually want one thing: a block of instruction text that turns a chat into a clean image description. SillyTavern has an image generation extension. When you trigger it, the extension sends instructions to your connected chat model, receives a text prompt, and passes that prompt to whichever image backend you configured (a local Stable Diffusion install, a hosted image service, and so on).

That split matters for this site. The API here is text only. It will not return pictures, and it has no embeddings or fine-tuning either. What it does well is the first stage: reading a long roleplay, deciding what the current moment looks like, and writing a compact description. A model tuned to answer without content refusals for lawful adult use will not stall on a dark or mature fiction scene and return an apology instead of a prompt, which is the usual failure with stricter models.

If you still need an image backend, our Flux integration notes cover how that side can be wired. The rest of this article stays on the text side: connection, templates, settings and the mistakes that waste tokens.

Connect the text model first

Before touching templates, make sure SillyTavern talks to the API. In the API connections panel choose Chat Completion, then the custom OpenAI-compatible source. Menu labels shift between versions, so match them by meaning rather than exact wording.

  1. Create a key on the API key page. New accounts can claim $0.50 of trial credit with one click, valid for 7 days and needing no card.
  2. Set the endpoint (base URL) to https://api.uncensoredimagegenerator.top/v1.
  3. Paste the key. SillyTavern sends it as Authorization: Bearer <key>.
  4. Enter the model ID uncensored if the field is free text, or press the connect button and pick it from the list that GET /v1/models returns.

You can verify the same thing outside SillyTavern in one command:

curl https://api.uncensoredimagegenerator.top/v1/models -H "Authorization: Bearer YOUR_KEY"

If that returns JSON with the model listed, the connection side is fine and any later problem is in your template or settings. The quickstart has the same check with a chat request.

Three templates that work

The extension lets you edit the instruction used for each kind of shot. Whatever the field is called in your build, the content below goes into it. Each template has the same skeleton: a role line, a list of what to extract, a format rule and a hard length limit. Placeholders in curly braces are filled by SillyTavern or by you.

Character portrait

Use this when you want the current look of one character: face, hair, clothes, expression.

Write one image prompt describing {{char}} as they look right now in the chat.
Include, in this order: age range (adult characters only), build, hair, eye colour, clothing, expression, pose, lighting.
Use plain comma-separated phrases, no sentences.
Do not mention names, the story, or anything that is not visible.
Output the prompt only, on a single line, 60 words at most.

Scene snapshot

This one reads the last few messages and freezes a single moment.

Read the last message of the chat and write one image prompt that captures the single most visual moment in it.
Name who is in frame, where they stand relative to each other, the setting, time of day and mood.
Keep every character an adult. Keep the description non-explicit; describe composition, not actions in detail.
One line, comma-separated phrases, 70 words at most, no commentary.

Background only

Good for visual novel style setups where the character sprite and the backdrop are separate layers.

Describe only the location where the current scene takes place. No characters, no people.
Cover architecture or terrain, key objects, weather, time of day, colour palette and camera angle.
One line, comma-separated phrases, 50 words at most. Output the prompt only.

Notice what the templates do not contain: no persona backstory, no long list of style tags and no request for the model to explain itself. Every extra instruction is another place where the model can drift, and every extra word is paid for on each call.

Why the fixed output rules matter

An image backend treats your text literally. If the model replies with "Sure, here is a prompt:" the backend will try to draw that sentence. Three habits prevent it.

  • State the output shape. "Output the prompt only, on a single line" removes most preambles.
  • Cap the length twice. Say the word limit in the template and set max_tokens in the request. A cap of 120 tokens fits a 70-word prompt with room to spare. If the cap cuts a prompt mid-phrase, raise it a little rather than removing it.
  • Add a stop sequence. The API passes stop through, so a newline stop turns "one line" from a request into a rule.

Here is the same call made directly, which is also the quickest way to test a template before pasting it into SillyTavern:

import os
from openai import OpenAI

client = OpenAI(base_url="https://api.uncensoredimagegenerator.top/v1", api_key=os.environ["API_KEY"])

template = (
    "Describe only the location where the current scene takes place. No people. "
    "One line, comma-separated phrases, 50 words at most. Output the prompt only."
)
chat_tail = "The lighthouse door groaned open and salt wind pushed the lamp flame sideways."

resp = client.chat.completions.create(
    model="uncensored",
    messages=[
        {"role": "system", "content": template},
        {"role": "user", "content": chat_tail},
    ],
    temperature=0.7,
    max_tokens=120,
    stop=["\n"],
)
print(resp.choices[0].message.content)

The reply from a run like this is a single line of descriptive phrases. If you get a sentence or a label, tighten the format rule. If two runs produce nearly identical prompts and you want variety, raise temperature; if they drift from the scene, lower it. Setting seed makes a good result repeatable while you tune.

What each prompt costs

Image prompt calls are small, so the bill is small. Pricing is $0.15 per 1M input tokens and $0.50 per 1M output tokens, pay as you go from prepaid credit. Two worked cases:

CaseInputOutputCost per callPer 1,000 calls
Short chat tail1,500 tokens100 tokens$0.000225 + $0.00005 = $0.000275$0.275
Long context sent6,000 tokens100 tokens$0.0009 + $0.00005 = $0.00095$0.95

The input side dominates, which gives you the main saving: do not send the whole chat. The scene and portrait templates only need the last few messages plus a short character card. The 100,000-token window is there when you need it, not something to fill on every image call. Failed or refused requests are not charged, and credit never expires, so a $20 top-up (the minimum) goes a very long way for this kind of use. Current rules and bonus tiers are on the pricing page.

Keeping the character consistent across shots

A single prompt is easy. A series is harder, because each call is a fresh task and the model has no memory of how it described a character an hour ago. The fix is to make the appearance part of the input instead of hoping it is remembered. Add a short, fixed appearance line to the character card, written the way you want it to appear in prompts: age range, hair, eyes, signature clothing, one distinctive detail. Then tell the template to copy that line first and add only what changes, such as expression, pose and setting.

The same idea works for style. If your image backend responds well to a certain ending, for example a lighting or lens phrase, have the template append it verbatim or add it in the extension's own prefix field, not through the model. Anything that must be identical every time should come from fixed text, and anything that should vary from the model. That division also saves output tokens, since the model writes only the changing part.

Common problems and fixes

  • The prompt contains story text or names. The model is describing the chat instead of the picture. Add "Do not mention names or events, only what is visible" and keep the template in the system role rather than appended to the chat.
  • Prompts get longer over a session. Context from earlier image calls can leak in if you keep them in history. Send each image request as its own short conversation, not as another turn of the roleplay.
  • HTTP 429 with concurrency. A full key allows 8 requests at once and 300 per minute; a trial key allows 2 and 60. If you queue several images while a long reply is still streaming, the streamed request holds its slot until it ends. Space the calls or retry after the Retry-After delay.
  • Characters look inconsistent between shots. Put a fixed appearance line in the character card and have the template copy it first. Consistency comes from repeated fixed text, not from the model remembering.
  • Content rule. The hard limit applies here as everywhere: no sexual content involving minors, and every character in your templates should be explicitly adult. Mature fiction between adults is a lawful adult use; the templates above simply keep descriptions non-explicit so they suit most image backends.

Once a template behaves, save it as a preset so you can switch between portrait, scene and background without retyping. Test changes with the direct call above before judging them inside a long chat, because a long chat adds noise you cannot see.

Questions and answers

Does this API generate the images in SillyTavern?

No. It is a text-only API. It writes the image prompt, and a separate image backend that you connect in SillyTavern renders the picture.

Which model ID do I enter in SillyTavern?

Use uncensored with the base URL https://api.uncensoredimagegenerator.top/v1 and your key as a Bearer token. The model list endpoint returns the same ID.

How long should an image prompt be?

Between 40 and 80 words suits most backends. State the limit in the template and set max_tokens to roughly twice the word limit so a prompt is never cut mid-phrase.

Can I test templates for free?

New users can claim $0.50 of trial credit on the API key page. At about $0.0003 per short prompt call, that covers well over a thousand test prompts.

Your key is one form away

Create an account, copy the key, change the base URL. That is the whole setup.