How to Use DeepSeek V3.1 in Claude Code on Windows, Mac, and Linux

Use DeepSeek V3.1 in Claude Code

Claude Code offers more powerful agent capabilities than other AI-powered code editors like Cursor. By integrating DeepSeek V3.1 through Novita AI’s platform, developers can access revolutionary hybrid thinking capabilities at a fraction of the cost.

DeepSeek V3.1 through Novita AI provides an OpenAI-compatible and anthropic-compatible LLM API with higher rate limits than official channels. This guide covers setting up DeepSeek V3.1 with Claude Code on Windows, Mac, and Linux systems.

Current pricing on Novita AI: 163840 Context, $0.55/1M input tokens, $1.66/1M output tokens

What is Claude Code

Claude Code Interface

Claude Code is an agentic command line tool that revolutionizes the way developers interact with AI for coding tasks. Unlike traditional code editors, Claude Code offers more powerful agent abilities than Cursor.

This innovative tool enables developers to delegate complex coding tasks directly from their terminal. It transforms natural language descriptions into fully functional code, making it an indispensable asset for modern development workflows.

The tool operates as an interactive session where developers can describe their requirements in plain English. Claude Code intelligently generates, modifies, and optimizes code accordingly. Its advanced understanding of context and project structure allows it to make informed decisions about code architecture, dependencies, and implementation patterns.

Why Use DeepSeek V3.1 in Claude Code

DeepSeek V3.1 presents a compelling alternative to traditional Claude models, offering revolutionary hybrid thinking capabilities at significantly reduced costs. The economic advantages are substantial:

  • DeepSeek V3.1 on Novita AI: $0.55 per 1M input tokens and $1.66 per 1M output tokens
  • Claude Sonnet: $3 per 1M input tokens and $15 per 1M output tokens

Beyond cost savings, DeepSeek V3.1 through Novita AI provides an OpenAI-compatible and anthropic-compatible LLM API with higher rate limits than official channels. This compatibility ensures seamless integration with existing Claude Code workflows while offering improved performance and reliability.

The combination delivers enterprise-grade AI capabilities with revolutionary features:

  • Hybrid thinking mode: One model supports both thinking mode and non-thinking mode by changing the chat template
  • Smarter tool calling: Post-training optimization significantly improves performance in tool usage and agent tasks
  • Higher thinking efficiency: Achieves comparable answer quality while responding more quickly
  • Extended context window: 163,840 tokens for handling larger codebases

This makes advanced AI development accessible to a broader range of developers and organizations.

Getting Your API Key on Novita AI

Sign up for a Novita AI account to get started with free trial credits. Navigate to the Key Management page in your dashboard and click “Create New Key.”

Copy the generated API key immediately and store it securely – it won’t be displayed again. You’ll need this key for the configuration steps below.

Installing Claude Code

Before installing Claude Code, ensure your system meets the minimum requirements. Node.js 18 or higher must be installed on your local environment. You can verify your Node.js version by running node --version in your terminal.

For Windows, Mac, and Linux

Open Command Prompt (Windows) or Terminal (Mac/Linux) and run:

npm install -g @anthropic-ai/claude-code

The global installation ensures Claude Code is accessible from any directory on your system. The installation process automatically configures the necessary dependencies and PATH variables across all platforms.

Setting Up Environment Variables

Environment variables configure Claude Code to use DeepSeek V3.1 through Novita AI’s API endpoints. These variables tell Claude Code where to send requests and how to authenticate.

For Windows

Open Command Prompt and set the following environment variables:

set ANTHROPIC_BASE_URL=https://api.novita.ai/anthropic
set ANTHROPIC_AUTH_TOKEN=<Novita API Key>
set ANTHROPIC_MODEL=deepseek/deepseek-v3.1
set ANTHROPIC_SMALL_FAST_MODEL=deepseek/deepseek-v3.1

Replace <Novita API Key> with your actual API key obtained from the Novita AI platform. These variables remain active for the current session and must be reset if you close the Command Prompt.

For Mac and Linux

Open Terminal and export the following environment variables:

export ANTHROPIC_BASE_URL="https://api.novita.ai/anthropic"
export ANTHROPIC_AUTH_TOKEN="<Novita API Key>"
export ANTHROPIC_MODEL="deepseek/deepseek-v3.1"
export ANTHROPIC_SMALL_FAST_MODEL="deepseek/deepseek-v3.1"

Starting Claude Code

With installation and configuration complete, you can now start Claude Code in your project directory. Navigate to your desired project location using the cd command:

cd <your-project-directory>
claude .

The dot (.) parameter instructs Claude Code to operate in the current directory. Upon startup, you’ll see the Claude Code prompt appear in an interactive session.

This indicates the tool is ready to receive your instructions. The interface provides a clean, intuitive environment for natural language programming interactions.

Building Your First Project

Claude Code excels at transforming detailed project descriptions into functional applications. After entering your prompt, press Enter to begin the task. Claude Code will analyze your requirements, create the necessary files, implement the functionality, and provide a complete project structure with documentation.

Example Test Prompt:

Create a simple todo list web application with the following features:
- HTML frontend with modern CSS styling
- JavaScript for adding, completing, and deleting tasks
- Local storage to persist tasks between sessions
- Responsive design that works on mobile devices
- Clean, minimalist interface with smooth animations

Please create all necessary files and explain the project structure.

DeepSeek V3.1’s hybrid thinking mode will analyze this request, plan the optimal project architecture, and generate a complete working application with all specified features.

Using Claude Code in VSCode or Cursor

Claude Code integrates seamlessly with popular development environments. It enhances your existing workflow rather than replacing it.

You can use Claude Code directly in the terminal within VSCode or Cursor. This maintains access to your familiar development tools while leveraging AI assistance.

Additionally, Claude Code plugins are available for both VSCode and Cursor. These plugins provide deeper integration with these editors, offering inline AI assistance, code suggestions, and project management features directly within your IDE interface.

Claude Code in Cursor

The terminal integration allows you to run Claude Code commands without leaving your development environment. This creates a streamlined workflow for AI-assisted development.

Help and Documentation Resources

Claude Code includes comprehensive help documentation accessible through the /help command. This command displays available commands, usage examples, and troubleshooting information.

The help system is context-aware, providing relevant information based on your current project and session state.

For additional support, Novita AI provides extensive documentation. This covers advanced configuration options, API usage patterns, and best practices.

The Anthropic documentation offers detailed information about Claude Code’s capabilities and features.

Conclusion

DeepSeek V3.1 integration with Claude Code through Novita AI delivers enterprise-grade capabilities with revolutionary hybrid thinking at significantly reduced costs. The combination transforms natural language descriptions into functional code, dramatically accelerating development workflows. Start your journey with DeepSeek V3.1 and Claude Code today to experience the future of AI-assisted programming.

Novita AI is an AI cloud platform that offers developers an easy way to deploy AI models using our simple API, while also providing the affordable and reliable GPU cloud for building and scaling.


Discover more from Novita

Subscribe to get the latest posts sent to your email.

Leave a Comment

Scroll to Top

Discover more from Novita

Subscribe now to keep reading and get access to the full archive.

Continue reading