// how to

How to Use DeepSeek in Claude Code, OpenCode and Other Apps

Most apps that let you choose an AI provider can use DeepSeek. Get an API key from platform.deepseek.com, then either pick DeepSeek in the app’s provider list or enter DeepSeek’s base URL (https://api.deepseek.com for OpenAI-style apps, https://api.deepseek.com/anthropic for Anthropic-style apps) and the model name deepseek-flash. For a private setup, point the app at a local model in Ollama instead.

By Published Last updated 2 min read

The short version

DeepSeek’s API copies the formats of OpenAI’s and Anthropic’s, so apps built for those can usually switch to DeepSeek by changing three settings: the base URL, the API key and the model name.

Step by step

1. Get a key

Sign in at platform.deepseek.com, top up, and create a key on the API Keys page. See use the DeepSeek API.

2. Find the app’s provider settings

Look for “Provider”, “Model”, “API” or “Custom endpoint” in the app’s settings.

3. Enter DeepSeek’s details

Setting Value
Base URL (OpenAI-style apps) https://api.deepseek.com
Base URL (Anthropic-style apps) https://api.deepseek.com/anthropic
Model deepseek-flash
API key your DeepSeek key

4. Test with something small

Ask a simple question and check your usage on the platform’s Usage page.

Two documented examples

Claude Code: DeepSeek’s guide sets environment variables before you run claude, starting with:

text
export ANTHROPIC_BASE_URL=https://api.deepseek.com/anthropic
export ANTHROPIC_AUTH_TOKEN=<your DeepSeek API key>
export ANTHROPIC_MODEL=deepseek-flash[1m]

Copy the full list from DeepSeek’s page; it sets several more.

OpenCode: run opencode, type /connect, enter deepseek, select the provider, paste your key, and choose the model. DeepSeek recommends OpenCode v1.18.30 or newer.

Running it locally instead

Apps that support Ollama can use a DeepSeek model on your own computer, with no API key and no data sent to DeepSeek. Ollama’s library page even lists launch commands, such as ollama launch opencode --model deepseek-r1. Expect lower quality than the API’s models. See run DeepSeek with Ollama.

Prompts to copy

Once DeepSeek is connected to a coding agent, a safe first task:

text
Read this project and explain its structure in 10 bullet points.
Don't change any files. List the three things you'd improve first, and why.

Example

Setup: OpenCode connected to DeepSeek through /connect, working in a copy of a small website project.

First run: the explain-only prompt above, then one small change (“Add alt text to every image in the gallery page”). You review the diff before accepting it.

Mistakes to avoid

  • Pasting the key into shared config files or committing it to Git. Use environment variables, and revoke the key if it leaks.
  • Using old model names. Older guides may say deepseek-chat or deepseek-reasoner, which DeepSeek said would stop working after July 24, 2026.
  • Forgetting where the data goes. Through the API, your code and prompts go to DeepSeek’s servers. Check your employer’s rules. See use DeepSeek safely at work.
  • Letting an agent run unchecked. Approve commands and review changes.

Good to know

For agents, a short instructions file about your project helps any model; our AGENTS.md generator makes one.

Related: code with DeepSeek and use the DeepSeek API.

Frequently asked questions

Which apps does DeepSeek officially document?

DeepSeek's API docs have setup guides for DeepSeek Harness, Claude Code, Codex, OpenCode, OpenClaw, Hermes, Reasonix, WorkBuddy/CodeBuddy and Qoder. DeepSeek also keeps a GitHub list of community integrations, from editor extensions to chat clients.

Does using DeepSeek inside another app cost money?

Yes, through the API. You pay DeepSeek per token from your topped-up balance, on top of anything the app itself charges. Web search through Claude Code also uses DeepSeek's Search API, which DeepSeek bills per request from November 1, 2026 (Beijing time).

Sources

  1. DeepSeek API Docs: your first API call (integrate with agent tools)
  2. DeepSeek API Docs: integrate with Claude Code
  3. DeepSeek API Docs: integrate with OpenCode
  4. GitHub: awesome-deepseek-integration (DeepSeek)
  5. DeepSeek: DeepSeek-V4 Preview announcement (model name retirement)
  6. Ollama library: deepseek-r1