Blog · ai writing · guides
Tokens, Context Windows, Temperature: The AI Writing Terms Worth Knowing
JP LeBlanc · · 5 min read

Most AI writing advice assumes you already speak the vocabulary. Lower the temperature. Watch your context window. That'll cost you a lot of tokens. If you write fiction and don't build software, those sentences are close to noise, and the people saying them rarely stop to explain.
We have a set of plain-language explainers at /eli5 for exactly this. This post is the condensed version: the handful of terms that actually change how you write with a model, what each one means, and what AIStoryHub does with it behind the scenes, checked against the code rather than from memory. A few of the answers surprised me when I went looking.
Token
A token is the unit a model reads and writes in. It's a chunk of text, roughly three-quarters of a word on average for English. Short common words are usually one token. Long or rare words get split into several.
Why you care: providers bill by the token, and they count both directions. You pay for everything sent to the model (your instruction plus all the story context packed around it) and everything it writes back. That's why a request with a big story bible costs more than a one-line rewrite even when the output is the same length. If you bring your own key, those charges go to your provider account directly, and this post walks through what a whole novel adds up to. The longer explainer is What is a token?
Context window
The context window is the most tokens a model can hold in a single request, input and output together. It's the model's entire working memory. A model has no memory between requests at all; anything it knows about your story, it knows because it was sent along this time.
Why you care: your novel almost certainly doesn't fit, and even when a big window could hold it, stuffing everything in makes each request slower and more expensive without making the prose better. So something has to choose what goes in. In AIStoryHub that's the prompt builder: for a story with up to 18 world entries, every entry goes in whole. Past that, it ranks entries by relevance to the chapter you're writing, sends the top ones in full, and gives the rest a names-only mention so the model at least knows they exist.
The practical upshot is that a world entry the model "forgot" usually wasn't forgotten. It wasn't sent, or it was sent as a name. If a minor character keeps drifting, giving their entry a clearer description, or mentioning them in your instruction for that scene, is the fix.
Temperature
Temperature controls how adventurous the model is when it picks each next token. At low temperature it almost always takes the most likely word. At higher temperature it's more willing to take the second or fifth most likely one. Low is consistent and flat; high is varied and occasionally unhinged.
This is the term where the old advice is most out of date. A lot of tutorials from a couple of years ago tell writers to "turn the temperature up for creativity." Two things have changed since:
- Many current models don't accept it. In our code, temperature is skipped entirely for Anthropic's Claude models, and for OpenAI's reasoning models (the o-series and the GPT-5 family), which reject the parameter outright. Sending it to them would make the request fail, so we don't.
- Where it is accepted, we set it per job, not per writer. Prose drafting runs at 0.7. Structured background tasks, like pulling characters out of a chapter into JSON, run much lower, because you want the same answer every time there.
So there's no temperature dial in AIStoryHub, and that's deliberate. If a draft feels flat, the lever that works is what you send: a sharper instruction, a voice profile, a banned-phrase rule. Raising randomness mostly makes a flat model flat in more directions.
Max output tokens
The cap on how long a single response can be. It's set per request, separately from the context window. For chapter drafting we ask for up to 16,000 tokens out, which is room for a long chapter.
Why you care: when a generation stops mid-sentence, this is usually why. It's also why we always send an explicit cap. We learned that one the hard way, when a free-tier route with no cap set defaulted to the size of its entire context window, left no room for the prompt, and failed every call before the model ran.
Thinking tokens
Newer models can "think" before answering: they generate hidden reasoning text first, then the visible answer. You don't see the thinking, but you pay for it, and on some providers it counts against the same max output cap.
Why you care: on Google's Gemini models, thinking draws from the output budget, so a model can spend its whole allowance reasoning and hand back an empty answer. For chapter drafting and several background tasks, we turn Gemini's thinking down to the lowest level each model accepts, for exactly that reason. For your own prose, a thinking model isn't automatically a better prose writer. It's often a better planner. That's a reason to use different models for different jobs.
System prompt
The standing instructions a request starts with, separate from your message. In AIStoryHub this is where the assembled context lives: your story's genre and point of view, the characters in play, your voice settings, your Story Rules. You type a short instruction; the system prompt carries everything you'd otherwise repeat. The explainer is What is a prompt?
Provider, model, and key
The provider is the company (Anthropic, OpenAI, Google, or a router like OpenRouter that resells many). The model is the specific engine you choose from them. The key is the password that bills your account. AIStoryHub works with your own key from any of those, or with a built-in free model that shares a limited pool across everyone, which is why it's occasionally busy. There's no subscription in between either way. The API key explainer covers setup.
Hallucination
When a model states something confidently that isn't true. In fiction that sounds harmless, since everything is made up, but the version that bites writers is canon drift: the model invents a sister your protagonist never had, or moves a city. It's the same mechanism as context window trouble. The model fills gaps with plausible guesses, and the more of your world it can actually see, the fewer gaps there are to fill.
The ELI5 explainers go one level deeper on tokens, keys, prompts, and models, each with a short glossary at the bottom. They're written for someone who has never opened a developer console, which, for most novelists, is the correct assumption.