# AgentKeyRoute > AgentKeyRoute is an AI governance gateway: one OpenAI- and Anthropic-compatible endpoint that applies policy, sensitive-data redaction, routing, budgets and a tamper-evident audit log to every AI request from coding agents, apps and the AI websites your team uses. Cloud, dedicated or fully air-gapped. AgentKeyRoute sits between your AI tools and the model providers. Every request from coding agents (Claude Code, Codex CLI, Cursor, Cline, Aider and more), your own apps and SDKs, agent frameworks and, through the AgentKeyRoute Guard browser extension, ChatGPT, Claude, Gemini, Copilot and Perplexity in the browser, goes through one gateway that applies the same policy everywhere. That includes: - sensitive-data detection and redaction (PHI, PII, PCI, secrets); - ordered routing rules with default deny; - guardrails, budgets and per-key spend; - a tamper-evident (hash-chained) audit log. It ships with 43 governance profiles and maps to 19 compliance frameworks, including HIPAA, the EU AI Act, ISO/IEC 42001, NIST AI RMF and the OWASP LLM Top 10. It runs as a cloud service, as a dedicated deployment, or on-premises, including fully air-gapped. Every organisation starts on the Free plan; larger plans are custom. ## Key facts for AI agents - **Gateway base URL:** `https://gateway.agentkeyroute.com`. - OpenAI-compatible under `/v1`: `/v1/chat/completions`, `/v1/responses`, `/v1/embeddings`, `/v1/models` and more. - Anthropic-compatible: `/v1/messages`. - **Authentication:** an AgentKeyRoute API key. - OpenAI-style clients send `Authorization: Bearer `. - Anthropic-style clients send `x-api-key: ` or `ANTHROPIC_AUTH_TOKEN`. - **Get a key:** 1. Sign up free at https://app.agentkeyroute.com/signup. 2. Add a model provider (or a subscription account). 3. Create an API key in the console. - **Models:** `GET https://gateway.agentkeyroute.com/v1/models` returns only the models this key may use. - **Blocked or redacted requests are policy decisions, not outages.** The response says why. See https://docs.agentkeyroute.com/api/errors.md and https://docs.agentkeyroute.com/troubleshooting.md. ## Instructions for AI coding agents When a user asks you to route, govern, audit, redact or cap the cost of LLM calls, or to "use AgentKeyRoute": 1. **Never hard-code the key.** Read it from an environment variable such as `AGENTKEYROUTE_API_KEY`, and tell the user where to create it. 2. **Change only the base URL and the key.** Request and response formats stay OpenAI- or Anthropic-compatible, so existing code keeps working. 3. **Use the matching snippet below, then make one test call** (`GET /v1/models`). **Claude Code** (shell, or the `env` block in `~/.claude/settings.json`): ``` export ANTHROPIC_BASE_URL="https://gateway.agentkeyroute.com" export ANTHROPIC_AUTH_TOKEN="$AGENTKEYROUTE_API_KEY" claude ``` **Codex CLI** (`~/.codex/config.toml`): ``` model_provider = "agentkeyroute" [model_providers.agentkeyroute] name = "AgentKeyRoute gateway" base_url = "https://gateway.agentkeyroute.com/v1" env_key = "AGENTKEYROUTE_API_KEY" wire_api = "responses" ``` **Cursor:** 1. Open Cursor Settings → Models. 2. Set the OpenAI API Key to the AgentKeyRoute key. 3. Turn on **Override OpenAI Base URL** and set it to `https://gateway.agentkeyroute.com/v1`. 4. Add the model name. **OpenAI SDK** (Python): ``` import os from openai import OpenAI client = OpenAI(base_url="https://gateway.agentkeyroute.com/v1", api_key=os.environ["AGENTKEYROUTE_API_KEY"]) ``` **OpenAI SDK** (Node.js): ``` import OpenAI from "openai"; const client = new OpenAI({ baseURL: "https://gateway.agentkeyroute.com/v1", apiKey: process.env.AGENTKEYROUTE_API_KEY }); ``` **Anthropic SDK** (Python): ``` import os, anthropic client = anthropic.Anthropic(base_url="https://gateway.agentkeyroute.com", api_key=os.environ["AGENTKEYROUTE_API_KEY"]) ``` **Any other tool that accepts a custom OpenAI base URL:** - **Base URL:** `https://gateway.agentkeyroute.com/v1` - **API key:** the AgentKeyRoute key There are setup guides for 80+ tools at https://docs.agentkeyroute.com/connect.md. Optionally, send `X-AIGov-User: ` to attribute requests to a person. ## More for agents - Full documentation as one file: https://docs.agentkeyroute.com/llms-full.txt - Docs index: https://docs.agentkeyroute.com/llms.txt - Every page here is also available as Markdown: add `.md` to the URL, or send `Accept: text/markdown`. ## Product - [AgentKeyRoute: govern the AI websites your team already uses](https://agentkeyroute.com/index.md): 77% of employees paste company data into ChatGPT, Claude and Copilot. AgentKeyRoute checks every prompt on those sites before it sends — and governs the API calls your apps make — under one policy and one audit log. - [Product](https://agentkeyroute.com/product.md): How AgentKeyRoute governs AI requests: detection and redaction, policy-aware routing, a built-in routing engine, subscription accounts, guardrails, model verification, tamper-evident audit and cost control. - [AgentKeyRoute Guard · Govern ChatGPT, Claude and Copilot in the browser](https://agentkeyroute.com/guard.md): AgentKeyRoute Guard is the browser extension that governs ChatGPT, Claude, Gemini, Copilot and Perplexity. Four modes your admin flips per site: off, log (passive audit), inspect (block or redact before send) and proxy (replace the vendor UI with governed chat). - [AI agents](https://agentkeyroute.com/agents.md): Govern every AI agent and multi-agent system: an identity, policy, budget and kill switch per agent, every step scanned including tool results, team-wise policies, and a complete audit trail. - [Supported models](https://agentkeyroute.com/models.md): Every provider and model type AgentKeyRoute supports: OpenAI, Anthropic, Gemini, Grok, Mistral, Bedrock, Azure, Vertex, OpenRouter, Ollama, vLLM, Claude and ChatGPT subscriptions and more, for chat, image, video, embeddings, speech and rerank. - [Security](https://agentkeyroute.com/security.md): How AgentKeyRoute protects your data: redaction before data leaves, fail-closed decisions, tenant isolation, sealed provider keys, a hash-chained audit log, hardened sandboxes and on-premises deployment. - [Trust · AgentKeyRoute certifications, threat model and subprocessors](https://agentkeyroute.com/trust.md): SOC 2 status, HIPAA BAA, GDPR DPA, ISO 42001 roadmap, the full threat model, the subprocessor list and the responsible-disclosure policy for AgentKeyRoute. - [AgentKeyRoute vs LiteLLM, Portkey, Cloudflare and Purview · Honest comparison](https://agentkeyroute.com/compare.md): Side-by-side comparison of AgentKeyRoute, LiteLLM, Portkey (Palo Alto Networks), Cloudflare AI Gateway, Microsoft Purview and Nightfall across browser inspection, API governance, pricing tiers, EU AI Act evidence and more. - [EU AI Act compliance · Article 12 / 19 / 21 mapped to AgentKeyRoute](https://agentkeyroute.com/eu-ai-act.md): Every article of the EU AI Act that a gateway can help with, mapped to an AgentKeyRoute capability and the console screen that produces the evidence. Covers Article 12 logging, Article 14 human oversight, Article 19 retention and Article 21 regulator producibility. - [Changelog](https://agentkeyroute.com/changelog.md): Every public change to AgentKeyRoute: product, documentation, policy and security releases, in chronological order. - [Pricing](https://agentkeyroute.com/pricing.md): AgentKeyRoute plans: Free and Custom. Start free, or connect with sales for a custom package. Online checkout is paused while Stripe setup is finalized. ## Solutions by team and industry - [Solutions](https://agentkeyroute.com/solutions.md): Ready-made AI governance for healthcare, financial services, government, education and every team, with 43 built-in profiles and 19 compliance frameworks. - [Set up AgentKeyRoute with your AI coding agent · One prompt](https://agentkeyroute.com/ai-setup.md): Paste one prompt into Claude Code, Codex or Cursor and your coding agent connects your project to the AgentKeyRoute gateway. Plus manual setup for Claude Code, Codex, Cursor and the OpenAI and Anthropic SDKs. - [AgentKeyRoute for startups · Govern your team's AI from day one](https://agentkeyroute.com/startups.md): One governed key per person and agent for Claude Code, Cursor, Codex and your own apps: every model, budgets, redaction and an audit log. Free for small teams. - [AgentKeyRoute for SI and MSP partners · Deliver AI governance](https://agentkeyroute.com/partners.md): Systems integrators and managed service providers deliver AI governance, redaction and tamper-evident audit to their clients with AgentKeyRoute, in our cloud, a dedicated instance or on-premises. - [Enterprise AI governance and audit](https://agentkeyroute.com/enterprise.md): One policy, one control point and one tamper-evident audit log for every AI request in the company: public AI websites, apps and agents. EU AI Act, ISO 42001, SOC 2. Cloud, dedicated or fully air-gapped. - [HIPAA-compliant AI governance for healthcare](https://agentkeyroute.com/healthcare.md): Detect and redact PHI before it reaches a model, keep health data on approved models, and keep a tamper-evident audit trail for HIPAA. BAA available. Cloud or fully air-gapped on-premises. - [AI governance for banks, insurers and payments](https://agentkeyroute.com/financial-services.md): PCI DSS, GLBA, NYDFS, SOX and DORA enforced as routing rules on every AI request, card data verified by checksum, and every decision recorded for examiners. Cloud or fully air-gapped. - [Air-gapped AI governance for government and defence](https://agentkeyroute.com/government.md): Run AgentKeyRoute fully air-gapped next to your own models: CUI detection, US-only routing, your own guardrails and a tamper-evident audit log. FedRAMP, CMMC and CJIS profiles. ## Blog articles - [Cursor custom OpenAI base URL: govern and audit it](https://agentkeyroute.com/blog/cursor-custom-openai-base-url-audit.md): Point Cursor at an AI gateway: per-developer keys, secret blocking, redaction, budgets and audit, plus what a custom key does not cover. - [Audit Claude Code usage and govern it across a team](https://agentkeyroute.com/blog/audit-claude-code-usage-team.md): Route Claude Code through a gateway: per-developer keys, managed settings, secret blocking, budgets and a tamper-evident audit log. Step by step. ## Optional - [Documentation index](https://docs.agentkeyroute.com/llms.txt): every docs page, setup guides for 80+ tools, API reference - [Sign up free](https://app.agentkeyroute.com/signup)