Getlago

Lago for AI agents

Build billing on Lago with your coding agent

Start with the CLI to configure billing and verify usage with your coding agent. Lago Cloud runs the billing service; your application connects through an SDK or API. OpenAPI supplies the exact schemas.

Explore the local demo without Cloud credentials

Billing for developers and agents

Start with the CLI for terminal work. Use OpenAPI for exact schemas, an SDK or API in your application, and MCP for connected assistants.

Connect the tools your workflow needs

The CLI is the starting point for terminal work. OpenAPI describes the API; SDKs connect your application. MCP supports assistants with connected tools. The Lago plugin is optional.

Lago CLI

Start here when your agent has terminal access. Configure billing, inspect JSON results, and verify usage on Lago Cloud or your self-hosted instance.

Start with the CLI

Product MCP

Give your assistant connected tools for live billing data and supported operations. Configure the Lago environment and API key before use.

Connect the MCP server

OpenAPI and SDKs

Use the complete OpenAPI contract for exact request and response fields. Integrate your application with an SDK or call the API directly.

Explore OpenAPI

Teams build their billing with AI.On Lago, from prompt to production.

See how ambitious teams build and scale their billing with Lago.

Frontier AI
Lago has been able to follow the pace of our releases and has allowed us to focus on what we do best.

— Timothée Lacroix, CTO, Mistral AI

Timothée Lacroix

Before you start

Does Lago update prepaid credit balances in real time?

Yes. Lago’s ongoing wallet balance typically refreshes in under a second after a new event is included in usage. It reflects remaining prepaid credits after current usage, including taxes.

Use this live balance in customer dashboards and configure balance alerts and automatic top-ups.

See the event-to-wallet flow and wallet documentation.

Can Lago handle negotiated enterprise contracts?

Yes. Customize subscription fees, usage rates, minimum commitments and billing thresholds for each customer’s subscription while keeping a shared plan structure.

Lago applies those negotiated terms when calculating charges and generating invoices.

Explore customer-specific pricing.

Do I need to self-host Lago or manage billing infrastructure?

No. Lago Cloud is a fully managed billing platform. Lago handles hosting, scaling, upgrades and monitoring. Your team connects customer and usage data, configures pricing and connects your payment and finance tools.

Self-hosting is also available if you prefer to operate Lago in your own environment.

Explore managed Lago Cloud.

Can I use a coding agent to integrate Lago?

Yes. Start with the CLI when your agent has terminal access, and use OpenAPI for exact API fields. The coding-agent guide covers application integration through an SDK or API, then checks usage and charges in Lago. The Lago plugin is optional.

Coding-agent guide

Can I evaluate Lago before creating an account?

Yes. Explore the public documentation, API specification and open-source code to model your billing flow. When you are ready to test real usage and invoices, use a dedicated Cloud organization or isolated self-hosted environment.

Explore integration testing

Should my team use Lago’s CLI or MCP server?

Use the CLI for terminal commands, scripts and coding agents that run shell tools. Use the MCP server to give compatible assistants access to Lago tools and billing data. Both connect to the Lago environment you configure.

Start with the CLI

How does my application connect to Lago?

Use a Lago SDK or the REST API to send customer, subscription and usage data. Receive webhooks for billing events such as invoice creation and payment updates, then use that information in your product and finance workflows.

Explore APIs and SDKs