Skip to main content
temperature controls randomness. Lower values generally work better for code and math; higher values produce more varied text for creative writing. The supported range depends on the provider:
  • 0–1: Claude, Cohere, Zhipu, ERNIE, Kimi, Doubao, Baichuan, Mistral, and MiniMax.
  • 0–2: OpenAI, DeepSeek, Gemini, Qwen, Tencent Hunyuan, Yi, iFlytek Spark, Microsoft Phi, Grok, Llama, and Nova.
Some providers, including ERNIE and Zhipu, do not accept zero. Use 0.1 instead.

Model defaults

Omit temperature to use the model’s default. For other tasks, adjust relative to the provider’s range rather than copying a DeepSeek value unchanged. Most reasoning models manage sampling themselves and do not support an explicit temperature.