How to Run DeepSeek R1 & V3 API for Free

Community Article Published March 29, 2025

DeepSeek has revolutionized the AI landscape with its powerful open-source models that rival even the most expensive proprietary options. DeepSeek R1 and V3 have garnered attention from the tech community for their exceptional performance in reasoning, coding, and math tasks. In this tutorial, we'll explore multiple methods to access these powerful AI models completely free of charge.

Tired of Postman? Want a decent postman alternative that doesn't suck?

Apidog is a powerful all-in-one API development platform that's revolutionizing how developers design, test, and document their APIs.

Unlike traditional tools like Postman, Apidog seamlessly integrates API design, automated testing, mock servers, and documentation into a single cohesive workflow. With its intuitive interface, collaborative features, and comprehensive toolset, Apidog eliminates the need to juggle multiple applications during your API development process.

Whether you're a solo developer or part of a large team, Apidog streamlines your workflow, increases productivity, and ensures consistent API quality across your projects.

Table of Contents

  1. Understanding DeepSeek Models
  2. Method 1: Using Nebius AI Studio with OpenRouter
  3. Method 2: Integrating with Bolt.DIY
  4. Method 3: Using DeepSeek with Cursor IDE
  5. Method 4: Accessing via Kluster.ai
  6. Method 5: Using Hyperbolic
  7. Method 6: Direct API Integration
  8. Troubleshooting

Understanding DeepSeek Models

DeepSeek offers two flagship models that have gained significant traction in the AI community:

DeepSeek V3

DeepSeek V3 is their general-purpose large language model designed for a wide array of tasks including content generation, creative writing, and detailed explanations. It's particularly effective for long-form content and complex reasoning.

DeepSeek R1 (Reasoner)

DeepSeek R1, also known as DeepSeek Reasoner, is specifically optimized for tasks requiring step-by-step reasoning, mathematical problem-solving, and coding. It excels in scenarios where logical deduction and analytical thinking are paramount.

Both models are released under the permissive MIT license, allowing anyone to leverage, fine-tune, or host them according to their needs without commercial restrictions.

Method 1: Using Nebius AI Studio with OpenRouter

This method leverages Nebius AI Studio's free credits combined with OpenRouter's unified API gateway to access DeepSeek models without cost.

Step 1: Set Up Nebius AI Studio

  1. Sign up for a Nebius AI Studio account at nebius.ai
  2. Upon registration, you'll automatically receive $1 in free credits
  3. Navigate to your account dashboard and find the API Keys section
  4. Generate a new API key and copy it to a secure location for later use

Step 2: Configure OpenRouter

  1. Create an account on OpenRouter
  2. Go to the Models section and search for "DeepSeek"
  3. Browse the available models - you'll see options for both DeepSeek R1 and V3
  4. Select your preferred model to view provider details
  5. Locate the Nebius provider and click on the key icon to set up integration
  6. In the configuration popup, paste your Nebius API key and save
  7. Return to the OpenRouter dashboard and generate an OpenRouter API key
  8. Copy this key as you'll need it to access the models

Step 3: Test Your Configuration

To verify your setup is working correctly, you can make a direct API call:

curl https://api.openrouter.ai/api/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_OPENROUTER_API_KEY" \
  -d '{
    "model": "deepseek/deepseek-chat",  # For V3
    # "model": "deepseek/deepseek-r1",  # For R1
    "messages": [
      {"role": "user", "content": "What are you capable of?"}
    ]
  }'

Method 2: Integrating with Bolt.DIY

Bolt.DIY is an open-source development tool that lets you build AI-powered applications. Here's how to integrate DeepSeek models:

Step 1: Set Up Bolt.DIY

  1. Clone the Bolt.DIY repository:

    git clone https://github.com/ottomated/bolt.diy.git
    cd bolt.diy
    npm install
    
  2. Launch the application:

    npm run dev
    
  3. Access the interface in your browser at http://localhost:5173

Step 2: Modify the OpenRouter Integration

  1. Navigate to the file /app/lib/modules/llm/providers/open-router.ts in your project directory

  2. Locate the model definitions section

  3. Modify or add an entry for DeepSeek models:

    {
      name: 'deepseek/deepseek-chat',  // For V3
      // name: 'deepseek/deepseek-r1',  // For R1
      label: 'Nebius-DeepSeek-V3',
      provider: 'OpenRouter',
      maxTokenAllowed: 8000,
    },
    

Step 3: Configure Bolt.DIY Interface

  1. In the Bolt.DIY interface, select "OpenRouter" as your provider
  2. Choose the "Nebius-DeepSeek-V3" option from the dropdown menu
  3. Enter your OpenRouter API key (generated in Method 1) when prompted
  4. Click the checkmark to save your configuration
  5. Start creating AI-powered applications with DeepSeek!

