========================================================== GUARDRAILS — EASY SETUP GUIDE (no engineering degree needed) Aigis · Divine Shield against data tampering ========================================================== WHAT THIS DOES (in plain English) ---------------------------------------------------------- Right now your app talks directly to an AI company (OpenAI, Anthropic, Google, and so on). Guardrails sits in the middle, like a notary: every question and answer passing through gets a permanent, tamper-proof seal. Your app works exactly the same — same answers, same speed, streaming included — but now you have proof of everything your AI ever said. You do NOT need to rewrite your app. You change ONE setting: the "address" your app sends AI requests to. Works with: OpenAI, Anthropic (Claude), Google Gemini, xAI Grok, Meta Llama, DeepSeek, Alibaba Qwen, plus Azure OpenAI and AWS Bedrock. WHAT YOU NEED ---------------------------------------------------------- 1. Your Guardrails API key — shown in your dashboard after signup (starts with "gr_") 2. Your existing AI API key — the key your app already uses (for example an OpenAI key starting with "sk-") 3. Access to your app's code, OR a developer/AI assistant who can paste in a few lines for you TIP: save your AI key once in the console under Settings -> AI Provider Keys and you can skip sending it with every request. ---------------------------------------------------------- OPTION A — LET AN AI DO IT FOR YOU (easiest) ---------------------------------------------------------- If you use Claude, ChatGPT, Copilot, Cursor, or any AI coding assistant, paste this prompt into it: "Find where this project creates its AI client. If it's the OpenAI SDK (or any OpenAI-compatible one): set the base URL to https://aegisguardrails.com/v1, set the API key to , and add a default header X-Provider-Key: . If it's the Anthropic SDK: set the base URL to https://aegisguardrails.com/anthropic and add default headers X-Audit-Key: and X-Provider-Key: . Don't change anything else." Replace the <...> parts with your real keys. The assistant will find the right file and make the change. ---------------------------------------------------------- OPTION B — DO IT YOURSELF (JavaScript / TypeScript) ---------------------------------------------------------- Using the OpenAI SDK? This one setup works for EVERY model (OpenAI, Claude, Gemini, Grok, Llama, DeepSeek, Qwen): 1. Search your project for: new OpenAI( 2. Change it to (lines marked NEW): const client = new OpenAI({ baseURL: 'https://aegisguardrails.com/v1', // NEW apiKey: 'gr_your_key_here', // NEW (your Guardrails key) defaultHeaders: { // NEW 'X-Provider-Key': process.env.OPENAI_API_KEY, // NEW }, // NEW }) 3. Save, restart your app. Done. To use another model, just change the model name, e.g. 'claude-sonnet-4-6' or 'gemini-2.5-flash' (use that provider's key). Using the Anthropic SDK instead? Search for new Anthropic( and change it to: const client = new Anthropic({ apiKey: process.env.ANTHROPIC_API_KEY, baseURL: 'https://aegisguardrails.com/anthropic', // NEW defaultHeaders: { // NEW 'X-Audit-Key': 'gr_your_key_here', // NEW 'X-Provider-Key': process.env.ANTHROPIC_API_KEY, // NEW }, // NEW }) ---------------------------------------------------------- OPTION C — DO IT YOURSELF (Python) ---------------------------------------------------------- 1. Search your project for: OpenAI( 2. Change it to: client = OpenAI( base_url="https://aegisguardrails.com/v1", # NEW api_key="gr_your_key_here", # NEW default_headers={ # NEW "X-Provider-Key": os.environ["OPENAI_API_KEY"], # NEW }, # NEW ) 3. Save, restart. Done. Using the Anthropic Python SDK? Set base_url="https://aegisguardrails.com/anthropic" and add default_headers with X-Audit-Key and X-Provider-Key, like the JavaScript example above. ---------------------------------------------------------- STREAMING ---------------------------------------------------------- If your app streams replies word by word (stream: true), that keeps working for OpenAI, Gemini, Grok, Llama, DeepSeek and Qwen models. Claude, Azure and Bedrock replies currently arrive in one piece — set stream to false for those for now. ---------------------------------------------------------- HOW TO KNOW IT'S WORKING ---------------------------------------------------------- 1. Use your app normally — ask your AI something. 2. Log into your console at console.aegisguardrails.com 3. You should see the call appear in "Audit Events" within seconds. After ~30 seconds its status turns to "committed" — that means it's permanently sealed on the blockchain. ---------------------------------------------------------- OPTIONAL EXTRAS ---------------------------------------------------------- Want to know WHICH user each conversation was with? Add two more headers wherever you made the change above: 'X-Actor-Id': the logged-in user's ID 'X-Session-Id': the conversation/chat ID These show up in your audit log so you can search by person or conversation later. ---------------------------------------------------------- TROUBLESHOOTING ---------------------------------------------------------- "401 Missing X-Audit-Key" → the Guardrails key isn't being sent; re-check the change. "401 Invalid API key" → typo in your gr_ key, or your account is inactive. "400 Missing X-Provider-Key"→ your AI key isn't being passed through, and none is saved in the console for that provider. "Can't tell which provider" → put the provider in front of the model name, e.g. "deepseek/deepseek-chat". App errors after the change → undo the base URL change and your app instantly goes back to talking to the AI directly. Nothing breaks permanently. Full docs: https://aegisguardrails.com/docs Questions? support@aegisguardrails.com ==========================================================