
DeepSeek ChatCompletion
CertifiedSend chat to DeepSeek
DeepSeek ChatCompletion
Send chat to DeepSeek
Calls the DeepSeek Chat Completions API with role-based messages and optional JSON Mode guidance. Uses baseUrl default https://api.deepseek.com/v1 for OpenAI-compatible routing; add jsonResponseSchema to request JSON-only output—schema is advisory and not server-validated.
type: io.kestra.plugin.deepseek.ChatCompletionExamples
Chat completion with DeepSeek
id: deepseek_chat
namespace: company.team
tasks:
- id: chat_completion
type: io.kestra.plugin.deepseek.ChatCompletion
apiKey: "{{ secret('DEEPSEEK_API_KEY') }}"
modelName: deepseek-chat
messages:
- type: SYSTEM
content: You are a helpful assistant.
- type: USER
content: What is the capital of Germany? Return only the name.
DeepSeek chat with JSON Mode (schema guidance)
id: deepseek_chat_json_mode
namespace: company.team
tasks:
- id: chat_completion_json
type: io.kestra.plugin.deepseek.ChatCompletion
apiKey: "{{ secret('DEEPSEEK_API_KEY') }}"
modelName: deepseek-chat
messages:
- type: USER
content: |
Extract the book information from: "I recently read 'To Kill a Mockingbird' by Harper Lee." Return JSON only.
jsonResponseSchema: |
{
"type": "object",
"title": "Book",
"additionalProperties": false,
"required": ["name", "authors"],
"properties": {
"name": { "type": "string" },
"authors": { "type": "array", "items": { "type": "string" } }
}
}
Properties
apiKey *Requiredstring
API key
DeepSeek API key used for Bearer authentication
messages *Requiredarray
Messages
Ordered chat history with roles SYSTEM, USER, or ASSISTANT; rendered before sending.
io.kestra.plugin.deepseek.ChatCompletion-ChatMessage
SYSTEMASSISTANTUSERmodelName *Requiredstring
Model name
DeepSeek model identifier such as deepseek-chat or deepseek-coder
baseUrl string
https://api.deepseek.com/v1Base URL
DeepSeek API endpoint; defaults to https://api.deepseek.com/v1 for OpenAI-compatible clients and can point to a proxy.
jsonResponseSchema string
JSON Response Schema
Optional JSON Schema string to enable DeepSeek JSON Mode. Sets response_format to json_object and prepends a schema reminder; DeepSeek treats the schema as guidance and does not validate server-side.
pluginDefaultsRef Non-dynamicstring
Reference (ref) of the pluginDefaults to apply to this task.
Outputs
raw string
Raw response body returned by the DeepSeek API
response string
Assistant response text extracted from the completion