Back to library
AI
tutorial

Integrate DeepSeek V4 with Claude Code CLI Tools

Run DeepSeek V4 through your terminal coding assistant.

Integrate DeepSeek V4 into Claude Code or OpenCode by utilizing the compatible Anthropic and OpenAI interfaces.

Claude

The Scenario

A software engineer wants to use AI to refactor code directly from their terminal without switching windows.

Before & after

The old way

Developers manually copy-paste code snippets between a web-based AI and their IDE, which takes 15–20 minutes of back-and-forth for complex files.

With AI

Run 'npm install -g @anthropic-ai/claude-code' and configure it to use DeepSeek V4 Pro, completing the setup in 5 minutes.

The Prompt

Install Claude Code by running 'npm install -g @anthropic-ai/claude-code' and then configure it to use the DeepSeek API endpoint with the model set to deepseek-v4-pro.

DeepSeek V4 models can be integrated directly into CLI tools like Claude Code, allowing for terminal-based AI assistance.

Source

Change Log | DeepSeek API Docs
"DeepSeek API now supports V4-Pro and V4-Flash, available via both the OpenAI ChatCompletions interface and the Anthropic interface."