The `guardrails-api-client` is a Python library providing a simple interface to interact with the Guardrails API for AI application development. It is currently at version 0.4.0 and follows a rapid release cadence common for pre-1.0 libraries, indicating active development with potential for API changes.
pip install guardrails-api-clientVerified import paths — ran on the pinned version, not inferred.
Initializes the Guardrails API client, authenticates using an environment variable, and demonstrates a basic call to the `create_run` endpoint. This example checks an LLM output against a specified guard.
Always consult the official documentation and release notes when upgrading between minor versions. Pin your dependency to `guardrails-api-client~=0.4` to avoid unexpected upgrades.
Ensure the `GUARDRAILS_API_KEY` environment variable is correctly set and contains a valid API key. Verify the key's validity in your Guardrails account settings.
Refer to the latest official documentation or the `guardrails-api-client` GitHub repository for the correct and most up-to-date API endpoint usage for your installed version.