Apidog

All-in-one Collaborative API Development Platform

API Design

API Documentation

API Debugging

API Mocking

API Automated Testing

How to Use the Deepseek API (R1 & V3): A Step-by-Step Guide with Screenshots

After logging into the Deepseek Open Platform, create an API key and save it in a secure location. By integrating Deepseek API with Apidog, you can quickly complete API debugging.

Scarlett Clarke

Scarlett Clarke

Updated on February 12, 2025

In this step-by-step guide, we will walk through obtaining your Deepseek API key and demonstrate how to utilize the key to interact with the Deepseek API for debugging purposes.

Login to Deepseek Open Platform

First, log in to the Deepseek Open Platform to obtain the API key.

How to Use the Deepseek API (R1 & V3)

Create and Copy the API Key

On the left sidebar of the Deepseek Open Platform, find the "API Keys" section. Click on it to create an API key. Once created, copy this key and store it in a secure location that only you have access to.

How to Use the Deepseek API (R1 & V3)


Please keep this API key in a safe and easily accessible place. For security reasons, you will not be able to view it again through the Deepseek Open Platform interface. If you lose this key, you will need to create a new one.

Calling Deepseek API

Once you have the API key, you can begin making API calls. The official Deepseek API documentation is available here: https://api-docs.deepseek.com/.


Below, we will use Apidog to test the API and stream the messages returned by the AI model.

How to Use the Deepseek API (R1 & V3)

Or output the entire response.

How to Use the Deepseek API (R1 & V3)
💡
You can invoke DeepSeek-V3 by specifying model='deepseek-chat'.
You can invoke DeepSeek-R1 by specifying model='deepseek-reasoner'.


If you haven't used Apidog yet, we highly recommend it. It is an integrated collaboration platform that combines API documentation, debugging, design, testing, mock, and automated testing all in one. With Apidog’s user-friendly interface, you can easily test and manage your DeepSeek API. Use the out-of-box DeeepSeek API in Apidog to get started quickly.

How to Use the Deepseek API (R1 & V3)

Set Up API Key

Log in to Apidog and create a new HTTP project. After that, go to the "Environment Management" section in the upper-right corner of the project. Click on "Prod Env" and in the Service Base URL field, enter https://api.deepseek.com. Then, add an environment variable named API_KEY with the value of the Deepseek API key you created earlier. After adding, save the changes.

How to Use the Deepseek API (R1 & V3)

 

Create a New Endpoint

Once the API key is set up, create a new endpoint in your project. Then, copy the cURL command for the conversation API from the Deepseek API documentation.

How to Use the Deepseek API (R1 & V3)

Go back to Apidog, and simply paste the cURL directly into the endpoint path by pressing "Ctrl + V." Apidog will automatically parse the cURL.

How to Use the Deepseek API (R1 & V3)


In the parsed endpoint, click on "Headers" and modify the Authorization parameter. Change its value to Bearer {{API_KEY}}, so that the API request will include the API key stored in the environment variable.

How to Use the Deepseek API (R1 & V3)


Debugging the Endpoint

Switch the environment to "Prod Env" in the upper-right corner under "Environment Management." Then, click the "Send" button to send the request. You will receive the response from the endpoint. By modifying the content of the messages in the Body, you can simulate different conversations.

How to Use the Deepseek API (R1 & V3)

To enable streaming output, set the stream value to true.

How to Use the Deepseek API (R1 & V3)

💡
You can invoke DeepSeek-V3 by specifying model='deepseek-chat'.
You can invoke DeepSeek-R1 by specifying model='deepseek-reasoner'.

 

Summary

After logging into the Deepseek Open Platform, create an API key and save it in a secure location. By integrating Deepseek API with Apidog, you can quickly complete API debugging. After configuring the environment variables, import the cURL provided by Deepseek into Apidog and set the Authorization to Bearer {{API_KEY}}. Then, switch to the production environment to send requests and modify the parameters as needed to enable conversations. Streaming or full output is supported, improving development efficiency.

How to Access Claude 3.7 Sonnet API and Test Using ApidogTutorials

How to Access Claude 3.7 Sonnet API and Test Using Apidog

Learn how to access Anthropic’s Claude 3.7 Sonnet API and test it with Apidog in this step-by-step tutorial. Discover setup, configuration, and best practices for exploring Claude’s coding and reasoning powers efficiently, perfect for developers seeking to leverage this advanced AI model.

Ashley Innocent

February 25, 2025

A Developer’s Guide to Testing LLM AI APIs with SSETutorials

A Developer’s Guide to Testing LLM AI APIs with SSE

Discover how Apidog's upgraded SSE debugging enhances real-time interaction with AI models. Streamline testing, visualize AI’s thought process, and customize response handling for AI APIs, ensuring an efficient and transparent debugging process.

Oliver Kingsley

February 20, 2025

How to Build Websites Using Lovable AITutorials

How to Build Websites Using Lovable AI

Discover how to build any website using Lovable in this comprehensive guide. Learn step-by-step processes, explore innovative features, and integrate free tools like Apidog to streamline API management.

Ashley Innocent

February 19, 2025