---
title: "How to Install and Use the Hugging Face Unity API"
description: "The Hugging Face Unity API wraps the Hugging Face Inference API so Unity projects can call hosted models."
url: "https://swe.quest/articles/how-to-install-and-use-the-hugging-face-unity-api-cf69490aaf6eefa7"
canonical: "https://huggingface.co/blog/unity-api"
source: "Hugging Face"
published: "2023-05-01"
difficulty: "medium"
kind: "How-to"
reading_minutes: 3
tags: ["gaming","inference","dotnet"]
---

# How to Install and Use the Hugging Face Unity API

A post on [Hugging Face](https://swe.quest/sources/hugging-face.md), published 2023-05-01, 3 min read, How-to. Original: [https://huggingface.co/blog/unity-api](https://huggingface.co/blog/unity-api)

## Summary

The Hugging Face Unity API wraps the Hugging Face Inference API so Unity projects can call hosted models. You install it via Package Manager from a git URL, then use the API Wizard to set an API key and model endpoints. A C# example shows an asynchronous sentence-similarity call with success and error callbacks. Other supported tasks include conversation, text generation, text-to-image, classification, QA, translation, summarization and speech recognition, and custom models work by swapping the endpoint URL. Slow responses can be addressed by switching to lower-resource models.

Written by swe.quest, not by the author.

**Difficulty:** Medium: assumes a working developer; shows how it is built or done

## Topics

- [Games](https://swe.quest/tags/gaming.md) (Domains)
- [Inference & serving](https://swe.quest/tags/inference.md) (AI & ML)
- [.NET](https://swe.quest/tags/dotnet.md) (Languages)

## Prerequisites

- Unity basics
- C# scripting ([easy posts on .NET](https://swe.quest/tags/dotnet.md?difficulty=easy))

## Keywords

Hugging Face Unity API, Hugging Face Inference API, Unity, Unity Package Manager

## Related posts

- [AI Speech Recognition in Unity](https://swe.quest/articles/ai-speech-recognition-in-unity-c468b32989ceef77.md): Hugging Face · 2023-06-02 · Medium · 6 min read · Speech & audio, Games, .NET
  Speech recognition can be added to a Unity game with the Hugging Face Unity API by recording microphone input, encoding it as WAV and sending it for transcription.
- [Inference for PROs](https://swe.quest/articles/inference-for-pros-8849074774f039ec.md): Hugging Face · 2023-09-22 · Medium · 10 min read · Inference & serving, LLMs, API design, Python
  Hugging Face PRO subscribers get curated, rate-limit-boosted HTTP inference endpoints served by text-generation-inference for models such as Llama 3, Mixtral 8x7B, Zephyr, Code Llama, Stable Diffusion XL and Bark, intended for prototyping rather than heavy production (Inference Endpoints is recommended for that).
- [Showcase Your Projects in Spaces using Gradio](https://swe.quest/articles/showcase-your-projects-in-spaces-using-gradio-939ccccc3ad428cf.md): Hugging Face · 2021-10-05 · Medium · 3 min read · Machine learning, Python, Inference & serving
  Gradio's Hugging Face Hub integration lets you build an ML demo from a Hub model ID in a few lines: gr.Interface.load plus a title, description and example inputs, backed by the Inference API.
- [Blazingly fast whisper transcriptions with Inference Endpoints](https://swe.quest/articles/blazingly-fast-whisper-transcriptions-with-inference-endpoints-d93b7d262c3a1210.md): Hugging Face · 2025-05-13 · Easy · 6 min read · Inference & serving, Speech & audio, Performance engineering
  Hugging Face Inference Endpoints now offers a Whisper deployment built on vLLM that delivers up to roughly 8x higher real-time factor (RTFx) than the Transformers implementation, with comparable word error rate.
- [Train AI models with Unsloth and Hugging Face Jobs for FREE](https://swe.quest/articles/train-ai-models-with-unsloth-and-hugging-face-jobs-for-free-6587fc68358b0d7c.md): Hugging Face · 2026-02-20 · Medium · 4 min read · Model training, AI agents, LLMs, Python
  Unsloth on Hugging Face Jobs can fine-tune small models like LiquidAI/LFM2.5-1.2B-Instruct on managed cloud GPUs.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
