Gemma NSFW in SillyTavern: Setup with an API
If you were hoping to run gemma nsfw sillytavern as one setup, here is the practical version: SillyTavern can talk to any OpenAI-compatible endpoint, and this one answers without content refusals for lawful adult fiction. It is not a Gemma model, and the steps below take a few minutes.

Key points
- Use the Chat Completion API type with the Custom (OpenAI-compatible) source, then paste the base URL, key and model ID.
- Base URL: https://api.gemmansfw.top/v1. Model ID: uncensored.
- Set the context size to match your needs up to 100,000 tokens and watch reply length, since output tokens cost more.
- Use is for lawful adult fiction and roleplay; content involving minors is never allowed.
Short version: the five fields to fill in
- Create an account and claim the free trial on the API key page, then copy your key.
- In SillyTavern open the plug icon (API Connections) and set the API type to Chat Completion.
- Set the Chat Completion Source to Custom (OpenAI-compatible).
- Paste
https://api.gemmansfw.top/v1into the custom endpoint field, your key into the API key field, anduncensoredinto the model ID field. - Press Connect. A green status and a model name mean the link works.
Menu names move around between SillyTavern releases, so if a label differs, look for the same idea: an OpenAI-compatible source with an editable base URL. The rest of this article explains what each choice does and how to fix the usual problems.
What you are connecting to, honestly
A note on the name, since people search for it this way. Gemma is an open-weight model family from Google, and some Gemma builds are community-modified to drop refusals. This site does not host Gemma. It hosts a single open-weight model, run by an independent provider, tuned to answer without content refusals for lawful adult use, and it is neither Google's API nor any other vendor's. You select it with the model ID uncensored.
The intended uses are fiction, roleplay and companion-style chat for adults. Keep the text you write in the same spirit. There is one fixed limit that no setting changes: no sexual content involving minors. Character definitions that depict minors in that way are not allowed, and requests that try will not be served.
The endpoint is text only. It does not generate images, voice or embeddings, so SillyTavern features that rely on those (image generation, vector storage with an embedding model) need a separate source. Text chat, streaming and group chats work through the same connection.
Step by step in SillyTavern
1. Get a key
Sign in with Google or with email and password. The trial is one click on the key page: $0.50 of credit, valid for 7 days, no payment details, one per person. Because a trial key is limited to 2 concurrent requests and 60 requests per minute, it is fine for a single chat but will feel tight if you run several windows at once.
2. Choose the source
Under API Connections, pick Chat Completion rather than Text Completion. The OpenAI-style message format is what this endpoint expects. Choose the Custom source. If you do not see it, update SillyTavern; older builds only list fixed vendors.
3. Enter the endpoint
The custom endpoint field wants the base URL, ending in /v1, with no trailing path. SillyTavern adds /chat/completions on its own. Typing the full path is the most common mistake and produces a 404.
4. Enter the model ID
Type uncensored exactly. The Connect button may fetch a model list from GET /v1/models; if so, pick the same name from it.
5. Send a test message
Open any character and say hello. If you get a reply, you are done. If not, see the troubleshooting section below.
Before going into SillyTavern, you can check the key from a terminal. If this works, any failure in the app is a settings problem, not a key problem:
curl https://api.gemmansfw.top/v1/chat/completions \
-H "Authorization: Bearer YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{"model":"uncensored","messages":[{"role":"user","content":"Reply with the single word ready."}],"max_tokens":5}'Settings that matter for roleplay
SillyTavern exposes dozens of sliders. A few have a real effect here.
| Setting | Suggested start | Why |
|---|---|---|
| Context size | 16,000 to 32,000 | The window is 100,000 tokens, but a bigger context costs input tokens on every turn. |
| Max response length | 300 to 600 | Output tokens cost $0.50 per 1M, so long replies add up faster than long history. |
| Temperature | 0.8 to 1.0 | Higher gives more varied prose; lower keeps characters steadier. |
| Top P | 0.9 to 0.95 | Passed through to the model. |
| Streaming | On | Text appears as it is generated, using SSE. |
Frequency and presence penalties are passed through too. If a character keeps repeating a phrase, nudge frequency penalty up a little, in small steps, rather than jumping to a large value, since high penalties make prose odd.
The seed parameter is also passed through. It is handy when you want to compare two prompt wordings under the same sampling, though identical output is not guaranteed in every situation.
Keep the system prompt and the character definition lean. They are resent on every turn, so a 1,500-token definition on a 50-turn chat adds 75,000 input tokens, which is $0.01125 at $0.15 per 1M. That is small money, but it also eats window space you might want for story memory.
What a session costs
Take a long evening of roleplay: 50 turns, an average prompt of 6,000 tokens (character, history and lore), and an average reply of 300 tokens. Input is 300,000 tokens, which is $0.045. Output is 15,000 tokens, which is $0.0075. The session costs $0.0525, about five cents.
The trial credit of $0.50 would cover roughly nine such sessions: $0.50 / $0.0525 is about 9.5. After that you can top up with any whole amount from $20 to $500, paid in crypto (USDT on TRC20 or USDC on Base). A $50 top-up gets a 5% bonus, so it adds $52.50 of credit. Credit never expires, and failed or refused requests are not charged. Full details are on the pricing page.
Fixing common errors
- 401 or "invalid key". The key is wrong or has stray spaces. Paste it again. The header sent is
Authorization: Bearer your-key. - 404 on connect. The endpoint has an extra path. It should end at
/v1. - 429 with code
concurrency. Too many requests at once. A streamed reply holds its slot until it finishes, so pressing Regenerate or Swipe repeatedly can trip this. Wait a few seconds. A trial key allows 2 at a time, a full key 8. - 429 with code
rate_limited. More than 60 requests per minute on trial or 300 on a full key. Group chats with auto-reply loops can do this. - 429 with a
Retry-After: 5header. A brief overload. Retry after five seconds. - Replies cut off. Raise the max response length in SillyTavern.
- Chat gets slow late in a long story. History is large. Lower the context size, use the summary feature, or start a new chat with a recap.
If a problem persists, note the X-Request-Id response header and send it with your question via the support page. For the parameter reference, see the API docs.
A quick word on privacy and data
Prompts sent to this endpoint are not used for training. Your characters and chat history live in your own SillyTavern folder, and only the messages for the current request are sent to the API. If you share your install with others, treat the key like a password and keep it out of screenshots. Anyone holding the key can spend your credit, and the X-Balance-USD header on each response shows what is left, which makes unexpected spending easy to spot.
The article Gemma 4 API, how it works and alternatives explains how this endpoint relates to Gemma if you want the background.
More guides
Questions and answers
Does SillyTavern support Gemma NSFW directly?
SillyTavern connects to any compatible backend, not to a specific model. You can point it at a local Gemma build or, as here, at a hosted OpenAI-compatible endpoint with the model ID uncensored.
Which API type should I choose in SillyTavern?
Chat Completion with the Custom (OpenAI-compatible) source. Enter the base URL ending in /v1, your key, and the model ID uncensored.
How large can my chat context be?
Up to 100,000 tokens, counting the prompt and the reply together. A smaller context such as 16,000 to 32,000 is cheaper and usually enough for roleplay.
Is there a content limit?
The model answers without content refusals for lawful adult use, but sexual content involving minors is never allowed.
Can I test it for free?
Yes. Claim $0.50 of trial credit with one click on the API key page after sign-up. It is valid for 7 days and one per person.
Your key is one form away
Create an account, copy the key, change the base URL. That is the whole setup.