Lago CLI
Inspect customers, configure billing, and check results from your terminal. JSON output fits scripts and coding agents.
Use the CLILago for AI agents
Give your agent Lago’s documentation. Use the API, CLI, or MCP to turn your pricing into a billing integration, then verify the amount your customers are charged.
Start with the docs. Connect the tools your agent needs.
“We sell a $99 subscription with $10 of included AI usage. What happens when those credits run out?”
One customer action
Multiple model calls produce input and output token records.
Usage becomes a charge
The example prices the usage at $0.37. A replayed event adds no extra charge.
Apply the customer's terms
The last $0.20 of included credit covers part of the charge.
Fictional prices. This action occurs after $9.80 of the $10 credit has been used. Amounts exclude tax and payment processing.
Start with your product
Paste a prompt into your coding agent to explore Lago, model your pricing, or work in your application. Each prompt points to the public documentation so your agent can start today.
Get started with your agentRead https://getlago.com/llms.txt. Explain how Lago could fit my product and walk me through an illustrative usage-based billing example. Do not assume this workspace is my application.
Paste into your coding agent.
Use the API in your application, the CLI in your terminal, or MCP in a connected assistant. Choose the path that fits your workflow.
Inspect customers, configure billing, and check results from your terminal. JSON output fits scripts and coding agents.
Use the CLIGive your assistant connected tools for live billing data and supported operations. Configure the Lago environment and API key before use.
Connect the MCP serverBuild billing into your application with the REST API or an official SDK. Give your agent the OpenAPI specification for exact request and response fields.
Explore the APIYour application connects through a Lago SDK or REST API. Give your agent the documentation index or documentation MCP for context. Confirm the target environment and authorize live billing changes before execution.
No. Give your agent the public documentation, then use the REST API, CLI, or product MCP for the work you need. The optional Lago plugin packages billing guidance and examples for Claude Code and Codex. Its public release is in preparation.
You can read the public documentation and design an integration without a Lago account or API key. Checking real billing behavior requires a configured Lago environment. Use an isolated self-hosted instance for synthetic demonstrations.
Use the CLI for terminal workflows, scripts, and coding agents that can run shell commands. Use the product MCP server for assistants that call connected tools. Both access Lago through configured credentials. You do not need both.
Your application uses a Lago SDK or the REST API. The CLI and MCP give agents and operators convenient ways to work with Lago; application code does not need to run them.
Setup, first prompts, and the path to a verified integration.