Provider Slug.
Hugging FaceObiguard SDK Integration with Hugging Face
Obiguard provides a consistent API to interact with models from various providers. To integrate Hugging Face with Obiguard:1. Install the Obiguard SDK
Add the Obiguard SDK to your application to interact with Hugging Face’s API through Obiguard’s gateway.- Python SDK
2. Initialize Obiguard with an access key
To use Hugging Face with Obiguard, get your Hugging Face Access token from here. Add it to Obiguard as a provider credential, then create an access key for the agent or project that will call it.- Python SDK
- OpenAI Python SDK
3. Invoke Chat Completions with Hugging Face
Use the Obiguard instance to send requests to Hugging Face.- Python SDK
- OpenAI Python SDK
Using Provider Credentials and Access Keys
Obiguard stores the credentials for your provider in its vault as a provider credential, and your application authenticates to the gateway with an access key. This simplifies the use of multiple providers and Obiguard features within your application. For self-hosted LLMs, you can configure custom authentication requirements including authorization keys, bearer tokens, or any other headers needed to access your model.- Add your self-hosted model to Obiguard as a provider credential
- Configure your deployment:
- Select the matching provider API specification (typically
OpenAI) - Enter your model’s base URL as the custom host
- Add required authentication headers and their values
- Select the matching provider API specification (typically
- Create an access key for the agent or project that will call it
- Python SDK
Next Steps
The complete list of features supported in the SDK are available on the link below.Obiguard SDK Client
Learn more about the Obiguard SDK Client

