Qwen Abliterated Roleplay: Settings and API Setup

Roleplay is where refusal behaviour hurts most, because one stray warning breaks the scene. Here is a working setup for fiction and companion chats with an uncensored endpoint, including sampler values and costs.
Key points
- In SillyTavern, add a custom OpenAI-compatible source with the site's /v1 URL and model uncensored.
- Start near temperature 0.8 and top_p 0.9, then change one value at a time.
- A long scene resends history each turn, so trim context to control cost.
- The model is text only; lawful adult use only, and nothing involving minors.
Why roleplay users look for uncensored models
People searching for qwen abliterated roleplay want a model that stays in character. Standard chat models are tuned to step out of a scene, add disclaimers, or decline themes that are ordinary in fiction: war, grief, villains, horror, morally grey narrators. Abliterated and other uncensored builds exist because those interruptions wreck immersion.
This article is about running that kind of session through an API instead of a local file. The hosted model here is one open-weight model from an independent provider, tuned to answer without content refusals for lawful adult use. It is not the official Qwen API, and we do not claim it is a specific abliterated Qwen checkpoint. Treat it as its own model and judge it on your own characters.
One boundary applies without exception: no sexual content involving minors. Characters must be adults. The rest of this page keeps to the technical side, which is the same whatever genre you write.
Connect SillyTavern
SillyTavern can talk to any OpenAI-compatible endpoint. Menu names shift between versions, but the path is always the same idea: open the API connection panel, choose the Chat Completion source, and pick the custom or OpenAI-compatible option.
- 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 no card.
- In SillyTavern, select Chat Completion and then the custom source.
- Set the endpoint URL to
https://api.qwenabliterated.top/v1. - Paste the key into the API key field.
- Enter
uncensoredas the model ID, or pick it from the list if the connect button fetches one. - Press connect and send a short test message.
If the test fails with a 401, recheck the key. If it fails with a 404, make sure the URL ends in /v1 and has no extra path after it. The docs page lists the endpoints.
Using your own script instead
If you write your own front end or a bot, the same settings go into the SDK. A minimal loop that keeps the history:
from openai import OpenAI
client = OpenAI(base_url="https://api.qwenabliterated.top/v1", api_key="YOUR_API_KEY")
history = [{"role": "system", "content": open("character.txt").read()}]
while True:
user = input("> ")
history.append({"role": "user", "content": user})
out = client.chat.completions.create(
model="uncensored",
messages=history,
temperature=0.85,
top_p=0.9,
frequency_penalty=0.3,
max_tokens=500,
)
text = out.choices[0].message.content
history.append({"role": "assistant", "content": text})
print(text)A system prompt that holds a character
The system message does most of the work. Keep it short, concrete and written as instructions about behaviour, not as a biography. A pattern that holds up well:
You are Mara Voss, a ship's navigator in a space-opera story.
Write in third person, past tense, 120 to 250 words per reply.
Stay in character. Do not summarise the scene or add out-of-story notes.
Never speak or act for the user's character; end each reply on an open beat.
All characters are adults.
Setting: the freighter Kestrel, three weeks out from port, supplies running low.
Notes on why each line is there. A length target stops replies ballooning. The rule against speaking for the user's character is the most common correction people make. The last line fixes the setting so the model does not invent a different one two turns later. Facts about the character that matter, such as a scar, a debt or a habit, belong in a few lines of the same prompt, not a page of backstory.
If the model drifts out of character in a long chat, repeat the key rules close to the end of the history as a short reminder message rather than lengthening the opening prompt.
Sampling values to start from
The API passes through temperature, top_p, stop, seed and the penalties. Those are the knobs you have; other samplers that exist in local tools may not be available, so do not count on them.
| Parameter | Starting value | What it changes |
|---|---|---|
| temperature | 0.8 to 1.0 | Higher gives more varied wording; above about 1.1 expect incoherence. |
| top_p | 0.9 | Trims the unlikely tail of word choices. |
| frequency_penalty | 0.2 to 0.5 | Discourages repeating the same words and phrases. |
| presence_penalty | 0 to 0.3 | Nudges the model toward new topics. |
| max_tokens | 300 to 600 | Caps reply length; optional. |
| stop | name of your character plus a colon | Prevents the model writing your next line. |
Change one value at a time and play a few turns before judging. If you want to compare two settings fairly, set seed to a fixed number so the same prompt gives the same starting point.
Opening messages and scene hooks
The first message in a chat sets tone more than any instruction. If it is two lines of dialogue with no description, replies will be short. If it is a full paragraph of scene-setting in the style you want, the model copies that length and register. Write the opener as an example of what you want to read back.
Give the scene a pressure point. A stranded crew with a failing life-support system produces more interesting turns than a crew sitting in a bar, because the model always has something to push on. When a scene stalls, add an event from your side: a message arrives, a door opens, a decision is forced. Most flat roleplay is a lack of stakes, not a model problem.
For several characters, name each one in the system prompt with a single line about voice, such as "Doctor Imre: dry, precise, never swears". Distinct speech habits make it easier for the model to keep voices apart across a long history, and easier for you to spot when two have blurred together.
Managing the 100k context
The context window is 100,000 tokens, prompt and completion together, so a scene can run very long before anything is cut. Long does not automatically mean better, though. Chat models pay less attention to details buried in the middle of a huge history, and every turn resends the whole transcript, which you pay for as input.
Practical habits:
- Set the context size in your front end to something like 16,000 to 32,000 tokens and let older turns fall off.
- Every so often ask the model for a short summary of events and character state, then paste it into the system prompt and clear old turns.
- Keep a "facts that must stay true" list in the system message for names, places and promises.
- Use stop sequences and a length cap so replies do not creep up in size.
Also remember that this is a text model. It does not produce images or voice, so avatars and audio in a companion app need other tools.
What a session costs
Pricing is $0.15 per 1M input tokens and $0.50 per 1M output tokens. Take a long scene where the history has reached 30,000 tokens and each reply is about 400 tokens. One turn costs 30,000 x $0.15 / 1M = $0.0045 for input and 400 x $0.50 / 1M = $0.0002 for output, so $0.0047. One hundred such turns cost $0.47.
The same session with a 12,000-token window costs 12,000 x $0.15 / 1M = $0.0018 plus $0.0002, so $0.002 per turn and $0.20 for one hundred turns. Trimming context is the easiest saving available.
There is no subscription. You prepay any whole amount from $20 to $500, with +5% from $50, +10% from $100 and +15% from $200, and credit never expires. Pay by crypto (USDT on TRC20, USDC on Base). Failed or refused requests are not charged. Details are on the pricing page.
Common problems
- Replies get repetitive. Raise frequency_penalty a little, trim old turns, or lower the context size.
- The model writes your lines. Add the rule to the system prompt and set a stop sequence on your character's name.
- HTTP 429 mid-scene. You hit a limit: 8 concurrent requests and 300 per minute on a full key, 2 and 60 on a trial key. Wait for the
Retry-Aftervalue and resend. Streaming holds a concurrency slot until it ends, so close streams you abandon. - Characters forget details. Move key facts into the system prompt and summarise old turns.
Prompts are not used for training. For how other pay-per-token options compare, the comparison guide has more.
More guides
Questions and answers
Can I use this with SillyTavern?
Yes. Choose the Chat Completion source with a custom OpenAI-compatible endpoint, enter the site's /v1 URL, your key and the model ID uncensored.
What temperature works best for roleplay?
Most people start between 0.8 and 1.0 with top_p near 0.9. Change one value at a time and test over several turns.
Does the model generate images or voice?
No. It is text only, so images, audio and video need separate tools.
Are there content limits?
It is built for lawful adult use, and all characters must be adults. Sexual content involving minors is never allowed.
How much does a long roleplay cost?
With a 30,000-token history and 400-token replies, about $0.0047 per turn, or $0.47 for one hundred turns. Shorter context lowers it.
Your key is one form away
Create an account, copy the key, change the base URL. That is the whole setup.
Get API key