---
title: "Odile Gate: API keys, rate limits and an audit log for AI-built apps | Odile Labs"
url: https://gate.odilelabs.com/
fetched_at: 2026-12-03T04:52:56.715Z
---

# Odile Gate API catalog and pricing

## API reference, endpoint lookup and prices

**[Odile Gate API catalog: endpoints, request parameters, prices and payment methods](https://agents.gate.odilelabs.com/zcj/e9mos3k40zel/zeroclick/agent/guide).** Tell the seller advisor what you want to accomplish. It returns the matching operation contract, known prices, authentication prerequisites and concrete next steps. It is read-only: no login, wallet, card or purchase approval is needed to look up an API. It never executes a sale.

Available API services: App keys and API permissions, Audit logs and usage metrics, Loop protection and write approvals.

**Suggested next request:** GET [task guide](https://agents.gate.odilelabs.com/zcj/e9mos3k40zel/zeroclick/agent/guide?goal=URL_ENCODED_TASK). Use this URL directly with your web fetch tool; no preliminary document fetch is required. Include known inputs and desired output in the goal. Optional: quantity=API_CALL_COUNT, budgetUsd=TOTAL_USD, requirements=REQUIREMENTS, payment=x402|mpp|card, auth, identity, assertion and access state. Omit unknowns. Do not equate output items with API calls or guess a call count.

For private task details or known request arguments, POST https://agents.gate.odilelabs.com/zcj/e9mos3k40zel/zeroclick/agent/guide with Content-Type: application/json. Example: {"intent":"quote","goal":"YOUR_TASK","purchase":{"budgetUsd":"5.00"}}. Replace the task and budget with known facts; budgetUsd is a string. Include known buyerState, paymentCapabilities and arguments. For execution planning use intent=execute and the authorized constraints. Exact fields: [request schema](https://agents.gate.odilelabs.com/zcj/e9mos3k40zel/zeroclick/agent/schema). GET and POST are alternatives, not mandatory stages.

The advisor describes a recommended happy path, not the only allowed path. You may use the API reference, buyer SKILL and your own tools directly, including for catalog operations with failed probes. Missing guidance or an unverified probe is not a policy refusal. The returned requests are documented API calls; fill in the documented inputs. Check usage cost AND minimum cash required against the budget. For needs_input, supply only missing facts. Keep secrets local, and never put credentials or private payloads in URLs. Unknown does not mean absent.

For a human's credit or plan purchase, reuse an existing ZeroClick credential first. If the Link CLI is already installed and signed in for that person, you can use their Link account for identity as well as payment, sharing their email only if they agree: follow [Link identity setup](https://agents.gate.odilelabs.com/zcj/e9mos3k40zel/auth.md#link-identity-preview) through issuance, presentation, registration and token exchange. Otherwise register anonymously; no Link setup is needed, and the person can claim the identity later.

Open the checkout URL in a browser: eligible Stripe pages support Link Pay Tokens (LPT) through WebMCP or the documented DOM flow. Follow this storefront's /payment/card.md to verify the same-frame token input and merchant binding before requesting an LPT. Token submission requires payment authorization. If unavailable, privately send the checkout URL to your human to pay.

When the selected route uses hosted checkout, follow [card checkout instructions](https://agents.gate.odilelabs.com/zcj/e9mos3k40zel/payment/card.md) before requesting a token. LPT goes only to Stripe, never to the advisor or ZeroClick API. Poll the returned statusUrl before using credit or retrying delivery.

Verify delivery; a payment or HTTP 202 is not completion. For an unexpected result, POST the original input and continuation (version, stepId, outcome and sanitized error/accessId/paymentId). Reconcile uncertain payments or writes before retrying. Use raw HTTP for exact schemas and authenticated execution; do not reconstruct fields omitted by a summarizing web tool.

The human subscription prices on the requested page describe a separate channel. Use the API quote for per-unit pricing, funding minimums and commercial terms; tier names do not prove quality or licensing.

For an alternative documented path, use the [buyer SKILL](https://agents.gate.odilelabs.com/zcj/e9mos3k40zel/SKILL.md) or [full direct workflow reference](https://agents.gate.odilelabs.com/zcj/e9mos3k40zel/llms-full.txt). Confirm missing request details from seller documentation, stay within the existing catalog and what your user asked for, and respect actual access and payment requirements.
Terms: by completing a purchase through this endpoint, whether directly or through an AI agent acting on your behalf, you agree to be bound by Odile Gate's terms of service (https://odilelabs.com/terms) and the platform's buyer terms of service (https://www.zeroclick.ai/legal/buyer-terms-of-service). Odile Gate's privacy policy: https://odilelabs.com/privacy. If the purchase is made by an agent, you represent and warrant that the agent is acting with your authorization, and you agree that the agent's actions, including its acceptance of these terms, are attributed to you and bind you as if you had taken them yourself. Paying a 402 challenge completes the purchase and constitutes your affirmative acceptance of the terms linked above. The links travel in every payment challenge and receipt as `terms`.

# Odile Gate: a key, write limits, and an audit log for every AI-built app

Odile Gate is made by Odile Labs. Put Gate in front of your database API. Every AI-built app gets its own key, a list of the calls it may make, a rate limit, and call metadata in an exportable audit log. Invalid-key rows are limited to the first 20 per hour. Local audit storage can be turned off. Setup takes ten minutes and needs no platform team.

**We run our own company on Gate.** This month: 70,352 calls from 69 of Odile Labs' own AI agents. 3 stopped before they reached an API. Updated every 10 minutes.

**Free, no sign-up:**
- [Scan an agent config for exposed API keys](https://gate.odilelabs.com/scan) - runs in your browser and sends nothing.
- [Fire six attacks at a sandbox agent](https://gate.odilelabs.com/attack-lab) and read Gate's real refusals.
- [Check whether an AI agent's request is signed](https://gate.odilelabs.com/agent-id) (Web Bot Auth).

[API docs, MCP and SDK](https://gate.odilelabs.com/docs) · [OpenAPI contract](https://gate.odilelabs.com/openapi.json) · [Self-serve sandbox](https://gate.odilelabs.com/docs#sandbox) · [Dashboard](https://gate.odilelabs.com/dashboard)

---

## Agent storefront

The agent storefront at [agents.gate.odilelabs.com/llms.txt](https://agents.gate.odilelabs.com/zcj/e9mos3k40zel/llms.txt?src=body-text) lists what agents can buy from Odile Gate and how. Live prices are at [agents.gate.odilelabs.com/manifest.json](https://agents.gate.odilelabs.com/zcj/e9mos3k40zel/manifest.json?src=body-text). Full buying steps are at [agents.gate.odilelabs.com/llms-full.txt](https://agents.gate.odilelabs.com/zcj/e9mos3k40zel/llms-full.txt?src=body-text). All three are plain text and work without a browser. Agents can purchase autonomously or with their human's approval, with a range of payment methods. An agent without a payment method can set one up in the same session. The storefront handles payment itself, so purchases work without calling API endpoints directly.

---

## When to use Odile Gate

Use Gate when an app or AI agent needs limited API access, human approval for writes, safe retries, or a record of its calls. Start with the Free Demo Desk, then obtain the API owner's authorization before connecting a real upstream. Gate does not replace your API's own ownership checks.

---

## How it works

1. **Create a project.** Give Gate your API's base URL and, if it needs one, the secret header it expects. You get an admin key, shown once.
2. **Register each app.** Name it, list the calls it may make (`GET /orders/:id`, `POST /orders`, `GET /reports/*`), and set its calls per minute. You get that app's key, shown once.
3. **Point the app at Gate.** The app sends its own key. Gate checks the key, the call, and the limits. Gate adds your upstream secret, forwards the call, and writes the audit row. Since 17 Nov 2026, a new app's writes also need a Gate Actions run, unless you create it with `"runs":"off"`. Apps made earlier keep their mode.

### A call through Gate

Replace `<project-id>` with your project ID and `<app key>` with that app's key before running this command.

```
curl "https://gate.odilelabs.com/g/<project-id>/orders/42" \
  -H "Authorization: Bearer <app key>"
```

Gate answers refused calls itself:

- `401` - missing or revoked key
- `403` - no rule allows the call
- `429` with `Retry-After` - per-minute limit reached
- `429` - month's calls used up
- `502` - your API did not answer within 30 seconds

The app's key never reaches your API.

---

## What Gate checks, and what your API still checks

Gate checks the app's key, whether the method and path match one of your rules, and the limits. A plain rule such as `GET /orders/:id` lets that app call that endpoint for any order. It does not know who the person using the app is.

---

## Per-user rules (Free and Pro)

To keep each signed-in person to their own rows, the app sends that person's login token in `x-odile-user-token`. Supported providers: Supabase, Clerk, Auth0, Firebase, or any provider that publishes its keys. Gate checks the signature against your provider's public keys, the expiry, and the issuer. Gate then only lets the call through when it names that person.

```
curl -X PUT https://gate.odilelabs.com/api/projects/<project-id>/enterprise \
  -H "Authorization: Bearer <admin key>" \
  -H "content-type: application/json" \
  -d '{"user_tokens":{"jwks_url":"https://<your-project>.supabase.co/auth/v1/.well-known/jwks.json","issuer":"https://<your-project>.supabase.co/auth/v1"}}'
```

Example routes:

```
["GET /users/{user}/orders/:id", "GET /orders?user_id=eq.{user}"]
```

With a valid token for user `alice`:
- `/users/alice/orders/7` passes.
- `/users/bob/orders/7` gets `403`.
- `/orders?user_id=eq.alice` passes.
- Leaving out the filter or naming anyone else gets `403`.

A missing, expired, or forged token gets `401`. The token is never stored and never sent to your API. Gate accepts RS256, ES256, and EdDSA tokens. `audience` and `claim` (default `sub`) are optional.

Query pins scope reads, updates, and deletes. They are refused on `POST` rules, because an insert takes its owner from the body. For writes, put `{user}` in the path (`POST /users/{user}/orders`) and have your API take the owner from the path.

**Try it without a login provider.** On a Demo Desk project (upstream `https://sandbox.gate.odilelabs.com`), set `user_tokens` to the demo login and give an app the rule `GET /customers/{user}/tickets/:id`. Then `curl "https://gate.odilelabs.com/demo-login/token?user=A"` returns a 10-minute token for customer A. With it, `/customers/A/tickets/1` passes and `/customers/B/tickets/4` gets `403`.

```
-d '{"user_tokens":{"jwks_url":"https://gate.odilelabs.com/demo-login/jwks.json","issuer":"https://gate.odilelabs.com/demo-login","audience":"gate-demo"}}'
```

Anyone can get a demo token for any user, so Gate accepts the demo login only on Demo Desk projects. A project with your own API needs your own provider.

**What it still cannot do:** if a call does not name the user (for example `GET /orders/42` on its own), Gate cannot know who owns order 42. Put the user in the path or the query, or keep that check in your API.

**Response redaction (Free and Pro):** choose the JSON fields each app may receive in the dashboard or with `gate_set_response`. Unselected fields are removed. JSON only, up to 1 MiB and 5 seconds to read. Unsafe replies are withheld. Upstream writes still count. [Response filtering guide](https://gate.odilelabs.com/guides/see-every-ai-agent-call).

---

## Check the setup before giving an agent production access

**Gate Setup Check** reads the real protection settings and gives your agent and its human the same report: what is configured, what needs attention, and how to fix it. It catches observation mode, writes without mandatory runs, missing JWT setup, wildcard grants, and approval separation gaps. It sends no upstream requests and changes no settings.

Use `gate_check_setup` from your coding agent, open the [dashboard](https://gate.odilelabs.com/dashboard), or [read the setup-check guide](https://gate.odilelabs.com/guides/check-ai-agent-api-permissions). Free and Pro.

**Operational metrics (Free and Pro):** the dashboard and read-only `gate_metrics` tool show the last 24 hours of stored calls by HTTP status and reason, measured duration including upstream wait, and separate monthly gateway usage. Audit coverage can be partial. An app whose key makes no allowed call for 14 days (you choose 1 to 90) is flagged idle, with an optional webhook alert. Gate never revokes it for you. [Read the metrics and audit guide](https://gate.odilelabs.com/guides/see-every-ai-agent-call).

**AI model API keys (Free and Pro):** put Gate in front of your model provider so each agent gets its own key, only the calls you allow, a per-minute limit, and the loop stop. Your provider key stays in Gate and can be replaced in one call. Ordinary model requests and answers are not stored. Model requests held for approval keep their path, query, and prompt encrypted until a known outcome, rejection, or expiry cleanup. Unknown outcomes retain them pending resolution or expiry cleanup. [Read the model API key guide](https://gate.odilelabs.com/guides/ai-model-api-key-gateway).

---

## Gate Actions: give your agent permission to do the job, not access to everything

For an agent that changes real customer data. Your backend grants each agent session a **run**: the few actions it may take, bound to one customer, with limits and an expiry. Gate enforces it on every call, on top of the app's own allow-list.

Add a person under Approvers in the dashboard before granting `approval:true` actions. Without an active approver, Gate refuses the run with `409`.

```
curl -X POST https://gate.odilelabs.com/api/projects/<project-id>/runs \
  -H "Authorization: Bearer <admin key>" \
  -H "content-type: application/json" \
  -d '{"app":"app_...","label":"triage ticket 4411","scope":{"customer":"A"},"ttl_seconds":1800,
       "actions":[{"rule":"PATCH /customers/{customer}/tickets/:id","max":10},
                  "GET /customers/{customer}/tickets/:id",
                  {"rule":"POST /customers/{customer}/messages","approval":true}]}'
```

The answer has a run token (`gr_...`, shown once). The agent sends it as `x-odile-run` with its app key. `GET /g/<project-id>/_gate/run` tells the agent what it may still do.

**Refused:**
- Customer B's tickets (`action_not_in_run`).
- Deleting a ticket or exporting, even if the app's allow-list has them.
- The 11th update (`run_limit_reached`).
- Anything after the run expires or is revoked.

**Approved, exactly:**
A call marked `approval` is held, not sent (`202 approval_required`). A person sees the exact call in the dashboard and approves or rejects it with an approver key. The agent resends it with `x-odile-action`. A changed method, path, query, forwarded header, or body is refused (`approval_mismatch`). Retries after a known success are blocked (`already_executed`). Unknown outcomes need recovery or a human reopen.

**Retries after known success are blocked:**
Every write in a run carries an `Idempotency-Key`. A retry after success gets `already_executed` with the first status. After a timeout or a 5xx, Gate answers `outcome_unknown` instead of sending the write again. `POST /_gate/recover` asks your API whether it happened: executed, safe to retry, or needs review.

A new app's writes need a run by default. Change it with `PUT /api/projects/<id>/apps/<app>/runs {"mode":"writes"}` (or `"all"`, or `"off"` for a model or MCP gateway), or create the app with `"runs":"off"`. Included on Free and Pro.

**Approvers:** add the people who approve (`POST /api/projects/<id>/approvers {"name":"Dana"}`, or the dashboard) before granting approval actions. Each gets their own key and signs in to a dashboard that shows only what waits for them. Only an active approver key can approve, reject, or reopen actions. The admin key cannot decide, even after the last approver is revoked. Every decision is in the change log with who made it.

### Try Gate Actions in one minute, no card

```
curl -s https://gate.odilelabs.com/actions-quickstart.sh | sh
```

It runs against a built-in demo ticket API. Nothing leaves Gate. It shows: an allowed update, another customer's ticket refused, a retry that does not apply twice, an exact approval, revocation, and expiry.

Use the client in your agent:

```
import { Gate } from 'https://gate.odilelabs.com/sdk/gate.mjs'
```

No dependencies. Requires Node 18+, Deno, Workers, or a browser.

**Guides:**
- [Stop an API loop](https://gate.odilelabs.com/guides/stop-ai-agent-api-loop)
- [Odile Gate on AWS](https://gate.odilelabs.com/guides/odile-gate-on-aws)
- [Stop an agent from changing the wrong customer's data](https://gate.odilelabs.com/guides/stop-ai-agent-wrong-customer)
- [Approve one exact agent action](https://gate.odilelabs.com/guides/approve-exact-ai-agent-action)
- [Agent retries without duplicate writes](https://gate.odilelabs.com/guides/ai-agent-retries-duplicate-writes)
- [Give each agent its own API key](https://gate.odilelabs.com/guides/ai-agent-own-api-key)
- [Read only the signed-in user's data](https://gate.odilelabs.com/guides/ai-app-only-signed-in-user)
- [See your agent's recorded calls](https://gate.odilelabs.com/guides/see-every-ai-agent-call)
- [Jev picks, Gate enforces](https://gate.odilelabs.com/guides/jev-tool-selection)

**What Gate Actions does not replace:** your API's own ownership checks (or Supabase row-level security). Gate checks method, path, and query, and can inspect request bodies for configured block rules, model limits, and required approval fields. It only protects calls that go through Gate, so give the agent no other credentials. "Never twice" means retries after a known successful write are blocked. Unknown outcomes need recovery or a human reopen. An explicitly idempotent action can be sent again when recovery returns `safe_to_retry: true`. Your API must deduplicate using the forwarded `Idempotency-Key`. Keep the admin key with your backend, approver keys with the people who approve, and neither with the agent. Responses carry `Server-Timing: gate;dur=..., upstream;dur=...`. `gate;dur` reads 0 because a Cloudflare Worker's clock does not move between I/O; Gate's added time is measured from outside. See [measured latency](https://gate.odilelabs.com/status#latency).

---

## Hand off one smaller job

An agent can delegate a narrower run to another active app in the same project: `POST /g/<id>/_gate/run/delegate` with the parent's app key and `x-odile-run`. Send `{app, actions, ttl_seconds, max_calls, label}`. Scope is inherited. Approvals stay required. The child app's allow-list still applies. Expiry never exceeds the parent's. Every executed call spends the child's and all ancestors' budgets. Revoking or expiring any ancestor stops the descendants. Delegation stops at depth five.

Discovery includes `parent_run_id` and `depth`. Admins can read `GET /api/projects/<id>/runs/<run>/tree`. The SDK offers `gate.delegate(spec)`. Pass the returned token with the destination app's key.

---

## A refusal with a next step

Loop, exhausted-run, and unknown-write refusals include `recovery: {retry_after_seconds, do, hint}`. A loop says `wait_then_retry_once`. A used-up run says `stop`. An unknown write says `call_recover` when a check exists, otherwise `ask_human`. Status codes and reason headers stay the same. The SDK exposes `result.recovery` and never retries automatically.

---

## Learn the smallest rules from traffic

An admin opts in for one app with `PUT /api/projects/<id>/apps/<app>/learn {"minutes":60}`. Default is one hour. Maximum is 1440 minutes (24 hours). Use zero to stop. During that window only, learning records method and normalized path templates (id-like segments become `:id`), template totals, and call counts per minute. No raw ids, query values, headers, or bodies are recorded. At most 500 templates are kept, then deleted 7 days after learning ends. Calls that Gate refuses can contribute suggestions too. Review them before granting permission.

`GET .../learn` returns suggested routes and `per_minute`: p99 of observed minute counts times two, at least 10 and at most 6000. An admin must confirm `POST .../learn/apply {"confirm":true,"mode":"extend"}` (or `"replace"`) to apply the routes and rate. The SDK's backend-only methods are `learn`, `learnSuggestions`, and `applyLearning`. MCP's `gate_learn_suggestions` only reads. After reviewing suggestions, use `gate_update_app` with `confirm:true` and optional `mode:"extend"|"replace"` to call the same apply route with the owner or admin member key. It applies only learned routes and the suggested rate limit, never arbitrary values, and does not start learning.

---

## Keep an audit you can verify

New stored audit rows form a SHA-256 chain from a recorded genesis. Older rows remain outside that chain. `GET /api/projects/<id>/audit/proof?from=1&to=100` exports row-id ranges, chain anchors, and an HMAC-SHA256 signature derived from the project key material. Up to 10,000 rows per page. Follow `next_from`. `POST /api/projects/<id>/audit/verify` with the signed export reports `intact` or a failure reason, with the one-based `broken_at` position when applicable. Approval decisions include the approver name and decision time. Save exports outside Gate to keep evidence beyond your plan's retention. With `store_audit=false`, new calls add no local audit rows. The change log keeps its own chain. The SDK provides `auditProof` and `verifyAudit` on `GateAdmin`.

---

## Audit completeness and legal hold

Gate counts every call it refuses for a missing, unknown, or revoked app key (`401 bad_key`) per hour. With local audit storage on, at most the first 20 such refusals per project per UTC hour get an audit row. `GET /api/projects/<id>/audit/unauthenticated` lists the counts for the newest 10,000 hours with such calls. Counts are kept as long as the audit (30 days on Free, 365 on Pro).

The owner of a Pro project (not an Attack Lab project) can place a legal hold with `PUT /api/projects/<id>/audit/hold {"on":true,"reason":"..."}`. Until `{"on":false}`, the daily retention cleanup deletes no audit rows, approval decisions, change-log rows, or hourly invalid-key counts. Gate attempts to record each change in the change log. Gate has no WORM storage. Stream the audit to your SIEM to keep it longer without a hold.

---

## When Gate is down, and how fast it is

Gate fails closed. If it fails before forwarding a call (Gate unreachable, a Cloudflare problem, or your project's Durable Object unavailable), the call does not reach your API and your app gets an error or no answer. If it fails after forwarding, a write may have succeeded even though your app gets an error or no answer. Gate has no bypass, does not queue or retry calls, and the SDK never retries on its own.

Retry with backoff. For writes, send an `Idempotency-Key` inside a run. On a retry with the same key, Gate answers `already_executed` when it knows the write succeeded and `outcome_unknown` when it does not know the outcome. Held approvals wait at most 24 hours. Each project lives in its own Durable Object. Gate keeps up to 100,000 undelivered SIEM events on disk and sends them after an outage. Beyond that it drops the oldest. OpenShell's middleware denies requests (`gate_unavailable`) while it cannot reach Gate. Gate publishes no availability SLA.

The monitor calls Gate every 5 minutes. [Status](https://gate.odilelabs.com/status) shows, for each of the last 30 UTC days, the share of expected 5-minute slots with a recorded HTTP 200.

Measured 19 Nov 2026 from a server in New York, compared with direct calls to a Cloudflare Worker:
- p50: 81.5 ms higher through Gate
- p95: 102.7 ms higher through Gate
- p99: 122.9 ms higher through Gate

Method and full numbers: [status page](https://gate.odilelabs.com/status#latency).

---

## Advisory approval risk

When a project has an approval-risk model, approvers see an estimated rejection risk and the top two contributing signals. The pending queue sorts by risk and refreshes its features. Only a person approves or rejects. The score never executes a call. Without a model, scores are absent and newest-first order stays unchanged.

The admin can install a small JSON tree model with `PUT /api/projects/<id>/risk-model`, or remove it with JSON `null`. The offline trainer `tools/ml/train_risk.py --export saved-audit.jsonl` requires at least 200 approved/rejected actions, 30 rejects, and test AUC at least 0.05 above the app-history baseline. It reports chronological test AUC, precision/recall for the top 20%, Brier calibration, and feature importance. Dry run is the default. Synthetic tests are not evidence of production accuracy.

Signed proofs include safe action labels with decision-time features. Follow `next_actions_after` as `actions_after` separately from the audit `next_from` cursor, using the API, SDK `auditProof({from,to,actions_after})`, or MCP `gate_audit_proof`. Labels exclude held paths/bodies, keys, IPs, and notes. Old actions without captured features are excluded. Initial decisions survive execution and reopen. Offline HMAC authentication requires a separate check through `audit/verify`.

---

## See how a run unfolded

Click a run in the dashboard for its live timeline: call time, method, matched rule, status and reason; held, approved, and rejected actions with who decided; recovery outcomes; and delegated children. It refreshes every 20 seconds and shows the latest 500 events. The admin API `GET /api/projects/<id>/runs/<run>/timeline` supports older events with `before`. It contains no bodies or query values. The SDK offers `admin.timeline(runId)` and `admin.runTree(runId)`.

---

## Set it up from your coding agent

MCP endpoints:
- `https://gate.odilelabs.com/mcp` - full compatibility catalog
- `https://gate.odilelabs.com/mcp/setup` - create and configure (12-14 tools, depending on the config-file feature)
- `https://gate.odilelabs.com/mcp/oversight` - runs, audit, and metrics (15 tools)

Setup also reads held actions and updates project alert settings. Both profiles list apps and dedicated approvers. Approval or rejection requires a person with an approver key in the dashboard. No MCP tool can approve. Both profiles support legacy initialize/tools/list and MCP 2026-07-28 server/discover with required metadata and headers. Each profile has a server card at its URL followed by `/server-card`.

The agent that writes your app can put Gate in front of your API in the same session: it creates the project, registers each app with only the calls that app makes, and reads the audit log. Nothing to install.

[Start from an API template](https://gate.odilelabs.com/templates): allowed reads, writes held for approval, and refused destructive calls. Included on Free and Pro.

```
claude mcp add --transport http odile-gate https://gate.odilelabs.com/mcp
```

Discover the endpoint through the [AI catalog](https://gate.odilelabs.com/.well-known/ai-catalog.json) and experimental [MCP server card](https://gate.odilelabs.com/mcp/server-card). POST initialize and tools/list to `/mcp`. A plain GET returns 405 because no SSE stream is provided. No account login is needed. Administering an existing project requires its admin key. Any MCP client works with the URL `https://gate.odilelabs.com/mcp`.

Example tools (use MCP tools/list for the complete current list): `gate_create_project`, `gate_create_app`, `gate_update_app` (apply learned routes and rate limit), `gate_list_apps`, `gate_check_setup`, `gate_audit`, `gate_explain_refusal`, `gate_delegate_run`, `gate_learn_suggestions`, `gate_audit_proof`, `gate_audit_verify`, `gate_run_tree`, `gate_run_timeline`. `gate_add_app` (the older name of `gate_create_app`) still works but is unlisted. Keys are shown once; the agent keeps them in your `.env`.

**Note for Python clients:** send any `User-Agent` header. Cloudflare refuses Python urllib's default one with error 1010 before the request reaches Gate.

---

## Try it in one minute

This uses the built-in Demo Desk API, registers a reporting app that may only read tickets, then shows an allowed read, a refused delete, a stopped loop, and the audit log. It creates one free project.

```
curl -fsSL https://gate.odilelabs.com/quickstart.sh | sh
```

Expected output:

```
Allowed read:     GET /customers/A/tickets/1 -> 200
Forbidden delete: DELETE /customers/A/tickets/1 -> 403 route_not_allowed
Repeated read:    GET /customers/A/tickets/2 -> 429 loop_detected
```

Read it first if you like: [/quickstart.sh](https://gate.odilelabs.com/quickstart.sh).

---

## Why was my call refused?

Every refusal names its reason in the `x-gate-refused` header and in the audit log.

| Reason | Status | What to fix |
|---|---|---|
| `bad_key` | 401 | Send `Authorization: Bearer <app key>`. The key may be revoked or rotated. |
| `route_not_allowed` | 403 | No rule matches the method and path. Add one, e.g. `GET /orders/:id`. The response lists the method and path Gate saw. |
| `rate_limited` | 429 | The app's per-minute limit. Wait for `Retry-After` or raise `per_minute`. |
| `monthly_quota` | 429 | The plan's calls for the month are used. Upgrade or wait for the 1st (UTC). |
| `loop_detected` | 429 | The same call repeated. Fix the retry loop, or loosen it per app with `PUT .../apps/<app>/loop`. |
| `bad_user_token` / `outside_user_scope` | 401 / 403 | Per-user rules: send a valid `x-odile-user-token`, and name that user in the path or query. |
| `blocked_by_rule` / `ip_not_allowed` / `app_suspended` | 403 | A project block rule, the IP allowlist, or an admin suspended the app. |
| `unsafe_path` / `body_too_large` | 400 / 413 | An encoded slash or dot segment in the path, or a body over 10 MB. |
| `bad_run` / `run_expired` / `run_revoked` | 401 / 403 | Gate Actions: send a current run token in `x-odile-run`, with the key of the app it was granted to. |
| `run_required` / `action_not_in_run` | 403 | The app needs a run for this call, or the run does not allow this method, path, or customer. |
| `run_limit_reached` | 429 | The run used its calls, in all or for this action. Grant a new run. |
| `idempotency_key_required` | 400 | A write inside a run needs an `Idempotency-Key`. Reuse it when you retry that write. |
| `already_executed` / `outcome_unknown` | 409 | That write already ran (its status is in the answer), or its outcome is unknown after a timeout. Check your API, or ask `POST /_gate/recover` with the same key when the run action has a check. |
| `no_check` / `no_such_operation` / `still_running` | 409 / 404 / 409 | Recover cannot settle it: the action has no check, the key is unknown in this run, or the write is still waiting on the upstream. |
| `approval_pending` / `approval_rejected` / `approval_mismatch` | 409 / 403 / 409 | Wait for the approver, read their note, or resend the call exactly as approved. |
| `required_field_missing` | 400 | A template marks body fields a held call must carry (a GitHub merge needs `sha`). Add them and send the call again. |
| `upstream_timeout` / `upstream_error` | 502 | Your API did not answer in 30 seconds or could not be reached. |

---

## Loop breaker

When an AI agent gets stuck and sends the same call over and over, Gate stops it before it reaches your API or uses your quota. On Free and Pro. You can make it stricter or looser for each app.

A stopped call gets `429` with `x-odile-gate-loop-detected: true`. Any different call still passes. With alerts on, your webhook gets a `gate.loop_detected` message at once (Slack, Discord, or Teams), and the dashboard lists loops stopped in the last 30 days. Gate also tells you when a project reaches 80% and 100% of its monthly calls.

---

## Anomaly guard

Gate scores each app's calls per minute, refused-call ratio, upstream 429 ratio, and identical-repeat ratio against its recent traffic. Scoring starts after 30 minutes of history. The dashboard and `gate_metrics` show the last score, its driver, and anomaly counts in the last 24 hours.

Choose `off`, `alert` (default), or `strict` per app. An anomaly adds an audit event. A configured alert webhook also receives a `gate.anomaly` message, signed when webhook signing is configured, sharing the refused-call spike alert's one-per-app-per-hour limit. Loop and approval notifications keep their existing limits. Without a webhook, alert mode records the audit event. Strict mode also tightens that app's loop breaker for 30 minutes, then restores its configured setting. The score itself never refuses a call.

In the dashboard or `GET/PUT /api/projects/<id>/apps/<app>/anomaly`, set `mode`, `z_threshold` (2-10, default 4), `min_minutes` (1-30 consecutive minutes, default 3), and `half_life` (5-1440 minutes, default 60). Unknown keys are errors. `strict_until` is read-only. Declarative configuration uses plugin `anomaly-guard` with those same four settings.

---

## For security teams

- **Webhook signing:** when enabled, alerts carry `X-Odile-Signature: t=<time>,v1=<HMAC-SHA256>` so your receiver can prove it came from Gate.
- **IP allowlist:** only calls from your office or cloud addresses (IPv4 or IPv6 blocks) reach your API.
- **Observe-only pilot:** report IP, user-scope, block-rule, model, tool, value-cap, and loop violations instead of blocking them. Key, allowed-route, run, body-size, and quota checks still apply.
- **Stream the audit log** to Splunk (HTTP Event Collector), Datadog, or any HTTPS endpoint as structured JSON, signed only when webhook signing is enabled.
- **Block rules:** refuse calls whose path, query, or whole body match your own patterns (up to 20), or turn on the basic set for SQL injection and prompt-override text.
- **Keep new audit rows only on your side:** with streaming on, Gate can stop storing new audit rows itself.
- **Change log:** Gate attempts to record each admin change (keys, apps, limits, settings, team members, and approvers) with time, IP address, User-Agent, result, and (since 19 Nov 2026) who made it (a team member, an approver, or the owner's admin key). A failed log write never changes the response. Rows become eligible for deletion after 365 days. The log is hash-chained, with a signed export you can check.
- **Fails closed:** if Gate fails before forwarding a call, the call does not reach your API (no bypass, no queue). If it fails after forwarding, a write may have succeeded even though your app gets an error or no answer. [Status and measured latency](https://gate.odilelabs.com/status).
- **Company sign-in:** team members can sign in through Google Workspace, Microsoft Entra ID, Okta, or another compatible OpenID Connect provider instead of a member key. Sessions last 8 hours and end at once when you revoke a member. You can require company sign-in for every member. No SCIM: a person disabled at the provider keeps an open session until it ends (8 hours at most).
- **Audit completeness:** every call refused for a wrong or missing app key is counted per hour, and the count is kept as long as the audit. With local audit storage on, at most the first 20 such refusals per project per UTC hour get a full row. **Legal hold** (Pro; not on an Attack Lab project): the owner can stop the daily retention cleanup from deleting audit rows, approval decisions, change-log rows, and those counts until the hold is released.

Annual contracts and a security questionnaire: [hello@odilelabs.com](mailto:hello@odilelabs.com).

---

## Using OpenShell?

Bind a signed sandbox identity to a scoped Gate run with the [native OpenShell v0.1.5 HTTP-request middleware](https://gate.odilelabs.com/guides/openshell-gate). Run the TLS adapter beside OpenShell. Gate remains the sole executor for approvals and retry protection. Available with Free or Pro.

**One-command OpenShell setup:**

```
curl -fsSL https://gate.odilelabs.com/openshell-setup.py | python3 -
```

Agents use `gate_openshell_setup` to discover the installer hash and recipe schema. The default is a Free read-only demo. Custom scope needs owner authorization. Requires Python and local Docker.

---

## Plans

**Free**
- 1 project per admin key
- 3 apps
- 10,000 calls a month
- Audit log kept 30 days

**Pro - $29 a month**
- 25 apps
- 1,000,000 calls a month
- Stripe-billed with metered billing: $10 per extra million, up to a limit you set. DigitalOcean projects stop at their add-on cap; prepaid call packs are separate.
- Audit log kept 365 days
- [Client handoff: keys with expiry or call limits, and read-only audit share links](https://gate.odilelabs.com/guides/hand-off-an-ai-agent-to-a-client)

**Setup - $99 once**
We put one of your existing APIs behind Gate: the project, each app's key and allowed calls, and limits. We show allowed and refused calls working and send you a short guide. Works with Free or Pro.
[Buy the setup](https://buy.stripe.com/fZu4gAfckbwn1gZgQ74ZG0C)

---

## What we store, and what we never store

**We store:**
- Your route rules.
- Key hashes (SHA-256). DigitalOcean admin keys are also retained encrypted with AES-GCM for repeat provisioning and SSO.
- Call metadata: time, app, method, the route rule the call matched (for example `POST /orders/:id`), a SHA-256 of the path, status, duration, body size, body SHA-256, and country. When no rule matches, only the path's first segment and its SHA-256.
- Your upstream secret, encrypted with AES-GCM.
- Calls held for approval keep their path, query, and body encrypted with AES-GCM. Gate clears that content after a known execution outcome, rejection, or expiry cleanup. Unknown outcomes retain it pending resolution or expiry cleanup. Approval windows last at most 24 hours.
- Administrative change logs keep IP addresses and User-Agent values, scheduled for deletion after 365 days.

**We do not store:**
- Ordinary request and response bodies.
- Full paths, query values, or headers in audit rows (metadata only).

Calls without a valid key are counted every hour. Audit rows are limited to the first 20 per hour. Local audit storage can be turned off.

---

## Create a project

No API of your own yet? Use the built-in Demo Desk as the upstream: `https://sandbox.gate.odilelabs.com` (a small ticket API that runs inside Gate; no key needed, nothing leaves Gate). Try `GET /customers/A/tickets/1`. It also has messages and bookings for customers A and B.

With curl:

```
curl -X POST https://gate.odilelabs.com/api/projects \
  -H "content-type: application/json" \
  -d '{"name":"Shop API","upstream":"https://api.example.com/v1","header_name":"Authorization","header_value":"Bearer ..."}'
```

---

Odile Gate, from [Odile Labs](https://odilelabs.com). Support: [hello@odilelabs.com](mailto:hello@odilelabs.com)

Odile Gate and Odile Direct are on the Official MCP Registry.

[API docs](https://gate.odilelabs.com/docs) · [OpenAPI](https://gate.odilelabs.com/openapi.json) · [About](https://odilelabs.com/about) · [Contact](https://odilelabs.com/contact) · [Privacy](https://odilelabs.com/privacy) · [Terms](https://odilelabs.com/terms) · [Security](https://odilelabs.com/security) · [Security answers](https://gate.odilelabs.com/security-answers)
