In this guide, I’ll walk you through the process of connecting DeepSeek R1 to your Make.com scenarios. You’ll learn about various connection options, including how to set up an API key and handle responses effectively.
Overview
Connecting DeepSeek R1 to Make.com can streamline various automation tasks. Understanding the available options makes it easier to choose the best method for your needs. I created an automation that listens for new topics in a Google Sheet and responds using DeepSeek R1. This setup not only enhances efficiency but also allows for more complex automations in the future.
Different Connection Options
Several ways exist to connect to DeepSeek. One option is to use the DeepSeek API directly, which is currently experiencing high demand. Alternatively, I recommend using Fireworks AI. This method is beneficial for two reasons: it may provide access when the DeepSeek API is down, and it offers better data privacy.
DeepSeek emphasizes its open-source nature, allowing it to be hosted in various environments. Fireworks AI, based in California, has a zero data retention policy, which is a significant advantage for those concerned about data privacy. Although calling models via Fireworks AI is generally more expensive than using DeepSeek, it remains a cost-effective choice compared to many other services.
DeepSeek API Options
Using the DeepSeek API directly can be the fastest way to access its capabilities. However, as mentioned, it may currently be down due to overwhelming demand. If you can access it, you can create a connection by generating an API key on the DeepSeek website.
How to Create an API Key
- Visit the DeepSeek website and navigate to the API platform.
- Create an account if you haven’t already.
- Once logged in, find the option to generate a new API key.
- Copy your API key for later use.
After obtaining the API key, you can set it up in your Make.com scenario. This process is similar to connecting through Fireworks AI but may be more straightforward if the DeepSeek API is stable.
Connecting via Fireworks AI
Fireworks AI provides a reliable alternative to connect to DeepSeek. To start, you’ll need to create an account and set up an API key. The process is user-friendly and straightforward. Once you have your API key, you can easily integrate it into your Make.com scenario.
Steps to Connect Fireworks AI
- Create an account on Fireworks AI.
- Go to the billing section and add credit to your account.
- Navigate to the API keys section and generate a new API key.
- Copy the API key for use in your automation setup.
In your Make.com scenario, you’ll use the HTTP module to make requests to Fireworks AI. This connection will allow you to send data to DeepSeek and receive responses efficiently.
Setting Up Fireworks API Key
Once you have your Fireworks API key, you can use it within your Make.com scenario to interact with DeepSeek R1. Here’s how to set it up:
Constructing the API Request
Begin by adding an HTTP module to your Make.com scenario. You’ll need to configure the following settings:
- Select the POST method for your request.
- In the headers section, add an authorization header with the format: Bearer [Your_API_Key].
- Set the body type to raw and content type to application/json.
Next, you’ll paste the appropriate URL for the DeepSeek API endpoint. After setting these parameters, you can test the request to ensure everything is working correctly. If the configuration is successful, you’ll receive a response from DeepSeek.
Handling Chain of Thought Responses
When working with DeepSeek R1, you might notice that the responses often include a chain of thought. This can clutter the output, making it less useful for your purposes. To address this, I implemented a simple trick to filter out the unnecessary parts of the response.
The key is to utilize a split function. By identifying the specific text that indicates the start of the chain of thought, I can separate it from the actual answer. For example, if the response starts with “Let’s start by breaking down what we know,” I can use a semicolon as a delimiter to split the response into an array. The last element of this array will be the actual answer I need.
Additionally, it’s crucial to check if the response contains the designated text before applying this filtering. If it does, I return only the last part of the array; if not, I simply keep the entire string. This ensures that I don’t lose valuable information in cases where the chain of thought isn’t present.
Direct Connection to DeepSeek API
Connecting directly to the DeepSeek API can be a quick way to access its capabilities, provided it’s operational. The process begins by obtaining an API key from the DeepSeek website. Once you have the key, you can easily integrate it into your Make.com scenario.
To set up the connection, you’ll follow a similar process to what I described earlier. You’ll need to configure the HTTP module in your scenario to make requests to the DeepSeek API. The steps involve selecting the POST method, adding the authorization header with your API key, and setting the body type to JSON.
Testing the connection is essential. After configuring everything, run a test to ensure that you’re receiving the expected responses from DeepSeek. If everything is set up correctly, you’ll get responses that you can then manipulate as needed in your automation.
Using OpenRouter for Flexible Integrations
OpenRouter serves as an excellent intermediary for connecting to various AI models, including DeepSeek R1. This service simplifies the process of switching between different APIs without having to reconfigure your entire setup.
To connect via OpenRouter, you start by creating an account and obtaining your API key. Once you have the key, you can integrate it into your Make.com scenario. This makes it easy to manage multiple models and provides flexibility in your automation tasks.
With OpenRouter, you can quickly switch between DeepSeek R1 and other models without extensive reconfiguration. This is particularly useful when you want to test different outputs or need to adapt your automation to specific requirements.