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

# DeepSeek

> Scan DeepSeek traffic through the PromptGuard proxy with any OpenAI client

## Proxy

<Note>
  **Proxy Base URL:** `https://api.promptguard.co/api/v1`

  Point your LLM SDK's `base_url` / `baseURL` to this endpoint. Your existing provider API key goes in the `Authorization` header as usual; add your PromptGuard key via `X-API-Key`.
</Note>

Model ids starting `deepseek-` go to DeepSeek, such as `deepseek-chat` and `deepseek-reasoner`. Hugging Face's `deepseek-ai/` ids are the exception: they go to [Hugging Face](/integrations/providers/huggingface).

DeepSeek speaks OpenAI's wire format, so PromptGuard forwards your request to `api.deepseek.com/v1` as you sent it and returns DeepSeek's reply unchanged. Any OpenAI client works.

<CodeGroup>
  ```python Python theme={"system"}
  import os
  from openai import OpenAI

  client = OpenAI(
      base_url="https://api.promptguard.co/api/v1",
      api_key=os.environ["DEEPSEEK_API_KEY"],  # forwarded to DeepSeek
      default_headers={"X-API-Key": os.environ["PROMPTGUARD_API_KEY"]},
  )

  response = client.chat.completions.create(
      model="deepseek-chat",
      messages=[{"role": "user", "content": "Hello!"}],
  )
  print(response.choices[0].message.content)
  ```

  ```typescript Node.js theme={"system"}
  import OpenAI from 'openai';

  const client = new OpenAI({
    baseURL: 'https://api.promptguard.co/api/v1',
    apiKey: process.env.DEEPSEEK_API_KEY, // forwarded to DeepSeek
    defaultHeaders: { 'X-API-Key': process.env.PROMPTGUARD_API_KEY },
  });

  const response = await client.chat.completions.create({
    model: 'deepseek-chat',
    messages: [{ role: 'user', content: 'Hello!' }],
  });
  console.log(response.choices[0].message.content);
  ```

  ```bash cURL theme={"system"}
  curl https://api.promptguard.co/api/v1/chat/completions \
    -H "X-API-Key: $PROMPTGUARD_API_KEY" \
    -H "Authorization: Bearer $DEEPSEEK_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{"model": "deepseek-chat", "messages": [{"role": "user", "content": "Hello!"}]}'
  ```
</CodeGroup>

DeepSeek keys cannot be [stored as provider keys](/gateway/provider-keys) yet, so send yours in `Authorization` on every request.

## Auto-instrumentation

DeepSeek has no SDK of its own; DeepSeek's docs use the OpenAI client. Pointed at `api.deepseek.com`, that client is the `openai` package, which [auto-instrumentation](/integrations/auto-instrumentation) patches, so `init()` scans those calls too.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.