lnget

Automates HTTP requests to paid APIs by paying L402 invoices and retrying.

14|4|Updated Feb 5, 2026
One-click install
npx skills add https://github.com/lightninglabs/lnget --skill lnget
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: lnget
Source: https://github.com/lightninglabs/lnget/tree/main
Command: npx skills add https://github.com/lightninglabs/lnget --skill lnget

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

lnget solves the challenge of programmatic access to paid APIs by automatically paying Lightning invoices (L402) when servers respond with HTTP 402, then retrying the request with the valid token.

Core Features & Use Cases

  • Automatic L402 payments: pays invoices and retries requests, caching tokens per domain for reuse.
  • Token management: per-domain token storage and secure reuse across invocations.
  • Backend flexibility: supports external lnd, LNC, and embedded neutrino backends for payments.

Quick Start

Download a paid API by running lnget and observe automatic L402 payment, retry, and token caching.

Frequently Asked Questions about lnget

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I automate HTTP requests to paid APIs that return HTTP 402?

To automate HTTP requests to paid APIs, you use a client that intercepts HTTP 402 responses, automatically pays the Lightning invoice, and retries the request with the valid token. This streamlines access to L402-enabled endpoints.

What is L402 and how does token management work for Lightning-enabled APIs?

L402 is a protocol standard where servers return HTTP 402 requiring a Lightning payment. Token management caches these paid tokens per-domain, securely storing and reusing them for subsequent requests to avoid duplicate payments.

Which Lightning backends can I use for automating L402 invoice payments?

You can use external lnd, Lightning Node Connect (LNC), or an embedded neutrino backend to process L402 invoice payments. This backend flexibility accommodates various node configurations and payment routing setups.

How do I integrate automatic Lightning payments into a script or agent workflow?

You integrate automatic Lightning payments by utilizing a CLI-compatible interface and JSON output within your scripts. This allows agents to trigger HTTP requests, handle L402 payment flows, and parse structured data easily.

Can I configure a maximum cost for automated HTTP requests to paid APIs?

You can configure a maximum cost limit to control spending when accessing paid APIs. This prevents unexpected charges by capping the amount the client will automatically pay for L402 invoices during retries.

Why are my HTTP requests failing after paying a Lightning invoice on a new domain?

Requests may fail if the token was not cached properly or the backend rejected the payment. The client retries with the paid token and caches it per-domain, so verifying backend connectivity and token storage usually resolves this.