Proxy
Proxy Base URL:
https://api.promptguard.co/api/v1Point your LLM SDK’s base_url / baseURL to this endpoint. Your existing provider API key goes in the Authorization header as usual; add your PromptGuard key via X-API-Key.microsoft/phi, deepseek-ai/, mistralai/, tiiuae/, bigscience/, google/gemma, huggingfaceh4/ or hf/ go to Hugging Face’s Inference Providers router. Ids starting meta-llama/ or qwen/ do not: Groq is checked first and claims them.
Hugging Face speaks OpenAI’s wire format, so PromptGuard forwards your request to router.huggingface.co/v1 as you sent it and returns Hugging Face’s reply unchanged. Any OpenAI client works.
huggingface. PromptGuard then sends the stored key and ignores the Authorization header you send.
Auto-instrumentation
The SDKs do not patchhuggingface_hub. Use the proxy.