# What is Aperture?

Last validated Sep 18, 2026

Aperture by Tailscale is a centralized AI gateway that secures, monitors, and routes LLM requests across your organization. Every LLM request sent to Aperture passes through the gateway before reaching an upstream provider. This gives you one place to hold provider API keys, attribute usage to a user, and enforce policies.

\[Missing snippet: aperture\_openai\_compatible\_provider.mdx]

Organizations adopting AI across development, automation, and internal tools face new challenges around security, visibility, and control. API keys are often scattered across developer devices, continuous integration/continuous delivery (CI/CD) systems, and automated agents, increasing the risk of leaks and making credentials difficult to rotate or audit. Teams lack clear insight into who is using which models, how frequently, and at what cost. This makes it difficult for security, platform, and compliance teams to support AI use across every developer, agent, and pipeline without slowing delivery down.

After reading this topic, you'll understand the gateway model Aperture uses, how it identifies users without distributing API keys, and what visibility it provides into LLM usage across your organization.

## The Aperture gateway model

Aperture is a reverse proxy that sits between your LLM clients (coding assistants, chat interfaces, automated agents) and upstream LLM providers (OpenAI, Anthropic, Google, and others). Every request passes through Aperture before reaching a provider, and every response passes back through it. This single chokepoint is the foundation for all of Aperture's capabilities: identity, routing, telemetry, cost tracking, and policy enforcement.

Think of Aperture as a corporate mail room. Instead of giving every employee their own shipping account with each carrier, the mail room holds the accounts centrally. Employees drop off packages, and the mail room handles the rest:

* The recipient on the package is the model name.
* The carrier the mail room selects is the provider.
* The organization's shipping account is the API key.
* The mail room's shipment log is telemetry.

Employees never handle carrier credentials, and the organization has a complete record of what was sent and where. This analogy breaks down in one important way. Unlike a mail room, Aperture also inspects and can modify contents in transit, which is how [guardrails][docs-aperture-guardrails] work.

Two properties make this gateway model work without disrupting existing workflows:

