Models
Model Parameters
Learn how to choose a model and set common parameters in OpenAI-compatible requests.
Specify A Model
For chat completions, model is required. Use the model identifier shown on the model page or in the console:
const completion = await openai.chat.completions.create({
model: 'deepseek/deepseek-chat-v3',
messages: [{ role: 'user', content: 'Explain quantum computing' }],
});Common Parameters
| Parameter | Description |
|---|---|
temperature | Controls randomness. Higher values make output more varied. |
top_p | Nucleus sampling parameter. Avoid changing it aggressively together with temperature. |
max_tokens | Limits how many tokens the response can generate. |
stream | Set to true to receive an SSE stream. |
response_format | Requests a specific output format such as JSON; support depends on the model. |
Capability Differences
Support can differ by model for:
- Context length
- Image or multimodal input
- Tool calls
- JSON mode
- Reasoning fields
- Sampling parameters
If a parameter is not supported by the selected model, the server may return a parameter error or ignore some optional parameters. For production, validate the smallest request shape with the target model first.
Selection Suggestions
- Start with the required capability, such as text, image, long context, or tool calling.
- Then compare response speed, price, and stability.
- For production tasks, use separate API keys and quota limits for different scenarios to simplify monitoring and risk control.