Proxy Reference
There is no KeyVault Edge SDK to install: you use your provider's own SDK or plain HTTP, pointed at the proxy with two headers. Keys and tokens are managed in the dashboard.
Request headers
X-KV-Token: your kvt_... token. Required.
X-KV-Target: the provider API base, e.g. https://api.openai.com. Required; must be a public https URL. Only its origin is used.
Origin (or Referer): checked against the token's allowed hosts. Browsers send it automatically; server-side callers must send one that matches. If neither is present the proxy falls back to the Host header, which is the proxy's own host and will not match your allowlist.
The request path and query are forwarded unchanged: https://proxy.keyvaultedge.com/v1/chat/completions → https://api.openai.com/v1/chat/completions. The proxy strips the KeyVault headers and sets the provider's auth header with your real key.
# The proxy forwards the path to the X-KV-Target origin and injects# the real key. Server-side callers send an Origin that matches one# of the token's allowed hosts.curl https://proxy.keyvaultedge.com/v1/chat/completions \ -H "X-KV-Token: $KVE_TOKEN" \ -H "X-KV-Target: https://api.openai.com" \ -H "Origin: https://app.yourdomain.com" \ -H "Content-Type: application/json" \ -d '{ "model": "gpt-4o-mini", "messages": [{ "role": "user", "content": "Hello from the edge" }] }'Proxy endpoints
/<provider path>/v1/ephemeral/v1/validate/v1/statusError responses
Errors from the proxy itself are JSON: { "error": { "message", "detail", "status" }, "provider": "keyvault-edge" }. Provider errors pass through unchanged.
400Missing X-KV-Target, or malformed token401Missing X-KV-Token, or token expired402Token reached its monthly cost cap403Invalid signature, host not allowed, endpoint not permitted, or token revoked422X-KV-Target is not a public https URL429Rate limit exceeded (Retry-After header set)503Token could not be decrypted (transient)Webhooks
Configure a webhook endpoint in the dashboard to receive breach and token lifecycle events.
token.breach.unauthorized_hostToken used from a host outside its allowlisttoken.breach.invalid_hmacTampered or forged token presentedtoken.breach.expiredExpired token presentedtoken.quarantinedToken quarantinedtoken.revokedToken revokedproxy.health.degradedProxy health degradedproxy.health.recoveredProxy health recovered