{"id":14960998,"url":"https://github.com/rageagainstthepixel/com.rest.huggingface","last_synced_at":"2026-02-24T11:32:22.316Z","repository":{"id":174355977,"uuid":"642900742","full_name":"RageAgainstThePixel/com.rest.huggingface","owner":"RageAgainstThePixel","description":"A Non-Official HuggingFace Rest Client for Unity (UPM)","archived":false,"fork":false,"pushed_at":"2024-02-28T01:18:51.000Z","size":2386,"stargazers_count":16,"open_issues_count":2,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-07T03:15:02.672Z","etag":null,"topics":["ai","generative-ai","generative-art","generative-design","huggingface","inference-api","unity","unity3d","upm","upm-package"],"latest_commit_sha":null,"homepage":"https://huggingface.co/","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/RageAgainstThePixel.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":"StephenHodgson","patreon":"RageAgainstThePixel"}},"created_at":"2023-05-19T15:49:08.000Z","updated_at":"2024-10-29T16:34:20.000Z","dependencies_parsed_at":null,"dependency_job_id":"a48820ff-6d72-43fb-8583-fad8cd34085b","html_url":"https://github.com/RageAgainstThePixel/com.rest.huggingface","commit_stats":{"total_commits":19,"total_committers":2,"mean_commits":9.5,"dds":0.368421052631579,"last_synced_commit":"73319afc15c422b4a9c8daacea040e8b072927c2"},"previous_names":["rageagainstthepixel/com.rest.huggingface"],"tags_count":17,"template":false,"template_full_name":"RageAgainstThePixel/upm-template","purl":"pkg:github/RageAgainstThePixel/com.rest.huggingface","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RageAgainstThePixel%2Fcom.rest.huggingface","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RageAgainstThePixel%2Fcom.rest.huggingface/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RageAgainstThePixel%2Fcom.rest.huggingface/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RageAgainstThePixel%2Fcom.rest.huggingface/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/RageAgainstThePixel","download_url":"https://codeload.github.com/RageAgainstThePixel/com.rest.huggingface/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RageAgainstThePixel%2Fcom.rest.huggingface/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":280861811,"owners_count":26403993,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-24T02:00:06.418Z","response_time":73,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ai","generative-ai","generative-art","generative-design","huggingface","inference-api","unity","unity3d","upm","upm-package"],"created_at":"2024-09-24T13:23:37.032Z","updated_at":"2025-10-24T20:30:47.866Z","avatar_url":"https://github.com/RageAgainstThePixel.png","language":"C#","funding_links":["https://github.com/sponsors/StephenHodgson","https://patreon.com/RageAgainstThePixel"],"categories":[],"sub_categories":[],"readme":"# com.rest.huggingface\n\n[![Discord](https://img.shields.io/discord/855294214065487932.svg?label=\u0026logo=discord\u0026logoColor=ffffff\u0026color=7389D8\u0026labelColor=6A7EC2)](https://discord.gg/xQgMW9ufN4) [![openupm](https://img.shields.io/npm/v/com.rest.huggingface?label=openupm\u0026registry_uri=https://package.openupm.com)](https://openupm.com/packages/com.rest.huggingface/) [![openupm](https://img.shields.io/badge/dynamic/json?color=brightgreen\u0026label=downloads\u0026query=%24.downloads\u0026suffix=%2Fmonth\u0026url=https%3A%2F%2Fpackage.openupm.com%2Fdownloads%2Fpoint%2Flast-month%2Fcom.rest.huggingface)](https://openupm.com/packages/com.rest.huggingface/)\n\nA non-official [HuggingFace](https://huggingface.co/) RESTful client for the [Unity](https://unity.com/) Game Engine.\n\nI am not affiliated with HuggingFace and an account with api access is required.\n\n***All copyrights, trademarks, logos, and assets are the property of their respective owners.***\n\n## Installing\n\nRequires Unity 2021.3 LTS or higher.\n\nThe recommended installation method is though the unity package manager and [OpenUPM](https://openupm.com/packages/com.rest.huggingface).\n\n### Via Unity Package Manager and OpenUPM\n\n- Open your Unity project settings\n- Select the `Package Manager`\n![scoped-registries](HuggingFace/Packages/com.rest.huggingface/Documentation~/images/package-manager-scopes.png)\n- Add the OpenUPM package registry:\n  - Name: `OpenUPM`\n  - URL: `https://package.openupm.com`\n  - Scope(s):\n    - `com.rest.huggingface`\n    - `com.utilities`\n- Open the Unity Package Manager window\n- Change the Registry from Unity to `My Registries`\n- Add the `HuggingFace` package\n\n### Via Unity Package Manager and Git url\n\n- Open your Unity Package Manager\n- Add package from git url: `https://github.com/RageAgainstThePixel/com.rest.huggingface.git#upm`\n  \u003e Note: this repo has dependencies on other repositories! You are responsible for adding these on your own.\n  - [com.utilities.async](https://github.com/RageAgainstThePixel/com.utilities.async)\n  - [com.utilities.rest](https://github.com/RageAgainstThePixel/com.utilities.rest)\n  - [com.utilities.audio](https://github.com/RageAgainstThePixel/com.utilities.audio)\n  - [com.utilities.encoder.wav](https://github.com/RageAgainstThePixel/com.utilities.encoder.wav)\n\n## Documentation\n\n### Table of Contents\n\n- [Authentication](#authentication)\n- [Hub](#hub)\n- [Inference](#inference)\n\n### Authentication\n\nThere are 4 ways to provide your API keys, in order of precedence:\n\n:warning: We recommended using the environment variables to load the API key instead of having it hard coded in your source. It is not recommended use this method in production, but only for accepting user credentials, local testing and quick start scenarios.\n\n1. [Pass keys directly with constructor](#pass-keys-directly-with-constructor) :warning:\n2. [Unity Scriptable Object](#unity-scriptable-object) :warning:\n3. [Load key from configuration file](#load-key-from-configuration-file)\n4. [Use System Environment Variables](#use-system-environment-variables)\n\n#### Pass keys directly with constructor\n\n```csharp\nvar api = new HuggingFaceClient(\"yourApiKey\");\n```\n\nOr create a `HuggingFaceAuthentication` object manually\n\n```csharp\nvar api = new HuggingFaceClient(new HuggingFaceAuthentication(\"yourApiKey\"));\n```\n\n#### Unity Scriptable Object\n\nYou can save the key directly into a scriptable object that is located in the `Assets/Resources` folder.\n\nYou can create a new one by using the context menu of the project pane and creating a new `HuggingFaceConfiguration` scriptable object.\n\n![Create new HuggingFaceConfiguration](HuggingFace/Packages/com.rest.huggingface/Documentation~/images/create-scriptable-object.png)\n\n#### Load key from configuration file\n\nAttempts to load api keys from a configuration file, by default `.huggingface` in the current directory, optionally traversing up the directory tree or in the user's home directory.\n\nTo create a configuration file, create a new text file named `.huggingface` and containing the line:\n\n##### Json format\n\n```json\n{\n  \"apiKey\": \"yourApiKey\",\n}\n```\n\nYou can also load the file directly with known path by calling a static method in Authentication:\n\n```csharp\nvar api = new HuggingFaceClient(new HuggingFaceAuthentication().LoadFromDirectory(\"your/path/to/.huggingface\"));;\n```\n\n#### Use System Environment Variables\n\nUse your system's environment variables specify an api key to use.\n\n- Use `HUGGING_FACE_API_KEY` for your api key.\n\n```csharp\nvar api = new HuggingFaceClient(new HuggingFaceAuthentication().LoadFromEnvironment());\n```\n\n### Hub\n\nTODO\n\n### Inference\n\nTODO\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frageagainstthepixel%2Fcom.rest.huggingface","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frageagainstthepixel%2Fcom.rest.huggingface","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frageagainstthepixel%2Fcom.rest.huggingface/lists"}