> ## Documentation Index
> Fetch the complete documentation index at: https://shinydapps-bd9fa40b.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# ??

> ???????? API ?????????

<Card title="? ???? � ????" icon="play" href="https://l402kit.com/#live-demo">
  ???????:? `npm install` ?????? API ???45 ??
</Card>

## ??? l402-kit?

**l402-kit** ????????,???????? 3 ??????? API ?????????????

?????????????????????????(sats)?

```bash theme={null}
npm install l402-kit   # TypeScript / Express
pip install l402kit    # Python / FastAPI / Flask
go get github.com/shinydapps/l402-kit/go@v1.10.0  # Go / net/http
cargo add l402kit       # Rust / axum
```

## ?????????

* **Stripe**:?????? \$0.30 � ??????
* **???**:??????????
* **AI ??**:????? � ?????? API

**l402-kit** ??????:???????????,?? 1 ?????,?????

## ????

* **API ???** � ??????????
* **AI ?????** � ?????? API
* **???? Stripe ????** � ??????
* **?????** � ?????? 1 ?,Stripe ????

## ???? � TypeScript

```typescript theme={null}
import express from "express";
import { l402 } from "l402-kit";

const app = express();

app.get("/premium", l402({
  priceSats: 100,                          // ????? $0.06
  lightning: new AlbyProvider(process.env.ALBY_TOKEN!, process.env.ALBY_HUB_URL!),   // ???? � 0% ??
}), (_req, res) => {
  res.json({ data: "??????" });
});

app.listen(3000);
```

## ???? � Python

```python theme={null}
from fastapi import FastAPI, Request
from l402kit import l402_required

app = FastAPI()

@app.get("/premium")
@l402_required(
    price_sats=100,
    lightning=ManagedProvider.from_address("you@blink.sv"),
)
async def premium(request: Request):
    return {"data": "??????"}
```

## ????

```bash theme={null}
curl http://localhost:3000/premium
# ? {"error":"Payment Required","priceSats":100,"invoice":"lnbc..."}
```

<Card title="??????" icon="bolt" href="https://l402kit.com/docs/quickstart">
  5 ???????? API
</Card>
