# Aperture

Aperture is a reverse proxy that acts as a payment and authentication gateway for Lightning Network powered APIs. It can handle gRPC requests over HTTP/2 as well as REST over HTTP/1 and 2.

Aperture implements both the [L402](/the-lightning-network/l402/l402.md) as well as the [MPP](https://mpp.dev/) specifications.

Aperture receives incoming connections, verifies the validity of the [L402](/the-lightning-network/l402.md) and either forwards the request to the appropriate end point, or obtains a [Macaroon](/the-lightning-network/l402/macaroons.md) and sends it together with a Lightning invoice and the HTTP status code 402 Payment Required.

Aperture is currently used in production in Lightning [Loop](/lightning-network-tools/loop.md) and [Pool](/lightning-network-tools/pool.md).

Aperture includes a Model Context Protocol (MCP) server that makes it convenient for agents to control Aperture natively.

{% content-ref url="/pages/QRE4vENcmsPMaDM9WAfi" %}
[Get Aperture](/lightning-network-tools/aperture/get-aperture.md)
{% endcontent-ref %}

{% content-ref url="/pages/YBsPMJU3inkvDIRZ9oCD" %}
[LNC Backend](/lightning-network-tools/aperture/lnc-backend.md)
{% endcontent-ref %}

{% content-ref url="/pages/SHqxiVQ44DTHj95ceiaG" %}
[LNC Mailbox](/lightning-network-tools/aperture/mailbox.md)
{% endcontent-ref %}

{% content-ref url="/pages/UtDG2pNehZlppco3xKhf" %}
[Pricing](/lightning-network-tools/aperture/pricing.md)
{% endcontent-ref %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.lightning.engineering/lightning-network-tools/aperture.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
