Close Menu
techwavedispatch.com

    Subscribe to Updates

    Get the latest creative news from FooBar about art, design and business.

    What's Hot

    Training a language model with 🤗 Transformers using TensorFlow and TPUs

    November 14, 2026

    STeP-C: Real-Time Neural Compression for Distributed Fiber-Optic Sensing at Scale

    November 14, 2026

    How to Install and Use the Hugging Face Unity API

    November 14, 2026
    Facebook X (Twitter) Instagram
    Trending
    • Training a language model with 🤗 Transformers using TensorFlow and TPUs
    • STeP-C: Real-Time Neural Compression for Distributed Fiber-Optic Sensing at Scale
    • How to Install and Use the Hugging Face Unity API
    • DGPExplainer: Generating Prototype Sequence Explanations for Dynamic Graph Neural Networks
    • A State-of-the-Art LLM for Code
    • Random Exploration is Random
    • A Dive into Text-to-Video Models
    • [2611.15197] Anytime-Valid Empirical Likelihood Inference from LLM Annotations with Adaptive Human Auditing
    Facebook X (Twitter) Instagram
    techwavedispatch.com
    Subscribe
    Saturday, November 14
    • Home
    • AI Tools & Software
    • Machine Learning
    • Generative AI
    • Robotics & Automation
    • Future Tech & Hardware
    • AI in Business
    • Ethics & Regulations
    • More
      • Gadgets & Smart Devices
      • Cybersecurity & AI
      • Tech Breakthroughs
    techwavedispatch.com
    Home»AI Tools & Software»How to Install and Use the Hugging Face Unity API
    AI Tools & Software

    How to Install and Use the Hugging Face Unity API

    adminBy adminNovember 14, 2026No Comments3 Mins Read
    Facebook Twitter Pinterest LinkedIn Tumblr Email
    How to Install and Use the Hugging Face Unity API
    Share
    Facebook Twitter LinkedIn Pinterest Email

    Dylan Ebert's avatar

    The Hugging Face Unity API is an easy-to-use integration of the Hugging Face Inference API, allowing developers to access and use Hugging Face AI models in their Unity projects. In this blog post, we’ll walk through the steps to install and use the Hugging Face Unity API.



    Installation

    1. Open your Unity project
    2. Go to Window -> Package Manager
    3. Click + and select Add Package from git URL
    4. Enter https://github.com/huggingface/unity-api.git
    5. Once installed, the Unity API wizard should pop up. If not, go to Window -> Hugging Face API Wizard

    1. Enter your API key. Your API key can be created in your Hugging Face account settings.
    2. Test the API key by clicking Test API key in the API Wizard.
    3. Optionally, change the model endpoints to change which model to use. The model endpoint for any model that supports the inference API can be found by going to the model on the Hugging Face website, clicking Deploy -> Inference API, and copying the url from the API_URL field.
    4. Configure advanced settings if desired. For up-to-date information, visit the project repository at https://github.com/huggingface/unity-api
    5. To see examples of how to use the API, click Install Examples. You can now close the API Wizard.

    Now that the API is set up, you can make calls from your scripts to the API. Let’s look at an example of performing a Sentence Similarity task:

    using HuggingFace.API;
    
    /* other code */
    
    // Make a call to the API
    void Query() {
        string inputText = "I'm on my way to the forest.";
        string[] candidates = {
            "The player is going to the city",
            "The player is going to the wilderness",
            "The player is wandering aimlessly"
        };
        HuggingFaceAPI.SentenceSimilarity(inputText, OnSuccess, OnError, candidates);
    }
    
    // If successful, handle the result
    void OnSuccess(float[] result) {
        foreach(float value in result) {
            Debug.Log(value);
        }
    }
    
    // Otherwise, handle the error
    void OnError(string error) {
        Debug.LogError(error);
    }
    
    /* other code */
    



    Supported Tasks and Custom Models

    The Hugging Face Unity API also currently supports the following tasks:

    Use the corresponding methods provided by the HuggingFaceAPI class to perform these tasks.

    To use your own custom model hosted on Hugging Face, change the model endpoint in the API Wizard.



    Usage Tips

    1. Keep in mind that the API makes calls asynchronously, and returns a response or error via callbacks.
    2. Address slow response times or performance issues by changing model endpoints to lower resource models.



    Conclusion

    The Hugging Face Unity API offers a simple way to integrate AI models into your Unity projects. We hope you found this tutorial helpful. If you have any questions or would like to get more involved in using Hugging Face for Games, join the Hugging Face Discord!

    API Face Hugging install Unity
    Share. Facebook Twitter Pinterest LinkedIn Tumblr Email
    admin
    • Website

    Related Posts

    Training a language model with 🤗 Transformers using TensorFlow and TPUs

    November 14, 2026

    A State-of-the-Art LLM for Code

    November 14, 2026

    A Dive into Text-to-Video Models

    November 14, 2026
    Leave A Reply Cancel Reply

    Top Posts

    NVIDIA Is Investigating Reports That CEO Jensen Huang Was The Target Of Chinese Spy Efforts

    November 8, 202619 Views

    ADIndex: Layer-Adaptive Sparse Attention Indexing via Group-Level Distillation

    November 11, 20265 Views

    Anthropic releases new Mythos and Fable models amid RSI concerns

    November 9, 20265 Views

    Anthropic says AI is eroding Nvidia’s CUDA lead, cutting an AMD chip switch from months to three days

    November 11, 20264 Views
    Don't Miss
    AI Tools & Software

    Training a language model with 🤗 Transformers using TensorFlow and TPUs

    By adminNovember 14, 20260

    Introduction TPU training is a useful skill to have: TPU pods are high-performance and extremely…

    STeP-C: Real-Time Neural Compression for Distributed Fiber-Optic Sensing at Scale

    November 14, 2026

    How to Install and Use the Hugging Face Unity API

    November 14, 2026

    DGPExplainer: Generating Prototype Sequence Explanations for Dynamic Graph Neural Networks

    November 14, 2026
    About Us

    Welcome to TechWave Dispatch

    At TechWave Dispatch, we bring you the latest news, insights, and developments from the ever-evolving world of technology. Our mission is to keep readers informed about the innovations shaping our digital future.

    From artificial intelligence and machine learning to cybersecurity, robotics, smart devices, and groundbreaking technologies, we cover the topics that matter in today's fast-moving tech landscape.

    Our Picks

    Training a language model with 🤗 Transformers using TensorFlow and TPUs

    November 14, 2026

    STeP-C: Real-Time Neural Compression for Distributed Fiber-Optic Sensing at Scale

    November 14, 2026

    How to Install and Use the Hugging Face Unity API

    November 14, 2026
    Most Popular

    Who Controls Scientific Discovery? – O’Reilly

    November 6, 20260 Views

    After blocking Muse, Amazon now lets users text Alexa to help them shop

    November 6, 20260 Views

    A controlled world for robot learning and evaluation

    November 6, 20260 Views
    Facebook X (Twitter) Instagram Pinterest
    • Terms and Conditions
    • Privacy Policy
    • Contact Us
    • About Us
    © 2026 TechWave Dispatch. All Rights Reserved.

    Type above and press Enter to search. Press Esc to cancel.