Qwen SillyTavern Settings for an OpenAI-Compatible API
The qwen sillytavern settings that matter are few: a Custom (OpenAI-compatible) chat completion source, the base URL with /v1, your key, the model ID uncensored, and a context size you can afford. This page walks through each field and gives starting sampler values.
Updated
Key points
- Use Chat Completion, source Custom (OpenAI-compatible), endpoint https://api.qwennsfw.com/v1 and model uncensored.
- The window is 100,000 tokens, but a 24k to 48k context keeps most chats cheap and focused.
- Start with temperature 0.8, top_p 0.95 and a response length of 400 to 700 tokens.
- A 429 means a limit was hit; wait and retry, and keep SillyTavern to one request at a time on a trial key.


Connect SillyTavern to the API
This API is not the official Qwen service. It is a hosted open-weight model run by an independent provider and exposed through the OpenAI wire format, so SillyTavern treats it like any other OpenAI-compatible backend. The qwen sillytavern settings below come down to filling in four fields.
- Create an account and a key on the API key page. New users can claim $0.50 of trial credit there with one click, no payment needed.
- In SillyTavern open the plug icon (API Connections) and set API to Chat Completion.
- Set Chat Completion Source to Custom (OpenAI-compatible).
- Paste
https://api.qwennsfw.com/v1into the custom endpoint (base URL) field. Keep the/v1and do not add/chat/completions. - Paste your key into the API key field. SillyTavern sends it as
Authorization: Bearer <key>. - Type
uncensoredinto the model ID field. If the list does not populate, enter it by hand. - Press Connect. A green status means the endpoint answered.
Menu names shift a little between SillyTavern versions, but the five values stay the same. If you want to test the key outside the app first, this request should return a short reply:
curl https://api.qwennsfw.com/v1/chat/completions \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{"model":"uncensored","messages":[{"role":"user","content":"Say hi in five words."}]}'Context size: how much of 100k to use
The model accepts up to 100,000 tokens per request, prompt and completion together. In SillyTavern the Context Size slider decides how much chat history, character card and lorebook text is packed into each prompt. You can set it near the limit, but you pay for every input token on every turn, because the whole history is sent again each time.
Input costs $0.15 per 1M tokens. A full 100,000-token prompt therefore costs $0.015 before the reply is counted. At a 32,000-token context, one turn costs 32,000 × $0.15 / 1,000,000 = $0.0048 for input. That is a good default: long enough for a few hundred messages of memory, short enough that a 100-turn evening costs about half a dollar at most.
Practical ranges:
- 16k to 24k for casual chats and one-on-one characters.
- 32k to 48k for long scenes, several lorebook entries, or group chats.
- 64k to 90k only when you really need an entire manuscript or a very long log in view. Leave room for the reply.
Past a certain length, extra history also dilutes attention: details from the middle of a very long prompt get missed more often. Summarising old turns with SillyTavern's summary feature often works better than a bigger window. For a closer look at how the window is counted, see the note on the 100k-token context window.
Sampler settings to start from
SillyTavern passes temperature, top_p, stop sequences, the seed and the repetition penalties through to the API. These are starting values, not rules; change one at a time and judge over at least ten replies.
| Setting | Start at | Change it when |
|---|---|---|
| Temperature | 0.8 | Raise to 1.0 for more varied prose; drop to 0.6 if replies drift off topic. |
| Top P | 0.95 | Lower to 0.85 if you see odd word choices. |
| Frequency penalty | 0.2 | Raise to 0.4 if the same phrases keep returning. |
| Presence penalty | 0.0 | Try 0.2 to push the story toward new topics. |
| Max response length | 500 | Use 300 for fast banter, 800 or more for long scenes. |
| Streaming | On | Turn off only if your network breaks long connections. |
Keep temperature and top_p from both being extreme at the same time. High temperature with a wide top_p gives lively text that sometimes falls apart; pick one to push. If you reuse a seed, outputs become more repeatable, which helps when you compare two settings on the same prompt.
Prompt and system settings that help
Most disappointing replies come from the prompt, not the sampler. A few habits pay off:
- Put the rules in the system prompt. State the setting, the point of view, the reply length and what the character will not do. The model is tuned to answer without content refusals for lawful adult use, so you do not need jailbreak phrasing, and long jailbreak blocks only waste input tokens.
- Keep character cards tight. A 600-token card beats a 3,000-token one for the same character, and the saving repeats on every turn.
- Use stop sequences. Add the user's name followed by a colon so the model does not write your lines for you.
- Write for adults and for fiction. Roleplay and companion chats between adults are the intended use. Content involving minors is a hard limit and is never produced.
Messages are sent in the standard chat format, so the instruct template matters little here. Leave SillyTavern's chat completion prompt manager on its defaults and edit only the main prompt first.
Fixing errors and limits
Most problems fall into a short list.
401 or invalid key
The key was pasted with a trailing space, or it belongs to a different site. Paste it again and press Connect.
404 or no response
The endpoint is wrong. It must end with /v1. Adding /chat/completions yourself makes SillyTavern request a doubled path.
429 rate_limited or concurrency
A full key allows 8 concurrent requests and 300 requests per minute. A trial key allows 2 and 60. The error code concurrency means too many requests at once, and rate_limited means too many per minute. Group chats and swipe-ahead extensions can fire several requests together, so lower the number of parallel generations. A 429 with a Retry-After: 5 header means temporary overload; wait five seconds and swipe again. A streamed reply holds its slot until the stream finishes.
Reply cut off
Raise max response length. If the prompt fills the window, shrink the context size so the completion has room.
Failed or refused requests are not charged, so retrying costs nothing extra. The full parameter list is in the API documentation.
What a long roleplay session costs
Take a chat at a 32,000-token context with replies of about 500 tokens. Early in the chat the prompt is smaller, so this is a ceiling.
- Input per turn: 32,000 × $0.15 / 1M = $0.0048.
- Output per turn: 500 × $0.50 / 1M = $0.00025.
- Total per turn: $0.00505.
- 100 turns: about $0.50.
- 1,000 turns: about $5.05.
So the $0.50 trial covers roughly 99 full-size turns, or many more with a shorter context. Paid credit is prepaid and never expires. Top-ups on this site are made in crypto (USDT on TRC20 or USDC on Base), in any whole amount from $20 to $500, with a bonus of +5% from $50, +10% from $100 and +15% from $200. Current rates are on the pricing page.
More guides
Questions and answers
What base URL do I enter in SillyTavern?
Enter https://api.qwennsfw.com/v1 as the custom endpoint. Do not append /chat/completions; SillyTavern adds the path itself.
Which model name should I use?
Use uncensored as the model ID. The service exposes one model, so there is nothing else to choose.
Is this the official Qwen API?
No. It is a hosted open-weight model run by an independent provider, reachable through an OpenAI-compatible interface. It is not an official product of any model vendor.
Why do I get 429 errors in group chats?
Group chats can send several requests at once. A trial key allows 2 at a time and 60 per minute, a full key 8 and 300. Reduce parallel generations or wait and retry.
Can I use the full 100,000-token window?
Yes, prompt and completion together can reach 100,000 tokens. Most chats do better and cost less at 24k to 48k, with older turns summarised.
Your key is one form away
Create an account, copy the key, change the base URL. That is the whole setup.