init() and keep the client as it is (auto-instrumentation patches the anthropic package in Python and @anthropic-ai/sdk in Node).
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./messages and its token counter at /messages/count_tokens, so the official Anthropic SDK works unchanged. Every model id starting claude- goes to Anthropic.
The Anthropic SDK adds /v1 to its base URL itself, so its base URL is https://api.promptguard.co/api, one segment shorter than the proxy URL above.
anthropic and drop the Authorization header. PromptGuard then sends the stored key.
The anthropic-version and anthropic-beta headers your SDK sends are forwarded as sent. Only when you send no anthropic-version does PromptGuard add 2023-06-01.
Claude model ids are accepted on
/chat/completions too, but the reply comes back in Anthropic’s Messages shape (content, stop_reason), not OpenAI’s (choices). An OpenAI client cannot read it, so use the Anthropic SDK or the /messages route.Auto-instrumentation
Claude on AWS Bedrock
Claude models served by Bedrock are Bedrock traffic: see AWS Bedrock.Next steps
Amazon Bedrock
Bedrock Runtime calls with boto3 or the AWS SDK
Provider keys
Store your provider credentials once, forwarded server-side
Auto-instrumentation
Which provider calls
init() patches, and which it does not