Skip to main content
This will help you get started with DeepSeek’s hosted chat models.
API ReferenceFor detailed documentation of all features and configuration options, head to the ChatDeepSeek API reference.
DeepSeek’s models are open source and can be run locally (e.g. in Ollama) or on other inference providers (e.g. , Together) as well.

Overview

Integration details

ClassPackageSerializableJS supportDownloadsVersion
ChatDeepSeeklangchain-deepseekbetaPyPI - DownloadsPyPI - Version

Model features

Tool callingStructured outputImage inputAudio inputVideo inputToken-level streamingNative asyncToken usageLogprobs
DeepSeek-R1, specified via model="deepseek-reasoner", does not support tool calling or structured output. Those features are supported by DeepSeek-V3 (specified via model="deepseek-chat").

Setup

To access DeepSeek models you’ll need to create a/an DeepSeek account, get an API key, and install the langchain-deepseek integration package.

Credentials

Head to DeepSeek’s API Key page to sign up to DeepSeek and generate an API key. Once you’ve done this set the DEEPSEEK_API_KEY environment variable:
To enable automated tracing of your model calls, set your LangSmith API key:

Installation

The LangChain DeepSeek integration lives in the langchain-deepseek package:

Instantiation

Now we can instantiate our model object and generate chat completions:

Invocation


API reference

For detailed documentation of all ChatDeepSeek features and configurations head to the API Reference.