What is the LiteLLM integration?
LiteLLM is an open-source proxy that puts one endpoint in front of every model provider. Its built-in connector,generic_guardrail_api, sends each call to Unbound.
Unbound checks every call twice — the prompt before the model, the reply after it — against your Security policies and Tool policies. Calls appear under Logs.
Prerequisites
- LiteLLM 1.106.2.
- Admin access to Unbound.
Get your API key
- Open Settings → API Tokens in Unbound.
- Generate Token with Full Access, and copy it; it is shown once.
fail_on_error: true below so an expired token stops traffic instead of letting it through unchecked.
Set it in your proxy’s environment:
Setup
Add to your LiteLLMconfig.yaml:
guardrails must be at the top level of config.yaml. Under litellm_settings it is ignored.Self-hosted models and cost
Unbound prices each call from its model catalog. A self-hosted model, or a model your users reach through an alias such ascoding-model, is not in that catalog, so Unbound bills its calls at a default rate.
To bill your own rate, price these models in LiteLLM. Add model_info to each entry in model_list:
For a model you host yourself, pick the rate you want to report. Your own GPU cost per token works, and so does a hosted provider’s list price for the same model, which lets you compare it with your other providers.
Verification
- Send a request. It appears under Logs with its prompt and response.
- Send a prompt with something your Security policy detects, such as an API key. The detection is recorded.
- Ask a coding agent to run a command your Tool policies block, such as
printenv. The agent reports an error. - A few seconds after a call, its tokens appear in Logs. If they stay at 0, check
GENERIC_LOGGER_ENDPOINTandGENERIC_LOGGER_HEADERS.
UNBOUND_API_KEY is set and api_base ends in /v1/app/analyze.
Cost for self-hosted models
Each call’s cost shows up in Cost Management. Models LiteLLM already has a price for need nothing extra. For a self-hosted model, give LiteLLM its price per token undermodel_info:
success_callback and GENERIC_LOGGER_* settings from Setup need to be in place.
A self-hosted model with no price shows a cost of $0. Its tokens are still counted.
Attribution
Each call is attributed to the owner of the virtual key that made it, using the key’suser_email. Calls on a shared master key are attributed to the owner of the Unbound API key. For per-user policies, give each person a virtual key with user_email.
Security Policies
Detect and redact secrets and personal data in prompts
Tool Policies
Audit, warn or block risky commands and MCP calls

