cover_image: https://aiwave.live/images/cover_04_developer_guide.png
title: How to Connect SillyTavern to Kimi K2.6 for 128K Context Roleplay
published: true
tags: ai, aiwave, kimi, roleplay, sillytavern
Published: 2026-07-07 | Category: AI Roleplay | Reading Time: 9 min
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.
Kimi K2.6 stands out for roleplay for three reasons:
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.
# Clone or extract SillyTavern
cd SillyTavern
npm install
node server.js
SillyTavern launches at http://localhost:8000. Open it in your browser.
In SillyTavern's UI:
Enter the connection details:
API Type: Chat Completion
Backend: Custom/OpenAI Compatible
Custom Endpoint (Base URL): https://aiwave.live/v1?utm_source=dev.to&utm_medium=organic&utm_campaign=SEO_ARTICLES
API Key: sk-your-aiwave-key-here
Model: kimi-k2.6
Click Connect. If successful, SillyTavern will show a green status indicator.
Send a test message in any chat:
"System test. Respond with: connection verified."
If Kimi responds correctly, you're connected.
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:
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}}.
- If the scene becomes romantic or intimate, progress naturally based on established consent and tone.
This template works well with Kimi because it gives clear, unambiguous rules that the model can follow consistently across a long conversation.
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.
128K tokens sounds like a lot — and it is. But in roleplay, context fills fast. Here's how to manage it:
SillyTavern handles context management automatically, but you should configure it:
120000 (leaving headroom for responses)After ~200-300 exchanges (depending on message length), you'll approach the 128K limit. Options:
Beyond the system prompt, a few techniques improve Kimi's output:
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."
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.
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.
A typical roleplay session:
| Activity | Tokens | Cost (Kimi K2.6) |
|---|---|---|
| System prompt + char card | ~800 | ~$0.0002 |
| 20 exchanges (avg 150 tokens each) | ~6,000 | ~$0.0036 |
| Total per session | ~6,800 | ~$0.004 |
At $0.004 per session, you can have 250 sessions for $1. Compare that to Claude 4 Sonnet, which would cost roughly $0.30–$0.50 per equivalent session.
"Model not found" error: Ensure you're using exactly kimi-k2.6 as the model name. AIWave's model catalog uses specific 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 the free GLM-4.7 Flash ($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 roleplay sessions, a wired connection helps.
AIWave offers other models worth experimenting with for roleplay:
moonshot-v1-128k) — Kimi's predecessor, $1.80/$4.50. Good fallback.deepseek-v3.2) — $0.154/$0.308, 128K context. Surprisingly good at roleplay for the price.glm-4.7-flash) — $0.00/1M, 128K. Free to use. Not as polished, but usable for background scenes.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.
We're a small team behind AIWave. No VC money, no big marketing budget — just a few people who believe Chinese AI models should be accessible to everyone in the world. Your API calls keep this project alive. If you find value in what we're building, stick around. It means more than you know.