Drop-in replacement
Change one base URL and your existing Anthropic or OpenAI client keeps working — same request body, same response shape, same streaming frames.
Sentisec is a drop-in replacement for the Anthropic Messages API and the OpenAI Chat Completions API. You change the base URL your client already has and swap in a Sentisec key. There is no SDK to install, no import to add, and no code path in your application that knows Sentisec exists.
The swap
from anthropic import Anthropic
# Before:
client = Anthropic(api_key="sk-ant-...")
# After:
client = Anthropic(
base_url="https://api.sentisec.ch/ws/<your-workspace-id>",
api_key="sk_sentisec_xxxxxxxx_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
)from openai import OpenAI
# Before:
client = OpenAI(api_key="sk-...")
# After:
client = OpenAI(
base_url="https://api.sentisec.ch/ws/<your-workspace-id>/v1",
api_key="sk_sentisec_xxxxxxxx_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
)export ANTHROPIC_BASE_URL=https://api.sentisec.ch/ws/<your-workspace-id>
export ANTHROPIC_API_KEY=sk_sentisec_xxxxxxxx_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
claude# Settings → Models → Custom OpenAI
Base URL: https://api.sentisec.ch/ws/<your-workspace-id>/v1
API Key: sk_sentisec_xxxxxxxx_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxNote the /v1 suffix: it belongs on the OpenAI-shaped URL and not on
the Anthropic-shaped one, because each client appends a different path.
What stays exactly the same
- The model id you send.
- The request body, field for field.
- The response shape — Sentisec preserves the upstream's format byte-for-byte unless it intervenes.
- Streaming:
"stream": trueon the same endpoint, with frame boundaries preserved. - Tool-call schemas and vision content parts.
What Sentisec adds
- A verdict on each step, visible in the dashboard.
- Forensic evidence for flagged activity.
- A tool call that would exfiltrate data or take a destructive action is stopped before it runs, and the answer explains why. The CLI agents overview shows exactly what that looks like on the wire.
- Per-workspace controls over what gets enforced.
Which upstreams you can point at
Six providers carry traffic through this drop-in today:
| Provider | Base URL to set |
|---|---|
| Anthropic | https://api.sentisec.ch/ws/<your-workspace-id> |
| OpenAI | https://api.sentisec.ch/ws/<your-workspace-id>/v1 |
| Amazon Bedrock | either form — the Anthropic one for Claude ids, the OpenAI one for everything else |
| Kimi (Moonshot) | https://api.sentisec.ch/ws/<your-workspace-id>/v1 |
| Google Gemini | https://api.sentisec.ch/ws/<your-workspace-id>/v1 |
| Google Vertex AI | https://api.sentisec.ch/ws/<your-workspace-id>/v1 |
The URL is the same for every OpenAI-shaped provider — Sentisec picks
the upstream from the model id, or from the
X-Sentisec-Upstream-Provider header when you want to pin it
explicitly. Vertex AI always needs pinning, because its model ids
overlap other vendors' naming. See providers for the
per-provider setup.
Azure OpenAI is not available yet. If it is a requirement for your deployment, tell us.
Running your own Sentisec plane? Substitute your own host for
https://api.sentisec.ch and keep the rest of the path — see
enterprise access.
Related
- Providers — per-upstream setup
- Integrations — the same swap from inside LangChain, LlamaIndex, CrewAI, and friends
- Quickstart — first monitored call end to end
Features
What a Sentisec workspace gives you — drop-in compatibility with the clients you already use, key management, and the controls that decide what gets enforced.
Keys management
The two keys in Sentisec — the workspace key your agents authenticate with, and the provider keys Sentisec forwards with on your behalf.