sourc.dev
Home LLMs Tools SaaS APIs
Claude 3.5 Sonnet input $3.00/1M ↓ -50%
GPT-4o input $2.50/1M
Gemini 1.5 Pro input $1.25/1M
Mistral Large input $2.00/1M ↓ -33%
DeepSeek V3 input $0.27/1M
synced 2026-04-05
Claude 3.5 Sonnet input $3.00/1M ↓ -50%
GPT-4o input $2.50/1M
Gemini 1.5 Pro input $1.25/1M
Mistral Large input $2.00/1M ↓ -33%
DeepSeek V3 input $0.27/1M
synced 2026-04-05
#35 of 50

Temperature

The knob that controls creativity vs consistency

What is temperature

Temperature is a parameter that controls the randomness of a language model's output. A temperature of 0 makes the model deterministic — it always picks the most probable next token. A temperature of 1 allows more varied, creative responses. Values above 1 produce increasingly random output.

Most API providers default to temperature 0.7. For code generation and factual tasks, lower temperatures (0–0.3) produce more reliable results. For creative writing and brainstorming, higher temperatures (0.7–1.0) are preferred.

Why it matters

Temperature does not affect cost — the same number of tokens are generated regardless. It affects quality and consistency. If your application requires reproducible output (test generation, data extraction, structured responses), set temperature to 0. If it requires variety (content generation, suggestion engines), increase it.

Verified March 2026 · Source: OpenAI API docs, Anthropic docs

Related terms
TokenPrompt engineering
← All terms
← Prompt engineering API endpoint →