Method 3: Using DeepSeek with Cursor IDE

Cursor is an AI-enhanced code editor that can leverage DeepSeek models for coding assistance.

Step 1: Install Cursor

  1. Download and install Cursor from cursor.sh
  2. Launch the application and complete the initial setup

Step 2: Configure OpenRouter in Cursor

  1. Go to Settings > Models
  2. Click on "Add Model"
  3. Enter the appropriate model ID:
    • For V3: deepseek/deepseek-chat
    • For R1: deepseek/deepseek-r1
  4. Enable the OpenAI API Key toggle
  5. Paste your OpenRouter API key
  6. Override the OpenAI baseURL with OpenRouter's baseURL: https://api.openrouter.ai/api/v1
  7. Click "Save" and then "Verify" to confirm your configuration

Step 3: Using DeepSeek in Cursor

  1. Open the Cursor chat panel
  2. Select your configured DeepSeek model from the dropdown menu
  3. Start coding and leverage DeepSeek's powerful code generation capabilities

Method 4: Accessing via Kluster.ai

Kluster.ai offers another route to access DeepSeek models with free credits.

  1. Create an account on kluster.ai
  2. Verify your email (check spam folder if necessary)
  3. Upon registration, you'll receive 100 free credits
  4. Navigate to the API section to generate an API key
  5. Use this key with your preferred API client or integration

Method 5: Using Hyperbolic

Hyperbolic is another service that provides access to DeepSeek models with free credits.

  1. Sign up for an account at Hyperbolic
  2. You'll receive 10 free credits upon registration
  3. Generate an API key from your account dashboard
  4. Use this key with your applications or even run the models on Kaggle for completely free usage

Using Hyperbolic with Kaggle

  1. Create a Kaggle account if you don't have one
  2. Start a new notebook
  3. Install the necessary packages:
    !pip install hyperbolic-ai
    
  4. Connect to Hyperbolic:
    from hyperbolic_ai import Hyperbolic
    client = Hyperbolic(api_key="YOUR_HYPERBOLIC_API_KEY")
    
  5. Use DeepSeek models:
    response = client.chat.completions.create(
        model="deepseek/deepseek-r1",
        messages=[
            {"role": "user", "content": "Solve this math problem: If x^2 + 5x + 6 = 0, what are the values of x?"}
        ]
    )
    print(response.choices[0].message.content)
    

Method 6: Direct API Integration

You can also directly integrate with the DeepSeek API using their OpenAI-compatible format:

from openai import OpenAI

client = OpenAI(
    api_key="YOUR_DEEPSEEK_API_KEY",
    base_url="https://api.deepseek.com"
)

response = client.chat.completions.create(
    model="deepseek-chat",  # For V3
    # model="deepseek-reasoner",  # For R1
    messages=[
        {"role": "system", "content": "You are a helpful assistant."},
        {"role": "user", "content": "Hello!"}
    ],
    stream=False
)

print(response.choices[0].message.content)

For Node.js:

import OpenAI from "openai";

const openai = new OpenAI({
    baseURL: 'https://api.deepseek.com',
    apiKey: 'YOUR_DEEPSEEK_API_KEY'
});

async function main() {
    const completion = await openai.chat.completions.create({
        messages: [
            {role: "system", content: "You are a helpful assistant."},
            {role: "user", content: "Hello!"}
        ],
        model: "deepseek-chat", // For V3
        // model: "deepseek-reasoner", // For R1
    });
    
    console.log(completion.choices[0].message.content);
}

main();

Troubleshooting

API Key Issues

  • Double-check that your API keys are correctly copied and pasted
  • Ensure you're using the right key for each service (Nebius, OpenRouter, etc.)
  • Verify that your account has sufficient credits available

Model Access Problems

  • Confirm that you're using the correct model ID:
    • DeepSeek V3: deepseek/deepseek-chat or deepseek-chat
    • DeepSeek R1: deepseek/deepseek-r1 or deepseek-reasoner
  • Check if there are any region restrictions for your chosen provider

Integration Challenges

  • For Bolt.DIY, ensure that you've properly modified the open-router.ts file
  • When using Cursor, verify that the OpenRouter baseURL is correctly set
  • If experiencing issues with direct API integration, check your network connectivity and firewall settings

Conclusion

DeepSeek's R1 and V3 models represent a significant advancement in open-source AI capabilities, delivering performance comparable to expensive proprietary alternatives. By leveraging the methods outlined in this tutorial, you can access these powerful models completely free of charge.

Whether you prefer working with Bolt.DIY, Cursor, or direct API integration, the flexibility of DeepSeek's models allows you to enhance your applications with state-of-the-art AI capabilities without breaking the bank. Start exploring the potential of DeepSeek today and unlock new possibilities for your projects!

Community

Sign up or log in to comment