Key points
- A strong roleplay prompt has five parts: role, setting, style, rules and a first line.
- Put the standing instructions in the system message and keep scene updates in user turns.
- Temperature around 0.8 to 1.0 plus a mild penalty keeps writing lively and varied.
- Our model answers lawful adult fiction without refusals; sexual content involving minors is never allowed.
The short version
A chat gpt roleplay prompt works best when it is a small document, not a single sentence. Give the model a character or narrator role, a setting, a writing style, a few rules about how to respond, and an opening line. Then send it as the system message and let the user turns carry the story.
The template below does that. It works with any chat model, and it is written for the API, where you control the system message directly. We run an OpenAI-compatible endpoint with a model tuned to answer without content refusals for lawful adult use, so fiction with dark themes, villains and mature conflict is not interrupted by a refusal. One hard rule stays: no sexual content involving minors, in any framing. Keep your scenes professional and your characters adults.
A prompt template you can paste
Fill in the brackets. Keep it under about 500 words, since this text is resent with every turn and you pay for it as input tokens.
Role. You are [name], [one-line description of the character or narrator]. You speak in [voice: dry, warm, formal, clipped].
Setting. [Place, time, mood, two or three facts that matter to the plot.] The scene currently stands at: [one sentence].
Style. Write in [first or third] person, past tense. Replies run 120 to 200 words. Show actions and sensory detail. Do not summarize the story or speak for the user's character.
Rules. Stay in character. Do not repeat earlier phrasing. Move the plot forward in every reply with a choice, a clue or a complication. Never break the fourth wall unless the user writes OOC in brackets.
Opening. Begin with [first scene beat].
A filled example for a mystery story: the role is a weary harbour inspector named Maren Voss, the setting is a fog-bound port town in 1923 where a ship arrived with no crew, the style is third person with short sentences, and the rules say that every reply must reveal one new clue. That is enough for the model to hold a voice for dozens of turns.
Why each part is there
Role
A concrete role gives the model a voice to hold. Vague roles like "be creative" produce generic prose. A name, a trait and a manner of speaking produce consistent dialogue.
Setting
Facts you list here become facts the model keeps. Include only what the story needs. The more trivia you add, the more the model treats it as required material and works it into every reply.
Style
Length and person are the two instructions that most change the feel of a reply. Without a length, replies drift from a line to a page. Without a rule against speaking for the user's character, the model will decide your character's actions for you.
Rules
Rules prevent the usual failures: repetition, stalling and dropping the plot. The line about moving the story forward is the most useful one. Roleplay stalls when each reply only reacts, so ask for a complication every time.
Opening
Starting the scene yourself sets tone faster than asking the model to invent one.
Three variants for different games
The template adapts. These three changes cover most requests.
Game master
Replace the character with a narrator who describes the world and plays every non-player character. Add a rule that the narrator ends each reply with a short prompt for the player's next action, and never decides what the player's character does. State any dice or stat rules in plain sentences: "A roll of 1 to 3 fails, 4 to 6 succeeds. Roll in your head, announce the result, and describe the outcome." The model does not run real random numbers, so for fair rolls generate them in your code and pass them in as part of the user message.
Companion character
For an app where an adult talks to a recurring character, the prompt needs a personality, a few stable preferences, a way of speaking, and memory notes. Keep the memory notes in a short list that your code updates and re-inserts. This gives the character continuity without sending the whole history. The same rule applies as everywhere: characters are adults, and nothing involving minors is allowed.
Writing partner
For co-writing a novel, ask the model to alternate with you in fixed chunks, such as one scene beat each, and to flag when it is unsure of a detail so you can decide. Include a short style sample of your own prose and tell it to match that voice. Reuse the same sample every session so the writing stays consistent across days.
Run it through the API
Here is the template in Python with the OpenAI SDK. The system message holds the standing prompt, and a list called history carries the conversation.
from openai import OpenAI
client = OpenAI(base_url="https://api.uncensoredgptapi.com/v1", api_key="YOUR_API_KEY")
SYSTEM = (
"You are Maren Voss, a weary harbour inspector in a fog-bound port town in 1923. "
"Write in third person, past tense, 120 to 200 words per reply. "
"Show actions and sensory detail. Never speak for the user's character. "
"Each reply must reveal one new clue or complication."
)
history = [{"role": "system", "content": SYSTEM}]
def turn(user_text):
history.append({"role": "user", "content": user_text})
resp = client.chat.completions.create(
model="uncensored",
messages=history,
temperature=0.9,
top_p=0.95,
presence_penalty=0.3,
max_tokens=400,
)
reply = resp.choices[0].message.content
history.append({"role": "assistant", "content": reply})
return reply
print(turn("I step onto the empty deck and call out. Nobody answers."))To see text as it is written, add stream=True and print each chunk's delta. Streaming works over SSE and returns usage at the end. Keep in mind that a streamed request holds its concurrency slot until it finishes, which matters if your app serves several players at once.
Settings that shape the writing
The sampling settings are passed through to the model, so you can tune them.
- temperature at 0.8 to 1.0 gives varied, lively prose. Lower values, near 0.5, suit tight plot logic and rules-heavy games.
- top_p around 0.9 to 0.95 trims the least likely words without flattening the style.
- presence_penalty and frequency_penalty of 0.2 to 0.5 reduce repeated phrases, the most common roleplay complaint. Do not push them high, or the model avoids words it needs, like the character's own name.
- stop sequences cut a reply when the model starts to write the user's next line, for example a stop on a name tag followed by a colon.
- seed lets you repeat a generation while you tune a prompt, so you compare changes fairly.
These ranges are starting points from general practice, not guarantees. Change one setting at a time and read a handful of replies before deciding.
Keeping long stories consistent
The context window is 100,000 tokens, prompt plus completion. A typical 150-word reply is around 200 tokens, so you can hold hundreds of turns before reaching the limit. Cost stays small too. At 6,000 input tokens and 300 output tokens per turn, one turn costs 6,000 / 1,000,000 x $0.15 = $0.0009 plus 300 / 1,000,000 x $0.50 = $0.00015, so $0.00105. A 40-turn session costs about $0.042.
Cost is rarely the problem. Drift is. Over a long session the model forgets early details or flattens a character. Three habits help:
- Pin a story state. Every 10 or 15 turns, ask the model for a short summary of facts, relationships and open threads. Keep that summary in the system message and drop the oldest turns.
- Restate the character sheet. If the voice slips, add a short reminder as a system message near the end of the history.
- Edit, do not argue. When a reply goes wrong, remove it and regenerate instead of adding a correction. Corrections stay in the history and push the story the wrong way.
The docs show streaming, tool calling and JSON mode. A game can use JSON mode to return the scene text and a small state object in one reply.
Use cases and limits
Writers use prompts like this for interactive fiction, tabletop-style adventures, character dialogue practice, villain monologues and companion characters in apps for adults. The point of our model is that mature or dark fiction between adults is not stopped by a refusal. Failed or refused requests are not charged either way.
The limits are firm. No sexual content involving minors, ever. The service is text only, with no images or audio. And the model is an independent open-weight one, not an official model from any vendor, so do not expect it to behave like a specific branded assistant. Prompts are not used for training.
To try it, create an account and claim the $0.50 trial credit on the API key page. At the turn cost above, that covers roughly 476 turns of a long session. If you need to know what a heavier workload costs, see the pricing page.
