Quickstart

Quickstart

Point your agent at Sentisec and get your first verdict. One base URL, no code changes.

Sentisec sits between your agent and the model provider. It scores every model call, blocks tool calls that came from a compromised state, and records signed evidence for each decision. Getting started is one URL change.

Choose your door

Those are the same two doors app.sentisec.ch offers under Get started. The rest of this page covers the API-key path.

Your base URL

Everything downstream depends on getting this one string right.

https://api.sentisec.ch/ws/<your-workspace-id>        # Anthropic-shaped clients
https://api.sentisec.ch/ws/<your-workspace-id>/v1     # OpenAI-shaped clients

The /v1 suffix belongs on the OpenAI-shaped URL only — Anthropic clients append it themselves.

Your workspace id sits next to your API key in the dashboard. Use the workspace-scoped form on every transport: it is the only URL shape that guarantees your workspace's policy travels with the request. An unscoped base URL will authenticate and return answers, but on some transports it resolves without your policy attached — so the call looks connected while enforcing nothing of yours.

Authenticate with your Sentisec API key, in whichever header your client already uses:

HeaderTypical client
Authorization: Bearer <k>OpenAI SDK, generic
x-api-key: <k>Anthropic SDK

Two keys are in play. The workspace key (sk_sentisec_…, minted under Settings → API keys) is the only secret your application carries. The provider key — your Anthropic or OpenAI key — is stored in Sentisec under Settings → Providers (Provider keys), per workspace, per provider; your application never sees it. See keys management.

Make your first call

export SENTISEC_API_KEY=sk_sentisec_...

curl -X POST https://api.sentisec.ch/ws/<your-workspace-id>/v1/messages \
  -H "Authorization: Bearer $SENTISEC_API_KEY" \
  -H "anthropic-version: 2023-06-01" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "claude-sonnet-4",
    "max_tokens": 256,
    "messages": [{"role": "user", "content": "hello"}]
  }'

The response body is the provider's own, byte for byte. Open Sessions in your workspace's dashboard and the session is there; its Live view shows sessions as they arrive. That is your confirmation the route is live.

Verdicts attach to tool actions, the moments an agent reaches out and touches something. A plain text completion makes no tool call, so it lands as a completed session with nothing to adjudicate. Point a tool-using agent at the same URL and every action it takes is scored.

Pick your integration shape

Which path matches your workload

WorkloadUse…
Try it on a Claude or ChatGPT subscriptionSubscription mode
Claude Code, Cursor, Codex, opencodeBase-URL variable
Python agent or frameworkPython
Node.js agentTypeScript
Any other languagecURL / raw HTTP
Evaluating SentisecDashboard

What runs where

Loading diagram

Whichever surface you pick, the integrity engine runs on every request and the verdict shape is identical across all of them.

Next

  • Examples — complete working recipes you can paste.
  • Providers — connect Anthropic, OpenAI, Kimi, Gemini, or Vertex AI.
  • First-run problems — install failures, and the mistakes that produce a first-call 401 or 404.
Protected docs