Security

How CostKey handles your data

No proxy. Ever.

CostKey is not a proxy. Your AI API calls go directly from your app to OpenAI/Anthropic/Google. CostKey's SDK runs inside your application and reads responses after they're returned. Your AI traffic never touches our servers.

You control what's sent

The SDK captures metadata (model, tokens, cost, latency, stack trace) and optionally the request/response body. You can disable body capture entirely:

CostKey.init({
  dsn: '...',
  captureBody: false  // prompts and completions never sent
})

When captureBody is false, only metadata is transmitted: model name, token counts, cost, latency, and the call site (file, function, line number). No prompt content. No completion content.

Data flow

What we receive

What we never receive

Infrastructure

Self-hosting

Enterprise customers can self-host the CostKey server on their own infrastructure. The server is a single Node.js application with a PostgreSQL database. Your data never leaves your network.

Contact naman@costkey.dev for self-hosting setup.

Enterprise

Reporting vulnerabilities

If you find a security issue, please email naman@costkey.dev. We take all reports seriously and will respond within 24 hours.