Native Hugging Face API routev3.6+

Configure a route that uses native Hugging Face APIs with the Hugging Face SDK. This example uses the HuggingFaceTB/SmolVLM-Base model.

Supported native Hugging Face APIs include:

  • /generate
  • /generate_stream

Set llm_format: huggingface to enable compatibility with these APIs. Use default values for genai_category and route_type parameters (text/generation and llm/v1/chat).

Prerequisites

  • Hugging Face account

Environment variables

  • HUGGINGFACE_TOKEN: The token to use to connect to Hugging Face.

Set up the plugin

Something wrong?

Help us make these docs great!

Kong Developer docs are open source. If you find these useful and want to make them better, contribute today!