Guardrails is a drop-in proxy. Your existing AI code doesn't change — you add one URL and three headers.
We wrote a plain-English setup guide that explains everything step by step — including a copy-paste prompt you can give to Claude, ChatGPT, or Copilot and let the AI make the change for you. If anything goes wrong, removing one line instantly puts your app back the way it was.
Download the Easy Setup GuideUsing Claude, ChatGPT, Cursor, or Copilot? Paste this prompt and replace the two keys — the assistant finds the right file and makes the change:
Find where this project creates its Anthropic or OpenAI client. Add a baseURL option pointing to https://aegisguardrails.com/anthropic (or /openai for OpenAI) and add these default headers: X-Audit-Key: <my Guardrails key> X-Provider-Key: <my existing AI key> Don't change anything else.
Sign up at aegisguardrails.com/signup. Your GUARDRAILS_API_KEY will be shown in your dashboard.
// Anthropic
const client = new Anthropic({
apiKey: process.env.ANTHROPIC_API_KEY,
baseURL: 'https://aegisguardrails.com/anthropic',
defaultHeaders: {
'X-Audit-Key': process.env.GUARDRAILS_API_KEY,
'X-Provider-Key': process.env.ANTHROPIC_API_KEY,
'X-Actor-Id': getCurrentUserId(), // optional
'X-Session-Id': getSessionId(), // optional
},
})
// OpenAI
const client = new OpenAI({
apiKey: process.env.OPENAI_API_KEY,
baseURL: 'https://aegisguardrails.com/openai',
defaultHeaders: {
'X-Audit-Key': process.env.GUARDRAILS_API_KEY,
'X-Provider-Key': process.env.OPENAI_API_KEY,
},
})Every response includes a _audit field:
const response = await client.messages.create({ ... })
console.log(response._audit)
// {
// event_id: 'a3f8b21c-...',
// hash: '3a7bd3e2...',
// ledger_status: 'pending' // → 'committed' after ~30s
// }Any record can be publicly verified — no login required:
GET https://aegisguardrails.com/verify/{event_id}
// Response
{
"eventId": "a3f8b21c-...",
"hash": "3a7bd3e2...",
"platformSigValid": true,
"customerSigValid": true,
"onChain": true,
"blockHeight": 41823,
"tampered": false
}| Header | Required | Description |
|---|---|---|
| X-Audit-Key | Yes | Your Guardrails API key |
| X-Provider-Key | Yes | Your Anthropic or OpenAI API key — forwarded to the provider |
| X-Actor-Id | No | User or service account ID — appears in audit log |
| X-Session-Id | No | Groups a multi-turn conversation together |