---
title: "Temperature"
type: "glossary term"
url: "https://aifordevs.org/glossary#temperature"
markdown: "https://aifordevs.org/glossary/temperature.md"
publisher: "AI for Devs"
license: "https://aifordevs.org/reuse"
attribution: "Credit AI for Devs and link to https://aifordevs.org/glossary#temperature"
---

# Temperature

Temperature is a sampling setting that divides the model's logits before they are converted to token probabilities. Lower values make output more deterministic, and higher values make it more varied.

A temperature of 0 does not guarantee identical outputs, as Anthropic's glossary says of its own API. As of November 8, 2026, Claude 4.7 and later models accept only the default sampling values, and API version 2026-10-21 rejects any request that sends temperature, top_p, or top_k. On those models, steer output with the prompt and effort settings.

## Example

Two tokens with logits 2.0 and 1.0 get probabilities 0.73 and 0.27 at temperature 1. At temperature 0.5 they get 0.88 and 0.12.

## Source

[Anthropic docs: Migrating to API version 2026-10-21](https://platform.claude.com/docs/en/api/migration-2026-10-21)

## Related terms

- [Top-p](https://aifordevs.org/glossary#top-p)
- [Token](https://aifordevs.org/glossary#token)

## Cite this term

AI for Devs. "Temperature." https://aifordevs.org/glossary#temperature

- Page: https://aifordevs.org/glossary#temperature
- Markdown: https://aifordevs.org/glossary/temperature.md
- Reuse: Quote or summarize with a link to this page. Terms: https://aifordevs.org/reuse
- Publisher: AI for Devs
