# DeepSeek

DeepSeek provides a range of AI products and services, including a chatbot, a search engine, and a language model.

- **Category:** ai models
- **Auth:** API_KEY
- **Composio Managed App Available?** N/A
- **Tools:** 4
- **Triggers:** 0
- **Slug:** `DEEPSEEK`
- **Version:** 20260211_00

## Tools

### Create Anthropic Message

**Slug:** `DEEPSEEK_CREATE_ANTHROPIC_MESSAGE`

Tool to create a model response using DeepSeek's Anthropic-compatible API format with support for system prompts, tool calling, streaming, and thinking mode. Use when you need to generate chat completions using the Anthropic Messages API format. Requires base_url='https://api.deepseek.com/anthropic' or metadata base_url ending with '/anthropic'. Supports extended thinking, function calling with tools, and streaming responses. Note: Images and documents are not supported in content blocks.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `model` | string | Yes | Model identifier. Use 'deepseek-chat' or 'deepseek-reasoner'. Unsupported model names automatically default to 'deepseek-chat'. |
| `tools` | array | No | Array of tool definitions for function calling. Each tool has a name, description, and input_schema. |
| `top_p` | number | No | Nucleus sampling parameter. Controls diversity via cumulative probability. |
| `stream` | boolean | No | Whether to incrementally stream the response using server-sent events. If true, response will be streamed. |
| `system` | string | No | System prompt providing context or instructions to the model. Can be a string or array of content blocks. |
| `messages` | array | Yes | Array of input messages with alternating user/assistant roles. Each message must have a role ('user' or 'assistant') and content (text only; images/documents not supported). |
| `thinking` | object | No | Configuration for extended thinking mode. |
| `max_tokens` | integer | Yes | Maximum number of tokens to generate before stopping. |
| `temperature` | number | No | Randomness in response generation. Range 0.0-2.0. Lower values make output more deterministic. |
| `tool_choice` | string | No | How the model should use provided tools. Can be 'auto', 'any', 'none', or a ToolChoiceConfig object specifying a specific tool. |
| `stop_sequences` | array | No | Custom text sequences that will cause the model to stop generating. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Create Chat Completion

**Slug:** `DEEPSEEK_CREATE_CHAT_COMPLETION`

Tool to create a chat completion using DeepSeek models (deepseek-chat or deepseek-reasoner). Use when you need to generate AI responses to chat conversations. Supports streaming, tool/function calling, and various parameters to control generation behavior (temperature, max_tokens, etc.).

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `stop` | string | No | Up to 16 sequences where the API will stop generating further tokens. |
| `model` | string ("deepseek-chat" | "deepseek-reasoner") | Yes | The model to use for generation. Choose 'deepseek-chat' for general use or 'deepseek-reasoner' for reasoning tasks. |
| `tools` | array | No | A list of tools (max 128) the model may call. Each tool defines a function the model can invoke. |
| `top_p` | number | No | Nucleus sampling parameter. The model considers tokens with top_p probability mass. |
| `stream` | boolean | No | If true, partial message deltas will be sent as server-sent events. |
| `logprobs` | boolean | No | If true, returns log probabilities of the output tokens. |
| `messages` | array | Yes | A list of messages comprising the conversation. Must contain at least one message. |
| `thinking` | object | No | Configuration for thinking mode. |
| `max_tokens` | integer | No | The maximum number of tokens to generate in the chat completion. |
| `temperature` | number | No | What sampling temperature to use, between 0 and 2. Higher values make output more random. |
| `tool_choice` | string | No | Controls which (if any) function is called. Options: 'none', 'auto', 'required', or specify a particular function. |
| `top_logprobs` | integer | No | Number of most likely tokens to return at each position (0-20). Requires logprobs=true. |
| `stream_options` | object | No | Configuration for streaming options. |
| `response_format` | object | No | Configuration for response format. |
| `presence_penalty` | number | No | Number between -2.0 and 2.0. Positive values penalize new tokens based on whether they appear in the text so far. |
| `frequency_penalty` | number | No | Number between -2.0 and 2.0. Positive values penalize new tokens based on their existing frequency in the text. |

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### Get User Balance

**Slug:** `DEEPSEEK_GET_USER_BALANCE`

Tool to get user's current account balance including granted and topped-up balances with detailed breakdown by currency (CNY or USD). Use when you need to check if the user has sufficient balance for API calls or to view detailed balance information.

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |

### List Models

**Slug:** `DEEPSEEK_LIST_MODELS`

Tool to list currently available DeepSeek models and provides basic information about each one such as the owner and availability. Use when you need to discover which models are available for API calls.

#### Output

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `data` | string | Yes | Data from the action execution |
| `error` | string | No | Error if any occurred during the execution of the action |
| `successful` | boolean | Yes | Whether or not the action execution was successful or not |
