
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 *string
API key
DeepSeek API key used for Bearer authentication
messages *array
Messages
Ordered chat history with roles SYSTEM, USER, or ASSISTANT; rendered before sending.
io.kestra.plugin.deepseek.ChatCompletion-ChatMessage
SYSTEMASSISTANTUSERmodelName *string
Model name
DeepSeek model identifier such as deepseek-chat or deepseek-reasoner
assets
Assets this task consumes as inputs or produces as outputs, for lineage tracking and the asset graph (Enterprise Edition). A flow declaring this property on a task is rejected in the open-source edition.
io.kestra.core.models.assets.AssetsDeclaration
IGNOREFAILWARNAsset failure behavior
Behavior applied to the task state when a declared asset fails to render, emit, or be persisted (e.g. a lock conflict): FAIL escalates it to FAILED, WARN (default) warns it if it would otherwise succeed, IGNORE leaves the state untouched.
Whether to auto-register assets referenced dynamically at runtime that are not statically declared in inputs or outputs.
The assets consumed as inputs.
io.kestra.core.models.assets.AssetIdentifier
1The assets produced as outputs.
io.kestra.plugin.ee.assets.Dataset
1150{}1150io.kestra.plugin.ee.assets.File
1150{}1150io.kestra.plugin.ee.assets.Table
1150{}1150io.kestra.plugin.ee.assets.VM
1150{}1150io.kestra.core.models.assets.External
1150{}1150io.kestra.core.models.assets.Custom
11501Custom asset type
{}1150baseUrl 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.
Outputs
raw string
Raw response body returned by the DeepSeek API
response string
Assistant response text extracted from the completion