
AI HuggingFace
CertifiedUse Hugging Face Inference endpoints
AI HuggingFace
Certified
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.
yaml
type: io.kestra.plugin.ai.provider.HuggingFaceExamples
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: "{{ 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 }}"
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.