
AI
AI Agent Pricing: Usage-Based Models for AI Agents and API Calls
Anh-Tho Chuong•Aug 26•6 min read
Lago helps engineering and business teams collaborate on complex billing through the API and a visual interface.


Integrate Lago across payments providers, accounting systems, CRMs, ERPs and many other tools.
Build billing integrations with a typed REST API, official SDKs, signed webhooks, and a Model Context Protocol server for AI agents.
Explore Lago REST endpoints, request examples, response objects, errors, pagination, and regional API base URLs.
Use Lago's OpenAPI 3.1 schema to generate clients, inspect typed operations, or expose billing actions to an AI agent.
Learn how bearer authentication works and how to create, scope, rotate, and revoke Lago API keys.
Receive billing events reliably with delivery retries, idempotency keys, and JWT or HMAC signature verification.
Connect Claude, ChatGPT, and other MCP clients to Lago billing data and operations through a documented server.
Integrate Lago with maintained JavaScript, Python, Ruby, Go, PHP, and Kotlin clients generated from the API contract.
Open source on GitHub, 10.4K stars, AGPLv3-licensed
Lago is an open-source billing platform for usage-based, subscription, prepaid, and hybrid pricing. It connects product usage and commercial terms to customer invoices.
Applications connect to Lago through a REST API, official SDKs (JavaScript, Python, Ruby, Go), and signed webhooks. The public OpenAPI spec and developer docs walk through each integration path.
Yes. Lago is AGPLv3-licensed and open source, so you can self-host it on your own infrastructure, or run it as a managed cloud service instead.
The open-source version is free to self-host under an AGPLv3 license. Lago Premium, available on Cloud or self-hosted, isn't publicly priced, since deployment size and needs vary; the team shares pricing directly when you book a demo.
Lago is open source, so teams can inspect the code, self-host it, and extend it rather than depend on a closed platform. It's built to handle usage-based, subscription, prepaid, and hybrid pricing on the same billing engine, without locking that flexibility behind a single vendor's roadmap.
No. Lago calculates charges, generates invoices, and applies tax, then connects to payment processors like Stripe, Adyen, and GoCardless to collect the payment. It sits alongside your existing processor rather than replacing it.
Your data is protected with enterprise-grade rigor.
Deploy Lago on-prem, in a VPC or elsewhere.
Role-based access control to set user roles and permissions.
Deploy Lago seamlessly on your own infrastructure to keep full control.
