# 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](https://docs.lightning.engineering/the-lightning-network/l402/l402) as well as the [MPP](https://mpp.dev/) specifications.

Aperture receives incoming connections, verifies the validity of the [L402](https://docs.lightning.engineering/the-lightning-network/l402) and either forwards the request to the appropriate end point, or obtains a [Macaroon](https://docs.lightning.engineering/the-lightning-network/l402/macaroons) 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](https://docs.lightning.engineering/lightning-network-tools/loop) and [Pool](https://docs.lightning.engineering/lightning-network-tools/pool).

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

{% content-ref url="aperture/get-aperture" %}
[get-aperture](https://docs.lightning.engineering/lightning-network-tools/aperture/get-aperture)
{% endcontent-ref %}

{% content-ref url="aperture/lnc-backend" %}
[lnc-backend](https://docs.lightning.engineering/lightning-network-tools/aperture/lnc-backend)
{% endcontent-ref %}

{% content-ref url="aperture/mailbox" %}
[mailbox](https://docs.lightning.engineering/lightning-network-tools/aperture/mailbox)
{% endcontent-ref %}

{% content-ref url="aperture/pricing" %}
[pricing](https://docs.lightning.engineering/lightning-network-tools/aperture/pricing)
{% endcontent-ref %}
