How to Use Hugging Face as a Proxy
This is NOT a roleplay bot! This is a tutorial for how to use Hugging Face as a proxy on Janitor. Please note that things such as Advanced Prompts or generation settings will not be covered in this tutorial, as they are not the main focus.
Section 1: What is Hugging Face?
Hugging Face is a website that serves as a repository for AI models from all over the internet. It is similar to OpenRouter in many ways, though it is more community-based. It also allows users to easily download models using Python via open-source libraries. Like most other AI model platforms, Hugging Face lets you create your own keys (referred to as Access Tokens), which can be used with chatbot platforms like Janitor. Models on Hugging Face can be used for free (with a monthly limit) or with real money.
Section 2: Tutorial
Now, onto the meat and potatoes of this guide: using Hugging Face as a proxy. There are several steps to this:
Go to huggingface.co and create an account. You may need to verify your email.
Once your account is created, go to your account settings, and select "Access Tokens". This is where your API keys are located.
Select "Create new token" and create your key. Copy and paste it somewhere safe, as you will NOT be able to view it again! Make sure to select "Read" and check permissions for "Make calls to Inference Providers" before creating it, otherwise it may not work!
Search for a model you want to use (for example: DeepSeek), then select it.
Log into Janitor and open a chat, then open the provider menu (located in the upper right portion of the chat).
Under "Provider", select "Proxy" and click "+New".
Copy and paste the following into the proxy URL: https://router.huggingface.co/v1/chat/completions
On Hugging Face, copy the name of the model you want and paste it into your new proxy's model name.
Paste your API key.
Give your proxy a name (separate from the proxy name), then click "Add". You can select a custom prompt if you have any.
Test your new proxy. If it works, you've done everything correctly! If it returns an error, you may have screwed something up. If it just gives a network error, try reloading the page and test it again.
Now you know how to use Hugging Face as a proxy on Janitor!
Section 3: Cost & Tiers
Hugging Face uses a credit-based system which is required to use the service. Credits can be obtained for free or by purchasing them with real money. All users are given free credits every month that allow them to use models on the site without paying. However, you cannot accumulate free credits simply by waiting, as they reset at the beginning of every month. For example, if you have $0.10 in credits in your account and use them until you have $0.05 left, your credits are automatically topped back up to $0.10 at the start of the next month. If you run out of free credits, you will need to wait until the monthly limit resets, or buy more. Currently, credits can only be purchased with a credit card via Stripe. The cost of the model you're using may vary depending on the provider(s) it uses.
Hugging Face also has tiers for accounts: Free, PRO, Team and Enterprise, the latter three of which have more features available. Tiers also determine how many free credits you get at the start of each month. Free users get $0.10 in credits per month, while PRO and Team/Enterprise users get $2 in credits per month.
Hope this tutorial helps! If you have any questions, don't be afraid to ask around. <3
Создано Sep 29
Обновлено Oct 1
Опубликован Sep 29