The namespace is removed before forwarding:
openrouter/anthropic/claude-sonnet-4.5 reaches OpenRouter as anthropic/claude-sonnet-4.5.
1. Store the key with its host
The host is never taken from the request. It is stored with the key, so a caller cannot send your key somewhere else. In Dashboard → Gateway → Provider Keys → Add Provider Key, choose OpenAI-compatible, paste the key and enter the service’s endpoint under Base URL. Or through the provider keys API, as anopenai_compatible key with the endpoint in base_url:
base_url must not contain credentials, and it must not be a link-local address such as the cloud metadata service.
On PromptGuard Cloud the host must be on the public internet, over https. Cloud calls it from its own network, which is shared by every customer, so it refuses an internal destination: localhost and other loopback addresses, private ranges such as 10.0.0.0/8 and 192.168.0.0/16, 0.0.0.0, IPv6 loopback and unique-local addresses, cloud metadata hosts such as metadata.google.internal, names ending .internal, .local or .localhost, and an address written as a number (2130706433, 0x7f000001, 127.1). It is refused when you save the key, again before each request, and once more when the connection opens: the name is resolved then, every address it has must be public, and the request goes to the address that was checked, so a name that later resolves to an internal address is refused too. A request refused this way gets a 400 and nothing is sent.
On a self-hosted install or a Hybrid data plane, the host may be a private or loopback address, such as an on-prem vLLM or Ollama server, and plain http is allowed for one. A public host still has to use https, so your key never crosses the internet in clear.
The namespace picks the adapter, not the host. Every namespace resolves to the same stored
openai_compatible key: the most recent active one for the project, or failing that for your account. To use two of these services, put them in separate projects.2. Send the request
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.api_key, so give it any value; PromptGuard sends the stored key instead. Without a stored openai_compatible key the request fails, because there is no host to send it to.