Hugging Face model
Call a Hugging Face model for any task (classify, fill in, read a picture or sound) with a JSON payload or a data file, and return its answer.
Command in the Generative AI toolkit · id ooa.genai/huggingface_inference · 7 inputs (1 required), 4 outputs
Inputs
| Input | Type | Required | Default | What it is |
|---|---|---|---|---|
| Model | String | Yes | The model's id on Hugging Face, owner/name. | |
| Payload | String | No | The request as JSON, as the model's task expects it, usually {"inputs": ..., "parameters": {...}}. | |
| Data file | File | No | A picture or sound file sent as it is, for tasks that read one (at most 25 MB). | |
| API key | Credential | No | Your Hugging Face access token (hf_...) from the vault; not needed for your own server. | |
| Endpoint address | String | No | Address the model id is added to; https://router.huggingface.co/hf-inference/models when empty, or your own inference server. | |
| Output file | File | No | Where to save the answer when the model answers with a picture or sound. | |
| Timeout (seconds) | Number | No | 0 | Seconds to wait for the model; 180 when 0. |
Outputs
| Output | Type | What it is |
|---|---|---|
| text | String | The model's answer as text (empty when it answered with a file). |
| json | Any | The answer parsed as JSON, when it is JSON. |
| content_type | String | The answer's content type. |
| file | String | Where a picture or sound the model made was saved (output_file). |