Supported models
Run inference against any Model API to get started.Context and output limits reflect Baseten’s live serving configuration, which can differ from a model’s advertised native maximum. We extend limits as they meet our performance bar; this table and
/v1/models always reflect what’s currently served.Pricing
Model APIs bill per million tokens. For current per-model rates, see the Model APIs pricing page. Cached input tokens are prompt tokens served from the KV cache, billed at a discounted rate. Every request participates in caching automatically, with no flags or opt-in steps.Feature support
All models support tool calling (also known as function calling), structured outputs, and JSON mode. See the table below for per-model coverage of reasoning, vision, and audio. For reasoning-specific configuration, see Reasoning. For image and video inputs, see Vision. For audio inputs, see Audio.GLM models, Nemotron Super, and Nemotron Ultra also support
top_p and top_k sampling parameters.Run inference
Model APIs support both OpenAI’s Chat Completions and Anthropic’s Messages APIs. Set your base URL, API key, and model name to start making requests.Use the OpenAI SDK
Call supported models using the OpenAI Chat Completions API athttps://inference.baseten.co/v1/chat/completions.
- Python
- JavaScript
- cURL
To call a model with the Chat Completions API:
chat_completions.py
Use the Anthropic SDK
Call supported models using the Anthropic Messages API athttps://inference.baseten.co/v1/messages.
Anthropic Messages API support is in beta. Behavior may change before general availability. For production workloads, use the OpenAI Chat Completions API.
- Python
- JavaScript
- cURL
To call a model with the Messages API:
messages_api.py
x-api-key by default. Baseten reads Authorization, so override default_headers as shown.
List available models
Query the/v1/models endpoint for the current list of models with metadata including pricing, context windows, and supported features:
Request
Migrate
To migrate to Baseten, change the base URL, API key, and model name.- OpenAI SDK
- Anthropic SDK
To migrate from the OpenAI SDK:
- Replace your OpenAI 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.
migrate.py
Handle errors
Model APIs return standard HTTP error codes:
Each error response includes a JSON body with details about the issue and suggested resolutions.
Next steps
Reasoning
Control extended thinking for complex tasks
Vision
Send images and videos alongside text
Audio
Send audio alongside text
Rate limits
Understand and configure rate limits
API reference
Complete parameter documentation