> ## Documentation Index
> Fetch the complete documentation index at: https://docs.pipecat.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# DeepSeek

> LLM service implementation using DeepSeek's API with OpenAI-compatible interface

## Overview

`DeepSeekLLMService` provides access to DeepSeek's language models through an OpenAI-compatible interface. It inherits from `OpenAILLMService` and supports streaming responses, function calling, and context management with advanced reasoning capabilities.

<CardGroup cols={2}>
  <Card title="DeepSeek LLM API Reference" icon="code" href="https://reference-server.pipecat.ai/en/latest/api/pipecat.services.deepseek.llm.html">
    Pipecat's API methods for DeepSeek integration
  </Card>

  <Card title="Example Implementation" icon="play" href="https://github.com/pipecat-ai/pipecat/blob/main/examples/function-calling/function-calling-deepseek.py">
    Complete example with function calling
  </Card>

  <Card title="DeepSeek Documentation" icon="book" href="https://api-docs.deepseek.com/api/create-chat-completion">
    Official DeepSeek API documentation and features
  </Card>

  <Card title="DeepSeek Platform" icon="microphone" href="https://platform.deepseek.com/">
    Access models and manage API keys
  </Card>
</CardGroup>

## Installation

To use DeepSeek services, install the required dependency:

```bash theme={null}
uv add "pipecat-ai[deepseek]"
```

## Prerequisites

### DeepSeek Account Setup

Before using DeepSeek LLM services, you need:

1. **DeepSeek Account**: Sign up at [DeepSeek Platform](https://platform.deepseek.com/)
2. **API Key**: Generate an API key from your account dashboard
3. **Model Selection**: Choose from available DeepSeek models with reasoning capabilities

### Required Environment Variables

* `DEEPSEEK_API_KEY`: Your DeepSeek API key for authentication

## Configuration

<ParamField path="api_key" type="str" required>
  DeepSeek API key for authentication.
</ParamField>

<ParamField path="base_url" type="str" default="https://api.deepseek.com/v1">
  Base URL for DeepSeek API endpoint.
</ParamField>

<ParamField path="model" type="str" default="None" deprecated>
  Model identifier to use.

  *Deprecated in v0.0.105. Use `settings=DeepSeekLLMService.Settings(model=...)` instead.*
</ParamField>

<ParamField path="settings" type="DeepSeekLLMService.Settings" default="None">
  Runtime-configurable settings. See [Settings](#settings) below.
</ParamField>

### Settings

Runtime-configurable settings passed via the `settings` constructor argument using `DeepSeekLLMService.Settings(...)`. These can be updated mid-conversation with `LLMUpdateSettingsFrame`. See [Service Settings](/pipecat/fundamentals/service-settings) for details.

This service uses the same settings as `OpenAILLMService`. See [OpenAI LLM Settings](/api-reference/server/services/llm/openai#settings) for the full parameter reference.

## Usage

### Basic Setup

```python theme={null}
import os
from pipecat.services.deepseek import DeepSeekLLMService

llm = DeepSeekLLMService(
    api_key=os.getenv("DEEPSEEK_API_KEY"),
    model="deepseek-chat",
)
```

### With Custom Settings

```python theme={null}
from pipecat.services.deepseek import DeepSeekLLMService

llm = DeepSeekLLMService(
    api_key=os.getenv("DEEPSEEK_API_KEY"),
    settings=DeepSeekLLMService.Settings(
        model="deepseek-chat",
        temperature=0.7,
        top_p=0.9,
        max_tokens=2048,
    ),
)
```

## Notes

* DeepSeek does not support the `seed` and `max_completion_tokens` parameters. Use `max_tokens` instead.
* DeepSeek models offer strong reasoning capabilities, particularly the `deepseek-reasoner` model variant.

<Tip>
  The `InputParams` / `params=` pattern is deprecated as of v0.0.105. Use
  `Settings` / `settings=` instead. See the [Service Settings
  guide](/pipecat/fundamentals/service-settings) for migration details.
</Tip>
