HuggingFace Model Provider
yaml
type: "io.kestra.plugin.ai.provider.HuggingFace"Examples
Chat completion with HuggingFace
yaml
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: "{{ kv('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}}"
Properties
apiKey *Requiredstring
API Key
modelName *Requiredstring
Model name
baseUrl string
 Default 
https://router.huggingface.co/v1API base URL
caPem string
CA PEM certificate content
CA certificate as text, used to verify SSL/TLS connections when using custom endpoints.
clientPem string
Client PEM certificate content
PEM client certificate as text, used to authenticate the connection to enterprise AI endpoints.
