How to Use MAI-DS-R1, Microsoft’s DeepSeek R1 for Free

Learn how to use MAI-DS-R1, Microsoft’s enhanced DeepSeek R1, for free with this technical guide. Discover step-by-step API setup, Apidog integration, and best practices for leveraging this powerful AI model in your projects.

Ashley Innocent

Ashley Innocent

24 April 2025

How to Use MAI-DS-R1, Microsoft’s DeepSeek R1 for Free

Microsoft’s MAI-DS-R1, a post-trained variant of the DeepSeek R1 model, offers developers a powerful tool for building AI-driven applications. This open-weights model excels in reasoning, responsiveness, and safety, making it ideal for tasks like text generation, coding, and data analysis. Best of all, you can access it for free through platforms like Azure AI Foundry and Hugging Face. In this guide, we’ll walk you through how to leverage MAI-DS-R1 using the API with Apidog, a superior alternative to traditional API testing tools like Postman. By following this tutorial, you’ll learn to integrate and test MAI-DS-R1 efficiently.

💡
To streamline your API testing and integration, download Apidog for free. Apidog simplifies interacting with MAI-DS-R1’s API, offering a user-friendly interface and robust features for developers working on AI projects.
button

What Is MAI-DS-R1?

MAI-DS-R1, developed by Microsoft AI, is a post-trained variant of DeepSeek R1, a state-of-the-art reasoning model designed for complex tasks such as mathematical problem-solving, coding, and logical reasoning. Unlike the original DeepSeek R1, MAI-DS-R1 undergoes extensive post-training to enhance its responsiveness to sensitive topics and reduce harmful content by over 50%, as validated by HarmBench evaluations. Consequently, it achieves a remarkable 99.3% response rate to previously blocked prompts, outperforming DeepSeek R1 by 2.2x and matching Perplexity’s R1-1776 variant in safety and satisfaction metrics.

Moreover, MAI-DS-R1 retains the original model’s reasoning prowess, scoring 91.6% on the MATH benchmark and excelling in general knowledge and coding tasks. Its open-source availability under the MIT license, hosted on platforms like HuggingFace and Azure AI Foundry, makes it accessible for developers worldwide. Next, let’s explore why accessing MAI-DS-R1 for free is a game-changer.

Why Use MAI-DS-R1 for Free?

Accessing MAI-DS-R1 at no cost offers several advantages for developers, researchers, and enterprises

  1. Cost-Effective Innovation: The free tier on platforms like OpenRouter and Azure AI Foundry eliminates financial barriers, enabling experimentation without subscription costs.
  2. Enhanced Safety: MAI-DS-R1’s post-training reduces harmful outputs, making it suitable for sensitive applications while maintaining reasoning accuracy.
  3. Open-Source Flexibility: The MIT license allows modifications, distillation, and commercial use, fostering custom solutions.
  4. Superior Performance: With performance rivaling OpenAI’s o1, MAI-DS-R1 handles multi-step reasoning tasks efficiently.
  5. Seamless API Integration: The OpenAI-compatible API simplifies integration into existing workflows.

To harness these benefits, you’ll need to set up the MAI-DS-R1 API. Fortunately, Apidog streamlines this process, offering a user-friendly alternative to traditional API testing tools. Let’s dive into the setup process.

Prerequisites for Using MAI-DS-R1 API

Before interacting with the MAI-DS-R1 API, ensure you have the following:

button

With these prerequisites in place, you’re ready to configure your environment. The next section outlines how to obtain and set up your API key using OpenRouter and Apidog.

Step-by-Step Guide to Accessing MAI-DS-R1 API for Free

Step 1: Obtain an OpenRouter API Key

First, navigate to openrouter.ai and create an account. After logging in, follow these steps:

  1. Access the API Keys section in the dashboard. Click Create Key and copy the key to a secure location.

Store the key in an environment variable or a secret management tool to prevent hardcoding.

This key authenticates your requests to the MAI-DS-R1 API. Now, let’s configure Apidog to test API calls.

Step 2: Set Up Apidog for API Testing

Apidog is a powerful, all-in-one API management tool that surpasses alternatives like Postman due to its intuitive interface, automated testing, and comprehensive documentation features.

button

To configure Apidog:

Create a New Project: Open Apidog and start a new HTTP project.

Configure Environment:

Import cURL Command:

Set Headers:

With Apidog configured, you can now test API requests. However, let’s first explore programmatic access using Python.

