Skip to main content

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.
Hub model ids starting 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.
To keep the Hugging Face key out of your application, store it as a provider key under huggingface. PromptGuard then sends the stored key and ignores the Authorization header you send.

Auto-instrumentation

The SDKs do not patch huggingface_hub. Use the proxy.