To ensure secure access to Obiguard’s APIs, authentication is required for all requests. This guide provides the necessary steps to authenticate your requests using the Obiguard API key, regardless of whether you are using the SDKs for Python, the OpenAI SDK, or making REST API calls directly.Documentation Index
Fetch the complete documentation index at: https://docs.obiguard.ai/llms.txt
Use this file to discover all available pages before exploring further.
Obtaining Your API Key
Create or log in to your Obiguard account. Grab your account’s API key from a guardrail policy, or create a virtual key.Authentication with SDKs
Obiguard SDKs
- Python SDK
- cURL
OpenAI SDK
When integrating Obiguard through the OpenAI SDK, modify the base URL and add thex-obiguard-api-key header for authentication.
Here’s an example of how to do it:
We use the
createHeaders helper function from the Obiguard SDK here to easily create Obiguard headers.You can pass the raw headers (x-obiguard-api-key, x-obiguard-provider) directly in the defaultHeaders param as well.- Python

