Base URL
Authentication
All API requests require an API key passed in theX-Cognisafe-Key header:
OpenAPI spec
The full OpenAPI 3.1 spec is available at:/docs on any self-hosted instance.
Endpoint groups
/internal/log
Used by the SDK and proxy to ship request/response payloads. Not intended for direct use by application code.
/api/requests
Query logged LLM requests for a project.
/api/safety-scores
Query safety scoring results.
/api/billing
Subscription and usage data.
/webhook/stripe
Stripe webhook endpoint. Cognisafe verifies the Stripe-Signature header using STRIPE_WEBHOOK_SECRET. Do not call this endpoint directly.
Rate limits
API rate limiting is applied at the project level based on subscription tier:
When the limit is exceeded,
POST /internal/log returns HTTP 429 Too Many Requests. Other endpoints are not rate-limited by tier.

