Simple API script to allow paid calls with X-Cashu
header
X-Cashu – HTTP 402: Payment Required
- Install Python and Poetry environments
- Deploy a Cashu Mint, see examples here or run from LNbits
- Edit
.env
file as needed
MINT_URL="https://<your cashu mint url>"
MODEL_URL="https://<your model API URL (local, runpod, etc...)>"
Install all dependencies
git clone <this_repo>
poetry install
poetry run uvicorn main:app