DeepSeek icon

DeepSeek

Consume DeepSeek AI

Actions2

Overview

The DeepSeek node for n8n enables you to interact with the DeepSeek AI platform, specifically leveraging its Chat resource to generate conversational completions. This is useful for scenarios where you want to automate text generation, build chatbots, summarize content, or create interactive assistants within your workflows. For example, you could use this node to answer customer queries, provide automated support, or generate creative writing prompts.

Properties

Below are the supported input properties for the Chat → Complete operation:

Display Name Type Description
Model options The model which will generate the completion. Learn more. Models are dynamically loaded from DeepSeek and filtered to those starting with deepseek-.
Prompt fixedCollection A collection of messages forming the conversation history. Each message includes a Role (Assistant, System, User) and Content (the actual text).
Simplify boolean Whether to return a simplified version of the response instead of the raw data. If enabled, only the main choices array is returned.
Options collection Additional fine-tuning parameters:
Frequency Penalty number
Maximum Number of Tokens number
Presence Penalty number
Sampling Temperature number
Top P number
Response Format json
Logprobs boolean
Top Logprobs number

Output

  • json:
    • By default, the node outputs the full response from DeepSeek's API, which typically includes fields such as choices, usage, and other metadata.
    • If Simplify is enabled, the output is reduced to just the choices array, which contains the generated completions/messages.
    • Example simplified output:
      [
        {
          "message": {
            "role": "assistant",
            "content": "Hello! How can I help you today?"
          },
          "finish_reason": "stop",
          "index": 0
        }
      ]
      
  • Binary Data:
    • This node does not output binary data.

Dependencies

  • External Service: Requires access to the DeepSeek API.
  • API Key: You must configure DeepSeek API credentials (deepSeekApi) in n8n.
  • Environment: No special environment variables required beyond standard n8n credential setup.

Troubleshooting

  • Invalid API Key / Authentication Error:
    Ensure your DeepSeek API credentials are correctly configured in n8n.

  • Model Not Found:
    If you select a model that is not available or incorrectly filtered, ensure the model list is refreshed and matches the expected prefix (deepseek-).

  • Token Limit Exceeded:
    If you request more tokens than allowed by the selected model, reduce the "Maximum Number of Tokens" value.

  • Missing Required Fields:
    Make sure all required fields (such as Model and at least one Prompt message) are provided.

  • Logprobs/Top Logprobs Misconfiguration:
    If you set "Top Logprobs" without enabling "Logprobs", the API may return an error. Always enable "Logprobs" when using "Top Logprobs".

Links and References

Discussion