Skip to main content
Call hosted LLMs through endpoints compatible with the OpenAI Chat Completions API and the Anthropic Messages API (beta). Point an existing OpenAI or Anthropic SDK at Baseten’s inference endpoint. You do not need to deploy a model. Model APIs run a supported set of models on infrastructure managed by Baseten. Choose a dedicated deployment when you need another model, dedicated GPUs, or control over hardware and scaling.

Supported models

Choose a model below, then run inference with its slug.
Context and output limits reflect Baseten’s live serving configuration and can differ from a model’s advertised maximum. Baseten may extend a limit after validating its performance. This table and /v1/models reflect the current serving configuration.
Some models also have a Fast tier for latency-sensitive workloads. Fast models use the same weights as their base models but run on dedicated capacity for higher sustained per-user throughput. Each Fast model has its own slug, pricing, and rate limits. For example, use zai-org/GLM-5.2-Fast instead of zai-org/GLM-5.2. If Fast capacity is saturated, Baseten serves the request on base-model capacity instead of failing it.

Feature support

All models support tool calling (also known as function calling), structured outputs, and JSON mode. The table shows which models also support reasoning, vision, and audio. See Reasoning, Vision, and Audio for feature-specific configuration.
GLM 4.7 and Nemotron Ultra also support top_p and top_k sampling parameters. GLM 5.2 and GLM 5.2 Fast support top_p.

Run inference

Choose the OpenAI Chat Completions API or the Anthropic Messages API, then set the base URL, API key, and model slug.

Use the OpenAI SDK

The OpenAI Chat Completions API is available at https://inference.baseten.co/v1/chat/completions.
To call a model with the Chat Completions API:
chat_completions.py
Replace the example slug with any model from the supported models table.

Use the Anthropic SDK

The Anthropic Messages API is available at https://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.
To call a model with the Messages API:
messages_api.py
The Anthropic SDK sends the API key as x-api-key by default. Baseten reads Authorization, so override default_headers as shown.

List available models

Query /v1/models for the current model list and metadata, including pricing, context windows, and supported features:
Request

Migrate

To migrate to Baseten, change the base URL, API key, and model name.
To migrate from the OpenAI SDK:
  1. Replace your OpenAI API key with a Baseten API key.
  2. Change the base URL to https://inference.baseten.co/v1.
  3. 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 failure. See Inference errors for causes and recommended responses.

Next steps

Coding agents

Call Model APIs from Pi, Droid, or OpenCode, or connect Claude Code and Codex CLI with Baseten Switch.

Reasoning

Control extended thinking for complex tasks.

Vision

Send images and videos alongside text.

Audio

Send audio alongside text.

Pricing and limits

Review pricing, rate limits, budgets, and usage tracking.

API reference

Review Chat Completions parameters.