# Deepseek (https://www.librechat.ai/docs/configuration/librechat_yaml/ai_endpoints/deepseek)

import Image from 'next/image'

Deepseek serves its chat, coder, and reasoner models through an OpenAI-compatible API that you can add to LibreChat as a custom endpoint.

## Get an API key

Create a key from the [Deepseek platform](https://platform.deepseek.com/usage). Add it to your `.env` file:

```bash filename=".env"
DEEPSEEK_API_KEY=your-api-key
```

## Configuration

Add the endpoint under `endpoints.custom` in your `librechat.yaml`:

```yaml filename="librechat.yaml"
    - name: "Deepseek"
      apiKey: "${DEEPSEEK_API_KEY}"
      baseURL: "https://api.deepseek.com/v1"
      models:
        default: ["deepseek-chat", "deepseek-coder", "deepseek-reasoner"]
        fetch: false
      titleConvo: true
      titleModel: "deepseek-chat"
      modelDisplayLabel: "Deepseek"
```

## Notes

- `deepseek-chat` and `deepseek-coder` work with [Agents and tools](/docs/features/agents).
- `deepseek-reasoner`, codenamed "R1," is supported and streams its thought process, but some OpenAI API parameters may not work with it. R1 can also work with Agents when tools are not used.
- `deepseek-chat` is the preferred model for title generation.

<Image src="https://firebasestorage.googleapis.com/v0/b/superb-reporter-407417.appspot.com/o/chrome_GsVGKQ8aF3.png?alt=media&token=30cde5cd-3b62-428a-bd24-b58afff0e4bb" alt="Deepseek Generation" width={943} height={747}/>
