Supported models
Enable a model from the Model APIs page in the Baseten dashboard.| Model | Slug | Context |
|---|---|---|
| DeepSeek V3 0324 | deepseek-ai/DeepSeek-V3-0324 | 164k |
| DeepSeek V3.1 | deepseek-ai/DeepSeek-V3.1 | 164k |
| GLM 4.6 | zai-org/GLM-4.6 | 200k |
| GLM 4.7 | zai-org/GLM-4.7 | 204K |
| GLM 5 | zai-org/GLM-5 | 327k |
| Kimi K2 0905 | moonshotai/Kimi-K2-Instruct-0905 | 128k |
| Kimi K2 Thinking | moonshotai/Kimi-K2-Thinking | 262k |
| Kimi K2.5 | moonshotai/Kimi-K2.5 | 262k |
| Minimax M2.5 | MiniMaxAI/MiniMax-M2.5 | 204k |
| OpenAI GPT OSS 120B | openai/gpt-oss-120b | 128k |
Create a chat completion
If you’ve already completed the quickstart, you have a working client. The examples below show a multi-turn conversation with a system message, which you can adapt for your application.- Python
- JavaScript
- cURL
Features
Model APIs support the full OpenAI Chat Completions API. You can generate structured outputs that conform to a JSON schema, use tool calling to let the model invoke functions you define, and enable reasoning for extended thinking on complex tasks. Setstream: true to receive responses as server-sent events.
For the complete parameter reference, see the Chat Completions API documentation.
Migrate from OpenAI
To migrate existing OpenAI code to Baseten, change three values:- Replace your API key with a Baseten API key.
- Change the base URL to
https://inference.baseten.co/v1. - Update the model name to a Baseten model slug.
Handle errors
Model APIs return standard HTTP error codes:| Code | Meaning |
|---|---|
| 400 | Invalid request (check your parameters) |
| 401 | Invalid or missing API key |
| 402 | Payment required |
| 404 | Model not found |
| 429 | Rate limit exceeded |
| 500 | Internal server error |