* **Identity from the network.** Aperture uses [Tailscale's identity layer][docs-tailscale-identity] to automatically identify every user and device. Because Tailscale already authenticates devices when they join the [tailnet][docs-tailnet], Aperture inherits that identity without requiring separate login credentials or API keys from users. The proxy injects provider API keys from its [server configuration][docs-aperture-configuration] on behalf of the user.
* **Routing by model name.** Clients specify which model they want (for example, `claude-sonnet-4-20250514` or `gpt-4o`), and Aperture routes the request to the correct provider. Clients don't need to know provider URLs or manage multiple endpoints. This means existing tools work with Aperture by changing only the base URL, not the tool's configuration or code.

## What Aperture provides

The gateway position gives Aperture visibility and control that are difficult to achieve when clients connect directly to providers.

* **Centralized API key management.** API keys stay in the [server configuration][docs-aperture-configuration], never on developer devices. Aperture injects the appropriate key for each request. When a key needs rotation, you update it in one place.

* **Built-in chat UI.** Aperture includes a [chat UI][docs-aperture-set-up-chat-ui] that lets users talk to your configured models directly from their browser, without setting up a separate client.

* **Usage visibility and cost tracking.** Aperture captures every request with user attribution, model identification, and token counts (input, output, cached, and reasoning). The [Aperture dashboard][docs-aperture-dashboard] aggregates this data by user, model, and time period. This data feeds into [exports][docs-aperture-export-s3] for cost analysis, and you can [set budgets and per-user spending limits][docs-aperture-manage-spending] to prevent cost overruns.

* **Adoption analytics.** The **Usage Overview** page of the [Aperture dashboard][docs-aperture-dashboard] shows organization-wide usage patterns, active users over time, and histograms of usage distribution, answering questions such as which teams use which tools and how frequently.

* **Request and response capture.** Aperture stores full request and response bodies for review. The capture system preserves headers, payloads, and tool use data. Configure a [retention policy][docs-aperture-retention] to control how long Aperture keeps capture data, and [export logs and events][docs-aperture-export-s3] to your SIEM (security information and event management) system for durable storage and review. For strict data-handling requirements, enable [zero data retention][docs-aperture-privacy] so Aperture never writes prompt or response content to disk.

* **Guardrails.** [Guardrails][docs-aperture-guardrails] inspect, modify, or block requests at the gateway level before they leave your network. Use cases include scrubbing personally identifiable information (PII) from prompts, restricting tool declarations, and enforcing content policies.

* **Session debugging.** The **Logs** page of the Aperture dashboard (visible to admins) groups related requests into sessions, letting you trace the flow of a conversation or coding task by reviewing full request and response data.

* **Outbound integrations.** Aperture can proxy connections to external [MCP servers][docs-aperture-mcp-server] and HTTP APIs through [connectors][docs-aperture-connectors]. Connectors centralize authentication for external services, so individual users do not need separate API keys or OAuth tokens configured in their local tools. AI agents discover available connectors through the MCP tool list.

* **Approved device provisioning.** Through the [built-in tailnet connector][docs-aperture-built-in-connectors], an agent can connect a device to your tailnet on your behalf after you approve creation of a single-use, short-lived auth key. Tailscale binds the key to your user identity. By default, the device carries node attributes that identify it as Aperture-created (`custom:createdByAperture`) and AI-created (`custom:createdByAI`).

## Limitations

Consider the following limitations before deployment. Tailscale is actively developing Aperture, so this list updates frequently.

* **Tailscale requirement**

  The Aperture server runs in a tailnet. Clients can connect from inside the tailnet or [from outside it][docs-aperture-connect-outside-tailnet] using an Aperture CLI bridge or [`ts-unplug`][xt-gh-ts-plug]. Both paths provide Tailscale-based identity. Aperture does not support direct public internet access.

* **Provider support**

  Metrics extraction relies on parsing provider response formats. Aperture handles OpenAI, Anthropic, Gemini, and OpenAI-compatible APIs. Refer to the [provider compatibility reference][docs-aperture-provider-compatibility] for details. New providers or format changes might require updates.

* **Quota capacity reductions**

  Aperture persists quota bucket balances. When you reduce a bucket's capacity, Aperture caps the existing balance at the new value. The excess is not recoverable. Aperture removes buckets whose quota definitions you delete from the configuration. For details, refer to [bucket lifecycle][docs-aperture-bucket-lifecycle].

* **Subscription plan authentication**

  By default, Aperture authenticates with LLM providers using API keys from provider developer platforms, such as the [Anthropic Console][xt-anthropic-console], [OpenAI Platform][xt-openai-platform], or [Google AI Studio][xt-google-ai-studio]. Aperture centrally manages those keys for shared use. Consumer and business subscription plans such as [Claude Pro or Claude Max][xt-anthropic-plans], [ChatGPT Plus, Pro, or Team][xt-openai-plans], or [Gemini Advanced][xt-gemini-plans] provide OAuth tokens rather than these API keys, so they don't fit the default centralized model. To use a subscription plan, configure a provider in [passthrough mode][docs-use-passthrough-mode]. Aperture preserves a client-supplied `Authorization` or `x-api-key` header. If the client sends neither header, Aperture uses the configured provider key.

## FAQ

**What happens if a user tries to connect from outside the tailnet?**

Users outside the tailnet can [connect through an Aperture CLI bridge or `ts-unplug`][docs-aperture-connect-outside-tailnet]. Both create a lightweight tailnet node and proxy local traffic to Aperture. Without one of them, the connection fails at the network level because Aperture listens on Tailscale interfaces.

**What happens when I add a new LLM provider to the configuration?**

Clients can immediately use models from that provider by specifying the model name in their requests. No client changes are required because the proxy routes based on model name.

**What happens if a streaming response is interrupted mid-stream?**

The proxy captures whatever data arrived before the interruption. Metrics extraction might fail or report partial data, but the proxy stores the partial capture for debugging.

**Do clients need API keys to use Aperture?**

No. Aperture identifies users through Tailscale and injects provider API keys automatically. Clients do not need provider credentials, although some clients require a placeholder API key.

**Can I use my Claude Max, ChatGPT Plus, or other subscription plan with Aperture?**

Yes, through passthrough mode. Subscription plans provide OAuth tokens rather than developer-platform API keys, so they don't fit Aperture's default model of centrally managed keys. Configure the provider with `auth_mode: "passthrough"`, and Aperture preserves a client-supplied `Authorization` or `x-api-key` header. If the client sends neither header, Aperture uses the configured provider key. Refer to [Subscription plan authentication][ar-limitations] for the trade-offs, and [Set up passthrough mode][docs-use-passthrough-mode] for the steps.

**Can I use Aperture with providers not listed in the documentation?**

Yes. Aperture works with any provider that exposes an OpenAI-compatible `/v1/chat/completions` endpoint, including providers such as Groq, Together AI, Fireworks, Mistral, DeepSeek, and Perplexity. Configure the provider with the appropriate `baseurl` and `apikey`. The default `openai_chat` compatibility flag and `bearer` authorization apply automatically. Refer to [set up an OpenAI-compatible provider][docs-use-openai-compatible-provider] for the configuration steps.

**Can I use Aperture with self-hosted LLMs?**

Yes, you can proxy self-hosted LLMs with Aperture without exposing the endpoints to the public internet.
Refer to [set up a self-hosted provider][docs-use-self-hosted] for servers running locally or in your tailnet.

**Can I use Aperture in CI/CD environments, such as GitHub Actions?**

Yes, as long as you can run Tailscale. Aperture works in common containerized environments such as GitHub Actions without needing to expose either the agent or the gateway to the public internet.

**Can I use Aperture with several tailnets?**

Yes, you can [connect to Aperture from another tailnet][docs-aperture-connect-outside-tailnet] using an Aperture CLI bridge or [`ts-unplug`][xt-gh-ts-plug]. You can also use either method to connect from environments that aren't in a tailnet at all.

**Can I use Aperture to connect AI agents to external APIs and MCP servers?**

Yes. Aperture supports [connectors][docs-aperture-connectors] that proxy connections to remote MCP servers and HTTP APIs. Aperture injects authentication automatically, so agents access external services without managing individual credentials. Refer to [MCP server proxying][docs-aperture-mcp-server] for MCP-specific setup and the [connectors][docs-aperture-connectors] topic for HTTP API proxying.

## Related resources

* [How Aperture works][docs-aperture-how-aperture-works]: a deeper look at request routing, telemetry capture, and session tracking.
* [Get started with Aperture][docs-aperture-get-started]: sign up, configure providers, and connect your first LLM client.
* [Provider compatibility][docs-aperture-provider-compatibility]: supported providers, API formats, and compatibility details.
* [Connect from outside the tailnet][docs-aperture-connect-outside-tailnet]: use an Aperture CLI bridge or `ts-unplug` to connect clients that aren't in the tailnet.

[ar-limitations]: #limitations

[docs-aperture-bucket-lifecycle]: /docs/aperture/configuration#bucket-lifecycle

[docs-aperture-built-in-connectors]: /docs/aperture/connectors/built-in-connectors

[docs-aperture-configuration]: /docs/aperture/configuration

[docs-aperture-connect-outside-tailnet]: /docs/aperture/connect-outside-tailnet

[docs-aperture-connectors]: /docs/aperture/connectors

[docs-aperture-dashboard]: /docs/aperture/reference/dashboard

[docs-aperture-export-s3]: /docs/aperture/how-to/export-usage-data-to-s3

[docs-aperture-get-started]: /docs/aperture/get-started

[docs-aperture-guardrails]: /docs/aperture/guardrails

[docs-aperture-how-aperture-works]: /docs/aperture/how-aperture-works

[docs-aperture-manage-spending]: /docs/aperture/manage-spending

[docs-aperture-mcp-server]: /docs/aperture/mcp-server

[docs-aperture-privacy]: /docs/aperture/privacy-and-data-retention

[docs-aperture-provider-compatibility]: /docs/aperture/provider-compatibility

[docs-aperture-retention]: /docs/aperture/configuration#database

[docs-aperture-set-up-chat-ui]: /docs/aperture/how-to/set-up-chat-ui

[docs-tailnet]: /docs/concepts/tailnet

[docs-tailscale-identity]: /docs/concepts/tailscale-identity

[docs-use-passthrough-mode]: /docs/aperture/how-to/use-passthrough-mode

[docs-use-openai-compatible-provider]: /docs/aperture/how-to/use-openai-compatible-provider

[docs-use-self-hosted]: /docs/aperture/how-to/use-self-hosted

[xt-anthropic-console]: https://console.anthropic.com

[xt-anthropic-plans]: https://claude.com/pricing

[xt-gemini-plans]: https://gemini.google.com

[xt-gh-ts-plug]: https://github.com/tailscale/ts-plug

[xt-google-ai-studio]: https://aistudio.google.com

[xt-openai-plans]: https://openai.com/chatgpt/pricing

[xt-openai-platform]: https://platform.openai.com
