# What does max tokens mean in AI?

> Max tokens caps how long a model's answer can be. Set it too low and replies stop mid-sentence; set it sensibly and you control cost and length.

Source: https://learn.ynteractive.com/content/glossary/max-tokens · Updated 2026-10-20 · Free from Stepthrough (https://learn.ynteractive.com)

[AI basics](https://learn.ynteractive.com/content/glossary#topic-ai-basics) · [AI glossary](https://learn.ynteractive.com/content/glossary)

Quick answer

Max tokens is a setting that limits how many tokens, roughly pieces of words, a model may write in one answer. It is a hard stop: when the limit is reached, the answer simply ends, even mid-sentence. It is mainly used in APIs and automation tools to control length and cost.

Last updated October 20, 2026

[Take the free module →](https://learn.ynteractive.com/courses/n8n-jump-start/11)Module 11 of the free [n8n Jump Start](https://learn.ynteractive.com/courses/n8n-jump-start) course, about 11 minutes. No account needed.

Updated October 20, 2026 · By [Robert Breen](https://learn.ynteractive.com/content/about)

## Why it matters for a small business

Output tokens are usually the most expensive part of an AI call, so a cap protects you from a runaway answer in an automation that runs hundreds of times a day. It also keeps replies to a predictable size for a text message or a sheet cell.

The catch is that the model doesn't plan around the cap. If you need a short answer, say so in the prompt ("under 80 words"); use max tokens as a safety limit above that, not as the way to make answers short. Reasoning models may also count their thinking toward the limit, so a tight cap can leave no room for the answer.

## In a real lesson: n8n AI Agent with Tools: Check Google Calendar, Book It and Log It

In [n8n AI Agent with Tools](https://learn.ynteractive.com/content/n8n-ai-agent-tools-google-calendar-booking), the Maple Street Dog Grooming booking agent already has an OpenAI Chat Model attached. The lesson doesn't change its options, but that node is where max tokens lives in n8n: under its options you can add Maximum Number of Tokens.

For a booking confirmation, a cap well above the expected reply keeps a stray long answer from costing more, while the system message does the real work of keeping replies short. The lesson's closing checklist reminds you that each test message uses AI credits, which is the cost the cap protects.

[Try this lesson free](https://learn.ynteractive.com/modules/n8n-agent-tools) or [read the step-by-step guide](https://learn.ynteractive.com/content/n8n-ai-agent-tools-google-calendar-booking).

## Common confusions

### Max tokens vs context window

The context window is the total the model can handle, input plus output. Max tokens limits only the output of one answer.

### Max tokens vs a word limit in the prompt

A word limit in the prompt asks the model to plan a short answer. Max tokens cuts it off without warning.

## Tips

- Ask for the length you want in the prompt; set max tokens as a ceiling above it.
- If answers end mid-sentence, the cap is too low.
- Leave extra room when you use a reasoning model.

## Related terms

[Token](https://learn.ynteractive.com/content/glossary/token) · [Token pricing](https://learn.ynteractive.com/content/glossary/token-pricing) · [Context window](https://learn.ynteractive.com/content/glossary/context-window) · [Temperature](https://learn.ynteractive.com/content/glossary/temperature) · [Top-p (nucleus sampling)](https://learn.ynteractive.com/content/glossary/top-p)

## More AI basics terms

[Mixture of experts (MoE)](https://learn.ynteractive.com/content/glossary/mixture-of-experts) · [Model card](https://learn.ynteractive.com/content/glossary/model-card) · [Model distillation](https://learn.ynteractive.com/content/glossary/model-distillation) · [Model drift](https://learn.ynteractive.com/content/glossary/model-drift)

## Where you use it: free lessons

- [n8n AI Agent with Tools: Check Google Calendar, Book It and Log It](https://learn.ynteractive.com/content/n8n-ai-agent-tools-google-calendar-booking) (n8n, 11 min)
- [n8n AI Agent Tutorial: Save Social Media Ideas to Google Sheets](https://learn.ynteractive.com/content/n8n-ai-agent-tutorial-google-sheets) (n8n, 12 min)
- [Add AI to Make.com: ChatGPT Writes a Personal Reply, Gmail Sends It](https://learn.ynteractive.com/content/make-com-chatgpt-gmail-personalized-reply) (Make, 18 min)

## Frequently asked questions

**How many words is 1,000 tokens?**

For English text, OpenAI's rule of thumb is that one token is about three quarters of a word, so 1,000 tokens is roughly 750 words.

**Can I set max tokens in ChatGPT?**

Not in the normal chat app. It is a setting in the API and in tools that call it, like n8n, Make or Zapier.

**What happens if max tokens is too high?**

Usually nothing bad: the model stops when the answer is done. A high cap only matters if a prompt invites a very long answer.

[All AI glossary terms, A to Z](https://learn.ynteractive.com/content/glossary) · [Free prompt templates](https://learn.ynteractive.com/content/prompts)