Step 3: Make Your First API Call with Python

To interact with MAI-DS-R1 programmatically, use the OpenAI SDK, which is compatible with the MAI-DS-R1 API. Below is a sample Python script:

from openai import OpenAI

client = OpenAI(
    base_url="https://openrouter.ai/api/v1",
    api_key="<YOUR_OPENROUTER_API_KEY>"
)

completion = client.chat.completions.create(
    model="microsoft/MAI-DS-R1",
    messages=[
        {"role": "user", "content": "Solve the equation 2x + 5 = 15 step by step."}
    ]
)

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

Replace <YOUR_OPENROUTER_API_KEY> with your actual key. This script sends a prompt to MAI-DS-R1, which responds with a step-by-step solution. To optimize performance, set the temperature between 0.5 and 0.7, as recommended by DeepSeek.

Step 4: Test the API with Apidog

Instead of writing code, you can use Apidog for quick testing:

  1. Switch to Prod Env in Apidog.
  2. Modify the request body to include your prompt, e.g., {"messages": [{"role": "user", "content": "Explain the chain-of-thought reasoning process"}]}.
  3. Click Send to receive the response.
  4. Enable streaming by setting "stream": true in the request body for real-time output.

Apidog’s visual interface displays the response, making it easier to debug and analyze compared to tools like Postman, which lack integrated documentation and testing features.

Step 5: Deploy MAI-DS-R1 on Azure (Optional)

For production use, deploy MAI-DS-R1 on Azure AI Foundry:

  1. Visit ai.azure.com and search for MAI-DS-R1 in the model catalog.
  2. Click Deploy to access the serverless endpoint, API key, and playground.
  3. Use the provided API key and endpoint in your application or Apidog for testing.

This step is optional for free access via OpenRouter but useful for scaling enterprise applications.

Best Practices for Using MAI-DS-R1 API

To maximize the effectiveness of MAI-DS-R1, follow these best practices:

By adhering to these practices, you ensure reliable and efficient integration of MAI-DS-R1 into your projects.

Why Apidog Is the Better Alternative

While tools like Postman are popular for API testing, Apidog offers distinct advantages:

For instance, Apidog’s ability to parse cURL commands and manage environment variables streamlines the setup process, saving time compared to Postman’s manual configuration. As a result, Apidog is the preferred choice for testing the MAI-DS-R1 API.

Limitations and Considerations

Despite its strengths, MAI-DS-R1 has limitations:

Mitigate these by implementing content moderation, using RAG for up-to-date information, and relying on cloud platforms like Azure or OpenRouter for free access.

Conclusion

MAI-DS-R1, Microsoft’s refined version of DeepSeek R1, offers unparalleled reasoning capabilities, enhanced safety, and free access through OpenRouter. By following this guide, you can set up the MAI-DS-R1 API, test it with Apidog, and integrate it into your applications. Apidog’s superior features make it the ideal tool for managing API requests, outshining alternatives like Postman. Whether you’re building chatbots, solving math problems, or automating research, MAI-DS-R1 empowers you to innovate cost-effectively.

Ready to get started? Download Apidog for freeand explore MAI-DS-R1’s capabilities today. Share your experiences or questions in the comments below!

button

Explore more

MemVid: Replacing Vector Databases with MP4 Files

MemVid: Replacing Vector Databases with MP4 Files

Memvid is a groundbreaking AI memory library that revolutionizes how we store and search large volumes of text. Instead of relying on traditional databases, Memvid cleverly encodes text chunks into MP4 video files, enabling lightning-fast semantic search without the need for a complex database setup. This innovative approach makes it incredibly efficient, portable, and easy to use, especially for offline applications. 💡Want a great API Testing tool that generates beautiful API Documentation?

6 June 2025

Get ChatGPT Team for Almost Free ($1 for 5 Seats): Here is How

Get ChatGPT Team for Almost Free ($1 for 5 Seats): Here is How

Discover how to access ChatGPT Team for just $1 and enhance your development workflow with Apidog's free MCP Server. Get premium AI features and powerful API development tools in one comprehensive guide.

6 June 2025

3 Methods to Unlock Claude 4 for Free

3 Methods to Unlock Claude 4 for Free

Learn how to use Claude 4 for free, master vibe coding workflows, and see why Apidog MCP Server is the all-in-one API development platform you need.

6 June 2025

Practice API Design-first in Apidog

Discover an easier way to build and use APIs