Skip to main content
All CollectionsAI Providers & ModelsAI ConnectionsHugging Face
[Serverless] How to obtain your Inference Model Endpoint URL and Access Token
[Serverless] How to obtain your Inference Model Endpoint URL and Access Token
Promptitude Team avatar
Written by Promptitude Team
Updated over a month ago

To use the Hugging Face Inference API, you’ll need two key values:

  • Access token

  • Model Endpoint URL

This guide will help you collect both.

Prerequisites

  • An active Hugging Face account

  • An active Access Token with the correct configuration settings enabled

  • An active payment method in your Hugging Face account

  • A valid text-generation endpoint url that corresponds to the model you wish to use in Promptitude

📌 Remember, Serverless functionality is available with Enterprise plans in Promptitude.


Step-by-Step Guide

1️⃣ Create your Access Token

  1. Open your profile dropdown.

  2. Select Access Tokens from the menu:

  3. Click the “Create new token” button:

  4. Select the Fine-grained option and enter a name for the token. In the Inference section, be sure to check the following options to configure the access token properly:

    • Make calls to the serverless Inference API

    • Make calls to Inference Endpoints

  5. Click the Create Token button at the bottom of the page to generate the token.

  6. A popup will appear displaying your newly created token. Copy the token and save it in a secure location, as you’ll need it to add to Promptitude later:


2️⃣ Deploy your model using Inference Endpoints and obtain your Endpoint URL

Currently, only text-generation model endpoint URLs are supported in Promptitude. You can explore the available models at the following URL: Models - Hugging FaceModels - Hugging Face

Step-by-Step Guide

  1. From the list, select the text-generation model you'd like to deploy:

  2. In the model card, open the Deploy dropdown and select Inference Endpoints (Dedicated):

  3. Customize your endpoint settings as desired and provide a unique name for it:

  4. In the Security section, select the Protected option to require an Access Token for endpoint access. Then, click Create Endpoint to finalize the setup.

  5. Afterward, you will be redirected to the endpoint page, where the status will show as Initializing:

  6. Once initialization is complete, the status will change to Running. At this point, you can copy your Endpoint URL for use in Promptitude:


3️⃣ Configure your Serverless Inference API connection in Promptitude.io

  1. Go to the Serverless Inference API Hub page and click the New Inference API Provider button:

  2. In the slide-over panel, give a name to your new Inference API provider and click the Save button:

  3. Once the provider is created, you'll be redirected to the provider's models. From here, click Add Endpoint Model:

  4. Configure all the properties you previously obtained in order to add your available model. Make sure that the properties are correct, click Save:

  5. If everything went well, you will see your model in the table:

  6. Now you can use your model in your prompts:

✏️ Summary

By following these steps, you will have gathered the following information:

  • Access Token

  • Model Endpoint URL

After obtaining this information you will be able to configure and use the models you have configured within your Promptitude.io account.

Did this answer your question?