Skip to main content
Baseten is a provider of all the infrastructure you need to deploy and serve ML models performantly, reliably, and scalably.
As a model inference platform, Baseten is a Provider in the LangChain ecosystem. The Baseten integration currently implements Chat Models and Embeddings components.
Baseten lets you access both open source models like Kimi K2 or GPT OSS on model APIs by specifying a model slug and run proprietary or fine-tuned models on dedicated GPUs through dedicated deployments by specifying a model_url.

Installation and Setup

You’ll need two things to use Baseten models with LangChain: Export your API key to your as an environment variable called BASETEN_API_KEY.
export BASETEN_API_KEY="paste_your_api_key_here"

Chat Models (Model APIs and Dedicated Deployments)

See a usage example.
from langchain_baseten import ChatBaseten

Embeddings (Dedicated Deployments Only)

See a usage example.
from langchain_baseten import BasetenEmbeddings

Connect these docs to Claude, VSCode, and more via MCP for real-time answers. See how
I