Skip to main content
All CollectionsAI Providers & ModelsAI ConnectionsHugging Face
[Serverless] How to get your model ID and access token
[Serverless] How to get your model ID 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:

  • Model ID

  • Access token

This guide will help you collect both.

Prerequisites

  • An active Hugging Face account

  • An active Access Token with the correct configuration settings enabled

  • A valid text-generation Model ID 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️⃣ Get your Model Id

Currently, only text-generation models are supported in Promptitude. You can find 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 add to Promptitude.

  2. In the model card, locate and copy the Model ID 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 ID

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?