Skip to main content
This guide provides a quick overview for getting started with ChatBaseten chat models. Baseten provides inference designed for production applications. Built on the Baseten Inference Stack, these APIs deliver enterprise-grade performance and reliability for leading open-source or custom models: https://www.baseten.co/library/.

Overview

Details

Features

Model APIs only support text input, while some dedicated deployments support image and audio input depending on model. Check the Baseten model library for details: https://www.baseten.co/library/

Setup

To access Baseten models, you’ll need to create a Baseten account, get an API key, and install the langchain-baseten integration package. Head to the Baseten website to create an account and generate an API key. Once you’ve done this, set the BASETEN_API_KEY environment variable:

Credentials

Set API key
To enable automated of your model calls, set your LangSmith API key:
Enable tracing

Installation

The LangChain Baseten integration lives in the langchain-baseten package:

Instantiation

Baseten offers two ways to access chat models:
  1. Model APIs: For access to the latest, most popular opensource models.
  2. Dedicated URLs: Use specific model deployments with dedicated resources.
Both approaches are supported with automatic endpoint normalization.
Initialize with model slug
Initialize with model URL

Invocation

Basic invocation
You can also use message objects for more complex conversations:
Full guides are available on chat model invocation types, message types, and content blocks.