You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
SillyTavern + Kimi K2.6: 128K Context Roleplay Setup Guide & API Pricing
#21
SillyTavern + Kimi K2.6: 128K Context Roleplay Setup Guide
SillyTavern is the go-to front-end for AI-powered roleplay and chat. By default, it connects to OpenAI, Claude, or local models. But there's a compelling alternative: Kimi K2.6 from Moonshot AI, available through AIWave at a fraction of the cost of Claude or GPT-4o, with 128K context support that transforms long-form roleplay.
This guide covers the complete setup — API configuration, prompt engineering for roleplay, and optimization tips specific to Kimi K2.6.
Why Kimi K2.6 for Roleplay?
Kimi K2.6 stands out for roleplay for three reasons:
128K context window. At $1.09 input / $4.5998 output per 1M tokens, you get Claude-level context at a fraction of the cost. Claude 4 Sonnet charges $3.00/$15.00 for 200K context. Kimi gives you 128K for significantly less.
Strong instruction following. Kimi K2.6 scores 84.5% on HumanEval and 83.5% on MMLU — these aren't toy benchmarks. Strong instruction following translates directly to consistent character portrayal and adherence to scene rules.
Chinese model heritage. Moonshot AI (Kimi's creator) invested heavily in long-context training. Their models handle extended conversations better than most Western alternatives at this price point.
The trade-off: Kimi's English prose can occasionally feel slightly formal compared to Claude's naturalistic style. This is improving with each version, and proper prompt engineering closes most of the gap.
AIWave account — sign up ($1 free credit on signup)
Your API key — from the AIWave dashboard
Step 1: Start SillyTavern
cd SillyTavern
npm install
node server.js
SillyTavern launches at http://localhost:8000. Open it in your browser.
Step 2: Configure the API Connection
In SillyTavern's UI:
Click the plug icon (API connection) in the top toolbar
Select Chat Completion as the API type
Select Chat Completion (Custom/OpenAI format) as the backend
Enter the connection details:
API Type: Chat Completion
Backend: Custom/OpenAI Compatible
Custom Endpoint (Base URL): https://aiwave.live/v1
API Key: sk-your-aiwave-key-here
Model: kimi-k2.6
Click Connect. If successful, SillyTavern will show a green status indicator.
Verifying the Connection
Send a test message in any chat:
"System test. Respond with: connection verified."
If Kimi responds correctly, you're connected.
Step 3: Chat Completion Settings
Configure the completion parameters for roleplay. Navigate to Settings → Chat Completion → Parameters:
Parameter
Recommended Value
Notes
Max Tokens
1024–2048
Longer responses for richer roleplay
Temperature
0.8–1.0
Higher for creative, varied responses
Top P
0.9
Standard for creative writing
Frequency Penalty
0.0–0.2
Slight penalty reduces repetition
Presence Penalty
0.0–0.2
Encourages diverse vocabulary
For roleplay specifically, temperature is the most impactful setting. Start at 0.85 and adjust:
0.7–0.8: More consistent, less surprising. Good for strict character adherence.
0.85–0.95: Balanced creativity. Good for most roleplay.
1.0+: Wild and unpredictable. Can break character but produces surprising moments.
Step 4: System Prompt Configuration
The system prompt is where Kimi K2.6's instruction following shines. Here's a battle-tested template:
You are {{char}}, a {{char description}}.
Write {{char}}'s next response in an immersive, third-person narrative.
Follow these rules strictly:
- Stay in character at all times. Never break the fourth wall.
- Use descriptive prose. Show actions, thoughts, and dialogue.
- Maintain consistent personality traits: {{char personality}}.
- React to {{user}}'s actions and words naturally.
- Keep responses between 3-8 paragraphs unless the scene demands more.
- Use quotation marks for dialogue, italics for thoughts (*like this*).
- Do not speak or act for {{user}}. Only describe {{char}}.
This template works well with Kimi because it gives clear, unambiguous rules that the model can follow consistently across a long conversation.
Step 5: Character Card Best Practices for Kimi
Kimi K2.6 responds well to structured character cards. Here's an optimal format:
Name: {{char name}}
Age: {{age}}
Appearance: {{2-3 sentence physical description}}
Personality: {{3-5 key traits, briefly explained}}
Background: {{2-3 sentences of relevant history}}
Speaking Style: {{how the character talks — formal? casual? dialect?}}
Relationship to User: {{how they know the user character}}
Keep character descriptions concise. Kimi works better with 200-400 word character definitions than 2000-word ones. Excessive detail causes the model to spread its attention thin; concise definitions keep the character sharp.
Step 6: Managing the 128K Context Window
128K tokens sounds like a lot — and it is. But in roleplay, context fills fast. Here's how to manage it:
Token Estimation
1 English word ≈ 1.3 tokens
128K tokens ≈ 98,000 words ≈ a 300-page novel
A typical roleplay message: 50–200 words ≈ 65–260 tokens
Character card + system prompt: 400–800 tokens
Context Strategy
SillyTavern handles context management automatically, but you should configure it:
Settings → Chat Completion → Context
Set Max Context Length to 120000 (leaving headroom for responses)
Set Context Template to include system prompt, character card, and chat history
When Context Gets Long
After ~200-300 exchanges (depending on message length), you'll approach the 128K limit. Options:
Enable Summarization: SillyTavern can summarize older messages. Navigate to Extensions → Summarize and set it to summarize messages older than 50 exchanges.
Start a new chapter: If the narrative shifts, start a fresh chat with a summary of prior events as the first message.
Use the low-cost GLM-4.7 FlashXX ($0.00/1M) for less important scenes, saving Kimi K2.6 for key moments.
Step 7: Prompt Engineering for Better Roleplay
"Show, Don't Tell" Injection
Add to the end of your system prompt:
Writing style: Show actions through vivid description rather than stating them.
Instead of "She was nervous," write "Her fingers drummed against the table,
her eyes darting to the door every few seconds."
Scene Anchoring
When starting a new scene, include an explicit scene-setting message from the user:
[The tavern is dimly lit, candles flickering on rough-hewn tables. Rain
patters against the window. A stranger pushes through the door, shaking
water from their cloak.]
Physical environment details give Kimi concrete details to work with, reducing hallucination.
Pacing Control
If Kimi's responses are too long or too short, add to the system prompt:
Response length: Write 3-5 paragraphs per response. Match the pacing
of the scene — short responses during action, longer during emotional moments.
Cost Breakdown
A realistic cost estimate for a 20-exchange roleplay session with Kimi K2.6 ($1.09 input / $4.5998 output per 1M tokens):
Since each API call sends the entire conversation history as input, input tokens accumulate quickly:
Component
Est. Input Tokens
Est. Output Tokens
System prompt + char card (sent every call)
~800 × 20 = 16,000
—
Chat history (grows linearly, avg ~1,500 mid-session)
~30,000
—
Model responses
—
~3,000 (150 × 20)
Total
~46,000
~3,000
Model
Input Cost
Output Cost
Session Total
Kimi K2.6 ($1.09 / $4.60)
$0.050
$0.014
~$0.06
Claude 4 Sonnet ($3.00 / $15.00)
$0.138
$0.045
~$0.18
GPT-4o ($2.50 / $10.00)
$0.115
$0.030
~$0.15
Kimi K2.6 is roughly 3× cheaper than Claude 4 Sonnet for equivalent roleplay sessions, with comparable context window support.
Troubleshooting
"Model not found" error: Ensure you're using exactly kimi-k2.6 as the model name. Check the AIWave model catalog for current model identifiers.
Responses feel robotic: Increase temperature to 0.85–0.95. Also review your character card — Kimi responds best to concise, well-structured definitions.
Context filling too fast: Enable SillyTavern's summarization feature. Consider using GLM-4.7 FlashX ($0.00/1M) for scenes that don't need Kimi's full capabilities.
API errors or timeouts: AIWave hosts from Singapore. If you're in Europe or the Americas, you may see occasional latency spikes. For critical sessions, a wired connection helps.
Alternative Models to Try
AIWave offers other models worth experimenting with for roleplay:
Kimi K2.6 on AIWave offers the best value proposition for AI roleplay in 2026. Claude-quality context at a fraction of the cost, with 128K tokens that let your stories breathe.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
SillyTavern + Kimi K2.6: 128K Context Roleplay Setup Guide
SillyTavern is the go-to front-end for AI-powered roleplay and chat. By default, it connects to OpenAI, Claude, or local models. But there's a compelling alternative: Kimi K2.6 from Moonshot AI, available through AIWave at a fraction of the cost of Claude or GPT-4o, with 128K context support that transforms long-form roleplay.
This guide covers the complete setup — API configuration, prompt engineering for roleplay, and optimization tips specific to Kimi K2.6.
Why Kimi K2.6 for Roleplay?
Kimi K2.6 stands out for roleplay for three reasons:
128K context window. At $1.09 input / $4.5998 output per 1M tokens, you get Claude-level context at a fraction of the cost. Claude 4 Sonnet charges $3.00/$15.00 for 200K context. Kimi gives you 128K for significantly less.
Strong instruction following. Kimi K2.6 scores 84.5% on HumanEval and 83.5% on MMLU — these aren't toy benchmarks. Strong instruction following translates directly to consistent character portrayal and adherence to scene rules.
Chinese model heritage. Moonshot AI (Kimi's creator) invested heavily in long-context training. Their models handle extended conversations better than most Western alternatives at this price point.
The trade-off: Kimi's English prose can occasionally feel slightly formal compared to Claude's naturalistic style. This is improving with each version, and proper prompt engineering closes most of the gap.
Prerequisites
Step 1: Start SillyTavern
cd SillyTavern npm install node server.jsSillyTavern launches at
http://localhost:8000. Open it in your browser.Step 2: Configure the API Connection
In SillyTavern's UI:
Enter the connection details:
Click Connect. If successful, SillyTavern will show a green status indicator.
Verifying the Connection
Send a test message in any chat:
If Kimi responds correctly, you're connected.
Step 3: Chat Completion Settings
Configure the completion parameters for roleplay. Navigate to Settings → Chat Completion → Parameters:
For roleplay specifically, temperature is the most impactful setting. Start at 0.85 and adjust:
Step 4: System Prompt Configuration
The system prompt is where Kimi K2.6's instruction following shines. Here's a battle-tested template:
This template works well with Kimi because it gives clear, unambiguous rules that the model can follow consistently across a long conversation.
Step 5: Character Card Best Practices for Kimi
Kimi K2.6 responds well to structured character cards. Here's an optimal format:
Keep character descriptions concise. Kimi works better with 200-400 word character definitions than 2000-word ones. Excessive detail causes the model to spread its attention thin; concise definitions keep the character sharp.
Step 6: Managing the 128K Context Window
128K tokens sounds like a lot — and it is. But in roleplay, context fills fast. Here's how to manage it:
Token Estimation
Context Strategy
SillyTavern handles context management automatically, but you should configure it:
120000(leaving headroom for responses)When Context Gets Long
After ~200-300 exchanges (depending on message length), you'll approach the 128K limit. Options:
Step 7: Prompt Engineering for Better Roleplay
"Show, Don't Tell" Injection
Add to the end of your system prompt:
Scene Anchoring
When starting a new scene, include an explicit scene-setting message from the user:
Physical environment details give Kimi concrete details to work with, reducing hallucination.
Pacing Control
If Kimi's responses are too long or too short, add to the system prompt:
Cost Breakdown
A realistic cost estimate for a 20-exchange roleplay session with Kimi K2.6 ($1.09 input / $4.5998 output per 1M tokens):
Since each API call sends the entire conversation history as input, input tokens accumulate quickly:
Kimi K2.6 is roughly 3× cheaper than Claude 4 Sonnet for equivalent roleplay sessions, with comparable context window support.
Troubleshooting
"Model not found" error: Ensure you're using exactly
kimi-k2.6as the model name. Check the AIWave model catalog for current model identifiers.Responses feel robotic: Increase temperature to 0.85–0.95. Also review your character card — Kimi responds best to concise, well-structured definitions.
Context filling too fast: Enable SillyTavern's summarization feature. Consider using GLM-4.7 FlashX ($0.00/1M) for scenes that don't need Kimi's full capabilities.
API errors or timeouts: AIWave hosts from Singapore. If you're in Europe or the Americas, you may see occasional latency spikes. For critical sessions, a wired connection helps.
Alternative Models to Try
AIWave offers other models worth experimenting with for roleplay:
moonshot-v1-128k) — $1.80/$4.50, 128K context. Kimi's predecessor, good fallback.deepseek-v3.2-think) — $0.154/$0.308, 128K context. Surprisingly good at roleplay for the price.glm-4.7-flashx) — $0.00/1M, 128K context. Free to use. Not as polished, but usable for background scenes.References
Kimi K2.6 on AIWave offers the best value proposition for AI roleplay in 2026. Claude-quality context at a fraction of the cost, with 128K tokens that let your stories breathe.
Resources
All reactions