Connect to Hugging Face to run hosted model inference across the full task set (text generation, chat completion, embeddings, classification, NER, vision, and audio) and to search models, datasets, and Spaces on the Hub.
| Action | Description | Parameters | Returns |
|---|---|---|---|
audio_classification | Classify audio into labels | model, audio [top_k, provider] | list |
automatic_speech_recognition | Transcribe speech audio to text | model, audio [return_timestamps, provider] | HFTranscription |
chat_completion | Create a chat completion via the OpenAI-compatible router | model, messages [temperature, max_tokens, top_p, frequency_penalty, presence_penalty, seed, stop, tools, tool_choice, response_format] | HFChatCompletion |
feature_extraction | Extract embedding vectors from text | model, inputs [provider] | list |
fill_mask | Fill a masked token in text with a hosted model | model, inputs [provider] | list |
get_dataset | Get metadata for a dataset on the Hub | dataset_id | HFDatasetInfo |
get_model | Get metadata for a model on the Hub | model_id [expand] | HFModelInfo |
get_model_providers | List the inference providers that serve a Hub model | model_id | list |
get_space | Get metadata for a Space on the Hub | space_id | HFSpaceInfo |
image_classification | Classify an image into labels | model, image [top_k, provider] | list |
image_segmentation | Segment an image into labelled masks | model, image [mask_threshold, threshold, subtask, provider] | list |
image_to_text | Generate a caption for an image | model, image [provider] | list |
list_datasets | Search datasets on the Hugging Face Hub | [search, author, filter, sort, direction, limit] | list |
list_inference_catalog | List the Inference Providers model catalog with pricing | — | list |
list_models | Search models on the Hugging Face Hub | [search, author, filter, pipeline_tag, library, sort, direction, limit] | list |
list_repo_files | List files in a Hub repository's tree | repo_id [repo_type, revision] | list |
list_spaces | Search Spaces on the Hugging Face Hub | [search, author, filter, sort, direction, limit] | list |
object_detection | Detect objects and bounding boxes in an image | model, image [threshold, provider] | list |
question_answering | Answer a question from a context passage | model, question, context [provider] | HFQuestionAnswer |
sentence_similarity | Score a sentence against candidates for similarity | model, source_sentence, sentences [provider] | list |
summarize | Summarize text with a hosted model | model, inputs [min_length, max_length, provider] | list |
table_question_answering | Answer a question about a table | model, query, table [provider] | HFTableQuestionAnswer |
text_classification | Classify text with a hosted model | model, inputs [provider] | list |
text_generation | Generate text from a prompt with a hosted model | model, inputs [max_new_tokens, temperature, top_p, top_k, repetition_penalty, do_sample, return_full_text, wait_for_model, provider] | list |
text_to_image | Generate an image from a text prompt | model, inputs [negative_prompt, guidance_scale, num_inference_steps, width, height, seed, provider] | bytes |
text_to_speech | Synthesize speech audio from text | model, inputs [provider] | bytes |
token_classification | Tag tokens in text (NER / part-of-speech) | model, inputs [aggregation_strategy, provider] | list |
translate | Translate text with a hosted model | model, inputs [src_lang, tgt_lang, provider] | list |
whoami | Get the authenticated Hugging Face identity | — | HFWhoAmI |
zero_shot_classification | Classify text against candidate labels without training | model, inputs, candidate_labels [multi_label, provider] | HFZeroShotResult |
Full schema explorer, code generation, and live API testing