
AI ImageGeneration
CertifiedGenerate images from a prompt
AI ImageGeneration
Generate images from a prompt
Calls the configured image model to create an image from the provided text prompt and returns the image URL. Output includes finish reason and token usage; image size/format limits follow the provider model.
type: io.kestra.plugin.ai.completion.ImageGenerationExamples
Generate an image using OpenAI (DALL-E 3)
id: image_generation
namespace: company.ai
tasks:
- id: image_generation
type: io.kestra.plugin.ai.completion.ImageGeneration
prompt: >
Four-panel comic page about a data engineer shipping a workflow.
Clean modern line art with soft colors and ample white space.
Panel 1: Early morning desk setup with dual monitors, coffee, and a workflow DAG on screen; calm focused mood.
Panel 2: Debugging a failing task; close-up of terminal and error icon; speech bubble: "hmm…"
Panel 3: Fix applied; green checks ripple through the pipeline; small celebratory detail (cat paw, fist pump).
Panel 4: Deployed dashboard showing metrics trending up; sticky note says "ship it".
Include subtle tech props (cloud icons, database cylinder) but no logos.
Minimal readable text only in tiny bubbles/notes; no large paragraphs of text.
provider:
type: io.kestra.plugin.ai.provider.OpenAI
apiKey: "{{ secret('OPENAI_API_KEY') }}"
modelName: dall-e-3
Properties
prompt *Requiredstring
Image prompt
The input prompt for the image generation model
provider *RequiredNon-dynamic
Language Model Provider
Use Amazon Bedrock models
Invokes Bedrock-hosted chat/embedding models with AWS credentials. Supports standard AWS region/auth settings; ensure model IDs match your Bedrock region and account access.
Chat completion with OpenAI
id: chat_completion
namespace: company.ai
inputs:
- id: prompt
type: STRING
tasks:
- id: chat_completion
type: io.kestra.plugin.ai.completion.ChatCompletion
provider:
type: io.kestra.plugin.ai.provider.AmazonBedrock
accessKeyId: "{{ secret('AWS_ACCESS_KEY') }}"
secretAccessKey: "{{ secret('AWS_SECRET_KEY') }}"
modelName: anthropic.claude-3-sonnet-20240229-v1:0
thinkingBudgetTokens: 1024
messages:
- type: SYSTEM
content: You are a helpful assistant, answer concisely, avoid overly casual language or unnecessary verbosity.
- type: USER
content: "{{ inputs.prompt }}"
AWS Access Key ID
Model name
AWS Secret Access Key
io.kestra.plugin.ai.provider.AmazonBedrockio.kestra.plugin.langchain4j.provider.AmazonBedrockBase URL
Custom base URL to override the default endpoint (useful for local tests, WireMock, or enterprise gateways).
CA PEM certificate content
CA certificate as text, used to verify SSL/TLS connections when using custom endpoints.
Client PEM certificate content
PEM client certificate as text, used to authenticate the connection to enterprise AI endpoints.
COHERECOHERETITANAmazon Bedrock Embedding Model Type
Use Anthropic Claude models
Provides Claude chat models only; embeddings and images are unsupported. Enforces Anthropic rules (no seed/responseFormat). Thinking mode requires max_tokens > thinking.budget_tokens; set API key and optional base URL.
Chat completion with Anthropic
id: chat_completion
namespace: company.ai
inputs:
- id: prompt
type: STRING
tasks:
- id: chat_completion
type: io.kestra.plugin.ai.completion.ChatCompletion
provider:
type: io.kestra.plugin.ai.provider.Anthropic
apiKey: "{{ secret('ANTHROPIC_API_KEY') }}"
modelName: claude-3-haiku-20240307
configuration:
thinkingEnabled: true
thinkingBudgetTokens: 1024
returnThinking: false
messages:
- type: SYSTEM
content: You are a helpful assistant, answer concisely, avoid overly casual language or unnecessary verbosity.
- type: USER
content: "{{ inputs.prompt }}"
API Key
Model name
io.kestra.plugin.ai.provider.Anthropicio.kestra.plugin.langchain4j.provider.AnthropicBase URL
Custom base URL to override the default endpoint (useful for local tests, WireMock, or enterprise gateways).
CA PEM certificate content
CA certificate as text, used to verify SSL/TLS connections when using custom endpoints.
Client PEM certificate content
PEM client certificate as text, used to authenticate the connection to enterprise AI endpoints.
Maximum Tokens
Specifies the maximum number of tokens that the model is allowed to generate in its response.
Use Azure OpenAI deployments
Targets Azure-hosted OpenAI models via the resource endpoint and deployment name. Supports API key or AAD client credentials; set apiVersion when required by the deployment.
Chat completion with Azure OpenAI
id: chat_completion
namespace: company.ai
inputs:
- id: prompt
type: STRING
tasks:
- id: chat_completion
type: io.kestra.plugin.ai.completion.ChatCompletion
provider:
type: io.kestra.plugin.ai.provider.AzureOpenAI
apiKey: "{{ secret('AZURE_API_KEY') }}"
endpoint: https://your-resource.openai.azure.com/
modelName: anthropic.claude-3-sonnet-20240229-v1:0
messages:
- type: SYSTEM
content: You are a helpful assistant, answer concisely, avoid overly casual language or unnecessary verbosity.
- type: USER
content: "{{ inputs.prompt }}"
API endpoint
The Azure OpenAI endpoint in the format: https://{resource}.openai.azure.com/
Model name
io.kestra.plugin.ai.provider.AzureOpenAIio.kestra.plugin.langchain4j.provider.AzureOpenAIAPI Key
Base URL
Custom base URL to override the default endpoint (useful for local tests, WireMock, or enterprise gateways).
CA PEM certificate content
CA certificate as text, used to verify SSL/TLS connections when using custom endpoints.
Client ID
Client PEM certificate content
PEM client certificate as text, used to authenticate the connection to enterprise AI endpoints.
Client secret
API version
Tenant ID
Use DashScope (Qwen) models
Calls Alibaba Cloud DashScope for Qwen chat/embeddings/images with API key. Some params (timeouts, retries, stop, maxTokens) map directly to DashScope limits.
Chat completion with DashScope (Qwen)
id: chat_completion
namespace: company.ai
inputs:
- id: prompt
type: STRING
tasks:
- id: chat_completion
type: io.kestra.plugin.ai.completion.ChatCompletion
provider:
type: io.kestra.plugin.ai.provider.DashScope
apiKey: "{{ secret('DASHSCOPE_API_KEY') }}"
modelName: qwen-plus
messages:
- type: SYSTEM
content: You are a helpful assistant, answer concisely, avoid overly casual language or unnecessary verbosity.
- type: USER
content: "{{ inputs.prompt }}"
API Key
Model name
https://dashscope-intl.aliyuncs.com/api/v1API base URL
If you use a model in the China (Beijing) region, you need to replace the URL with: https://dashscope.aliyuncs.com/api/v1,
otherwise use the Singapore region of: "https://dashscope-intl.aliyuncs.com/api/v1.
The default value is computed based on the system timezone.
CA PEM certificate content
CA certificate as text, used to verify SSL/TLS connections when using custom endpoints.
Client PEM certificate content
PEM client certificate as text, used to authenticate the connection to enterprise AI endpoints.
Whether the model uses Internet search results for reference when generating text or not
The maximum number of tokens returned by this request
Repetition in a continuous sequence during model generation
Increasing repetition_penalty reduces the repetition in model generation,
1.0 means no penalty. Value range: (0, +inf)
Use DeepSeek models
Connects to DeepSeek’s OpenAI-compatible endpoint with API key and model name for chat/embedding tasks.
Chat completion with DeepSeek
id: chat_completion
namespace: company.ai
inputs:
- id: prompt
type: STRING
tasks:
- id: chat_completion
type: io.kestra.plugin.ai.completion.ChatCompletion
provider:
type: io.kestra.plugin.ai.provider.DeepSeek
apiKey: "{{ secret('DEEPSEEK_API_KEY') }}"
modelName: deepseek-chat
messages:
- type: SYSTEM
content: You are a helpful assistant, answer concisely, avoid overly casual language or unnecessary verbosity.
- type: USER
content: "{{ inputs.prompt }}"
API Key
Model name
io.kestra.plugin.ai.provider.DeepSeekio.kestra.plugin.langchain4j.provider.DeepSeekhttps://api.deepseek.com/v1API base URL
CA PEM certificate content
CA certificate as text, used to verify SSL/TLS connections when using custom endpoints.
Client PEM certificate content
PEM client certificate as text, used to authenticate the connection to enterprise AI endpoints.
Use GitHub Models via Azure AI Inference
Calls GitHub Models through the Azure AI Inference API with a GitHub token. Supports chat and embeddings; response format options map to Azure AI Inference capabilities.
Chat completion with GitHub Models
id: chat_completion
namespace: company.ai
inputs:
- id: prompt
type: STRING
tasks:
- id: chat_completion
type: io.kestra.plugin.ai.completion.ChatCompletion
provider:
type: io.kestra.plugin.ai.provider.GitHubModels
gitHubToken: "{{ secret('GITHUB_TOKEN') }}"
modelName: gpt-4o-mini
messages:
- type: SYSTEM
content: You are a helpful assistant, answer concisely.
- type: USER
content: "{{ inputs.prompt }}"
GitHub Token
Personal Access Token (PAT) used to access GitHub Models.
Model name
Base URL
Custom base URL to override the default endpoint (useful for local tests, WireMock, or enterprise gateways).
CA PEM certificate content
CA certificate as text, used to verify SSL/TLS connections when using custom endpoints.
Client PEM certificate content
PEM client certificate as text, used to authenticate the connection to enterprise AI endpoints.
Use Google Gemini models
Supports Gemini chat, embeddings, and images. Tools do not support JSON Schema anyOf, and tools cannot be combined with responseFormat; configure either but not both.
Thinking models (e.g. gemini-3.5-flash) attach a thought_signature to every function-call part. This provider automatically captures those signatures (returnThinking defaults to true) and re-attaches them to the conversation history for every follow-up request (sendThinking is always enabled), preventing the 400 INVALID_ARGUMENT – Function call is missing a thought_signature error.
In addition, thinking is disabled by default (thinkingBudget = 0) to reduce token usage, unless thinkingEnabled: true or thinkingBudgetTokens > 0 is explicitly set.
Chat completion with Google Gemini
id: chat_completion
namespace: company.ai
inputs:
- id: prompt
type: STRING
tasks:
- id: chat_completion
type: io.kestra.plugin.ai.completion.ChatCompletion
provider:
type: io.kestra.plugin.ai.provider.GoogleGemini
apiKey: "{{ secret('GOOGLE_API_KEY') }}"
modelName: gemini-2.5-flash
configuration:
thinkingEnabled: true
thinkingBudgetTokens: 1024
returnThinking: true
messages:
- type: SYSTEM
content: You are a helpful assistant, answer concisely, avoid overly casual language or unnecessary verbosity.
- type: USER
content: "{{ inputs.prompt }}"
Chat completion with Google Gemini with a local base URL + PEM certificates
id: chat_completion
namespace: company.ai
inputs:
- id: prompt
type: STRING
tasks:
- id: chat_completion
type: io.kestra.plugin.ai.completion.ChatCompletion
provider:
type: io.kestra.plugin.ai.provider.GoogleGemini
modelName: gemini-2.5-flash
clientPem: "{{ secret('CLIENT_PEM') }}"
caPem: "{{ secret('CA_PEM') }}"
baseUrl: "https://internal.gemini.company.com/endpoint"
configuration:
thinkingEnabled: true
thinkingBudgetTokens: 1024
returnThinking: true
messages:
- type: SYSTEM
content: You are a helpful assistant, answer concisely, avoid overly casual language or unnecessary verbosity.
- type: USER
content: "{{ inputs.prompt }}"
Model name
io.kestra.plugin.ai.provider.GoogleGeminiio.kestra.plugin.langchain4j.provider.GoogleGeminiAPI Key
Required unless certificate-based authentication is configured with clientPem (optionally with caPem).
Base URL
Custom base URL to override the default endpoint (useful for local tests, WireMock, or enterprise gateways).
CA PEM certificate content
CA certificate as text, used to verify SSL/TLS connections when using custom endpoints.
Client PEM certificate content
PEM client certificate as text, used to authenticate the connection to enterprise AI endpoints.
The configuration for embeddingModel
io.kestra.plugin.ai.provider.GoogleGemini-EmbeddingModelConfiguration
Maximum number of retries for failed requests
Used to specify output embedding size
If set, output embeddings will be truncated to the size specified.
RETRIEVAL_QUERYRETRIEVAL_DOCUMENTSEMANTIC_SIMILARITYCLASSIFICATIONCLUSTERINGQUESTION_ANSWERINGFACT_VERIFICATIONUsed to convey intended downstream application to help the model produce better embeddings.
Timeout in seconds for each request
The headline or name of the document (passed to the model as metadata).
If set, this help improving retrieval quality by providing context for a document.
Use Google Vertex AI models
Calls Vertex AI Gemini chat, embeddings, or images using project, location, and endpoint settings. Requires GCP credentials; ensure response formats are supported by the selected model/region.
Chat completion with Google Vertex AI
id: chat_completion
namespace: company.ai
inputs:
- id: prompt
type: STRING
tasks:
- id: chat_completion
type: io.kestra.plugin.ai.completion.ChatCompletion
provider:
type: io.kestra.plugin.ai.provider.GoogleVertexAI
endpoint: your-vertex-ai-endpoint
location: your-google-cloud-region
project: your-google-cloud-project-id
messages:
- type: SYSTEM
content: You are a helpful assistant, answer concisely, avoid overly casual language or unnecessary verbosity.
- type: USER
content: "{{ inputs.prompt }}"
Endpoint URL
Project location
Model name
Project ID
io.kestra.plugin.ai.provider.GoogleVertexAIio.kestra.plugin.langchain4j.provider.GoogleVertexAIBase URL
Custom base URL to override the default endpoint (useful for local tests, WireMock, or enterprise gateways).
CA PEM certificate content
CA certificate as text, used to verify SSL/TLS connections when using custom endpoints.
Client PEM certificate content
PEM client certificate as text, used to authenticate the connection to enterprise AI endpoints.
Use Hugging Face Inference endpoints
Routes requests to Hugging Face Inference Endpoints via the OpenAI-compatible gateway (default router.huggingface.co). Requires an API token and deployment model name.
Chat completion with HuggingFace
id: chat_completion
namespace: company.ai
inputs:
- id: prompt
type: STRING
tasks:
- id: chat_completion
type: io.kestra.plugin.ai.completion.ChatCompletion
provider:
type: io.kestra.plugin.ai.provider.HuggingFace
apiKey: "{{ secret('HUGGING_FACE_API_KEY') }}"
modelName: HuggingFaceTB/SmolLM3-3B:hf-inference
messages:
- type: SYSTEM
content: You are a helpful assistant, answer concisely, avoid overly casual language or unnecessary verbosity.
- type: USER
content: "{{ inputs.prompt }}"
API Key
Model name
https://router.huggingface.co/v1API base URL
CA PEM certificate content
CA certificate as text, used to verify SSL/TLS connections when using custom endpoints.
Client PEM certificate content
PEM client certificate as text, used to authenticate the connection to enterprise AI endpoints.
Use LocalAI OpenAI-compatible server
Targets a self-hosted LocalAI instance via its OpenAI-compatible API for chat/embeddings/images. Set baseUrl if your server is not on the default.
Chat completion with LocalAI
id: chat_completion
namespace: company.ai
inputs:
- id: prompt
type: STRING
tasks:
- id: chat_completion
type: io.kestra.plugin.ai.ChatCompletion
provider:
type: io.kestra.plugin.ai.provider.LocalAI
modelName: gemma-3-1b-it
baseUrl: http://localhost:8080/v1
messages:
- type: SYSTEM
content: You are a helpful assistant, answer concisely, avoid overly casual language or unnecessary verbosity.
- type: USER
content: "{{ inputs.prompt }}"
API base URL
Model name
io.kestra.plugin.ai.provider.LocalAIio.kestra.plugin.langchain4j.provider.LocalAICA PEM certificate content
CA certificate as text, used to verify SSL/TLS connections when using custom endpoints.
Client PEM certificate content
PEM client certificate as text, used to authenticate the connection to enterprise AI endpoints.
Use Mistral models
Calls Mistral chat/embedding APIs with an API key. topK is not supported; chat configuration must respect model limits.
Chat completion with Mistral AI
id: chat_completion
namespace: company.ai
inputs:
- id: prompt
type: STRING
tasks:
- id: chat_completion
type: io.kestra.plugin.ai.completion.ChatCompletion
provider:
type: io.kestra.plugin.ai.provider.MistralAI
apiKey: "{{ secret('MISTRAL_API_KEY') }}"
modelName: mistral:7b
messages:
- type: SYSTEM
content: You are a helpful assistant, answer concisely, avoid overly casual language or unnecessary verbosity.
- type: USER
content: "{{ inputs.prompt }}"
API Key
Model name
io.kestra.plugin.ai.provider.MistralAIio.kestra.plugin.langchain4j.provider.MistralAIBase URL
Custom base URL to override the default endpoint (useful for local tests, WireMock, or enterprise gateways).
CA PEM certificate content
CA certificate as text, used to verify SSL/TLS connections when using custom endpoints.
Client PEM certificate content
PEM client certificate as text, used to authenticate the connection to enterprise AI endpoints.
Use OCI Generative AI models
Calls Oracle Cloud GenAI chat/embedding models with compartment OCID and region. Auth is handled via OCI SDK provider (config file or instance principals). Ensure the model is permitted in the chosen compartment.
Chat completion with OciGenAI
id: chat_completion
namespace: company.ai
inputs:
- id: prompt
type: STRING
tasks:
- id: chat_completion
type: io.kestra.plugin.ai.ChatCompletion
provider:
type: io.kestra.plugin.ai.provider.OciGenAI
region: "{{ secret('OCI_GENAI_MODEL_REGION_PROPERTY') }}"
compartmentId: "{{ secret('OCI_GENAI_COMPARTMENT_ID_PROPERTY') }}"
authProvider: "{{ secret('OCI_GENAI_CONFIG_PROFILE_PROPERTY') }}"
modelName: oracle.chat.gpt-3.5
messages:
- type: SYSTEM
content: You are a helpful assistant, answer concisely, avoid overly casual language or unnecessary verbosity.
- type: USER
content: "{{ inputs.prompt }}"
OCID of OCI Compartment with the model
Model name
OCI Region to connect the client to
OCI SDK Authentication provider
Base URL
Custom base URL to override the default endpoint (useful for local tests, WireMock, or enterprise gateways).
CA PEM certificate content
CA certificate as text, used to verify SSL/TLS connections when using custom endpoints.
Client PEM certificate content
PEM client certificate as text, used to authenticate the connection to enterprise AI endpoints.
Use local Ollama models
Calls an Ollama server for chat/embeddings using the given endpoint and model name. Ideal for self-hosted/local models; ensure the Ollama daemon is reachable.
Chat completion with Ollama
id: chat_completion
namespace: company.ai
inputs:
- id: prompt
type: STRING
tasks:
- id: chat_completion
type: io.kestra.plugin.ai.completion.ChatCompletion
provider:
type: io.kestra.plugin.ai.provider.Ollama
modelName: llama3
endpoint: http://localhost:11434
configuration:
thinkingEnabled: true
returnThinking: true
messages:
- type: SYSTEM
content: You are a helpful assistant, answer concisely, avoid overly casual language or unnecessary verbosity.
- type: USER
content: "{{ inputs.prompt }}"
Model endpoint
Model name
io.kestra.plugin.ai.provider.Ollamaio.kestra.plugin.langchain4j.provider.OllamaBase URL
Custom base URL to override the default endpoint (useful for local tests, WireMock, or enterprise gateways).
CA PEM certificate content
CA certificate as text, used to verify SSL/TLS connections when using custom endpoints.
Client PEM certificate content
PEM client certificate as text, used to authenticate the connection to enterprise AI endpoints.
Use OpenAI models
Connects to OpenAI-compatible endpoints (defaults to api.openai.com) for chat, embeddings, or images. Requires API key; override baseUrl for Azure-compatible or proxy setups.
Chat completion with OpenAI
id: chat_completion
namespace: company.ai
inputs:
- id: prompt
type: STRING
tasks:
- id: chat_completion
type: io.kestra.plugin.ai.completion.ChatCompletion
provider:
type: io.kestra.plugin.ai.provider.OpenAI
apiKey: "{{ secret('OPENAI_API_KEY') }}"
modelName: gpt-5-mini
messages:
- type: SYSTEM
content: You are a helpful assistant, answer concisely, avoid overly casual language or unnecessary verbosity.
- type: USER
content: "{{ inputs.prompt }}"
API Key
Model name
io.kestra.plugin.ai.provider.OpenAIio.kestra.plugin.langchain4j.provider.OpenAIhttps://api.openai.com/v1API base URL
CA PEM certificate content
CA certificate as text, used to verify SSL/TLS connections when using custom endpoints.
Client PEM certificate content
PEM client certificate as text, used to authenticate the connection to enterprise AI endpoints.
Use OpenRouter models
Routes requests through OpenRouter’s multi-model API using your API key. Supports chat/embedding/image models exposed by OpenRouter; honor provider-specific safety/usage limits.
Chat completion with OpenRouter
id: chat_completion
namespace: company.ai
inputs:
- id: prompt
type: STRING
tasks:
- id: chat_completion
type: io.kestra.plugin.ai.completion.ChatCompletion
provider:
type: io.kestra.plugin.ai.provider.OpenRouter
apiKey: "{{ secret('OPENROUTER_API_KEY') }}"
baseUrl: https://openrouter.ai/api/v1
modelName: x-ai/grok-beta
messages:
- type: SYSTEM
content: You are a helpful assistant, answer concisely, avoid overly casual language or unnecessary verbosity.
- type: USER
content: "{{ inputs.prompt }}"
API Key
Model name
io.kestra.plugin.ai.provider.OpenRouterio.kestra.plugin.langchain4j.provider.OpenRouterBase URL
Custom base URL to override the default endpoint (useful for local tests, WireMock, or enterprise gateways).
CA PEM certificate content
CA certificate as text, used to verify SSL/TLS connections when using custom endpoints.
Client PEM certificate content
PEM client certificate as text, used to authenticate the connection to enterprise AI endpoints.
Use IBM watsonx.ai models
Calls IBM watsonx.ai chat/embedding endpoints with API key and project ID. Ensure the selected model ID is available in the configured project.
Chat completion with Watsonx AI
id: chat_completion
namespace: company.ai
inputs:
- id: prompt
type: STRING
tasks:
- id: chat_completion
type: io.kestra.plugin.ai.completion.ChatCompletion
provider:
type: io.kestra.plugin.ai.provider.WatsonxAI
apiKey: "{{ secret('WATSONX_API_KEY') }}"
projectId: "{{ secret('WATSONX_PROJECT_ID') }}"
modelName: ibm/granite-3-3-8b-instruct
baseUrl : "https://api.eu-de.dataplatform.cloud.ibm.com/wx"
messages:
- type: SYSTEM
content: You are a helpful assistant, answer concisely, avoid overly casual language or unnecessary verbosity.
- type: USER
content: "{{ inputs.prompt }}"
API Key
Model name
Project Id
Base URL
Custom base URL to override the default endpoint (useful for local tests, WireMock, or enterprise gateways).
CA PEM certificate content
CA certificate as text, used to verify SSL/TLS connections when using custom endpoints.
Client PEM certificate content
PEM client certificate as text, used to authenticate the connection to enterprise AI endpoints.
Use Cloudflare Workers AI models
Invokes Workers AI chat, embedding, and image models using account ID and API key. Ensure the selected model is available in your account/region.
Chat completion with WorkersAI
id: chat_completion
namespace: company.ai
inputs:
- id: prompt
type: STRING
tasks:
- id: chat_completion
type: io.kestra.plugin.ai.ChatCompletion
provider:
type: io.kestra.plugin.ai.provider.WorkersAI
accountId: "{{ secret('WORKERS_AI_ACCOUNT_ID') }}"
apiKey: "{{ secret('WORKERS_AI_API_KEY') }}"
modelName: @cf/meta/llama-2-7b-chat-fp16
messages:
- type: SYSTEM
content: You are a helpful assistant, answer concisely, avoid overly casual language or unnecessary verbosity.
- type: USER
content: "{{ inputs.prompt }}"
Account Identifier
Unique identifier assigned to an account
API Key
Model name
io.kestra.plugin.ai.provider.WorkersAIio.kestra.plugin.langchain4j.provider.WorkersAIBase URL
Custom base URL to override the default endpoint (useful for local tests, WireMock, or enterprise gateways).
CA PEM certificate content
CA certificate as text, used to verify SSL/TLS connections when using custom endpoints.
Client PEM certificate content
PEM client certificate as text, used to authenticate the connection to enterprise AI endpoints.
Use ZhiPu AI models
Calls ZhiPu’s OpenAI-compatible chat/embedding/image APIs with API key and model name. Supports stop tokens, retry count, and max tokens per request.
Chat completion with ZhiPu AI
id: chat_completion
namespace: company.ai
inputs:
- id: prompt
type: STRING
tasks:
- id: chat_completion
type: io.kestra.plugin.ai.ChatCompletion
provider:
type: io.kestra.plugin.ai.provider.ZhiPuAI
apiKey: "{{ secret('ZHIPU_API_KEY') }}"
modelName: glm-4.5-flash
messages:
- type: SYSTEM
content: You are a helpful assistant, answer concisely, avoid overly casual language or unnecessary verbosity.
- type: USER
content: "{{ inputs.prompt }}"
API Key
Model name
https://open.bigmodel.cn/API base URL
The base URL for ZhiPu API (defaults to https://open.bigmodel.cn/)
CA PEM certificate content
CA certificate as text, used to verify SSL/TLS connections when using custom endpoints.
Client PEM certificate content
PEM client certificate as text, used to authenticate the connection to enterprise AI endpoints.
The maximum retry times to request
The maximum number of tokens returned by this request
With the stop parameter, the model will automatically stop generating text when it is about to contain the specified string or token_id
pluginDefaultsRef Non-dynamicstring
Reference (ref) of the pluginDefaults to apply to this task.
Outputs
finishReason string
STOPLENGTHTOOL_EXECUTIONCONTENT_FILTEROTHERFinish reason
imageUrl string
Generated image URL
The URL of the generated image
tokenUsage
Token usage
io.kestra.plugin.ai.domain.TokenUsage
Metrics
input.token.count counter
tokenLarge Language Model (LLM) input token count
output.token.count counter
tokenLarge Language Model (LLM) output token count
total.token.count counter
tokenLarge Language Model (LLM) total token count