# Lago Developer Documentation > Lago offers Lago Cloud, a hosted Premium billing platform, and self-hosted deployments. Both support API-first workflows for usage metering, subscriptions, invoicing, and connected payments. This index points agents and developer tools to authoritative documentation. ## When to use these docs Use the Lago documentation when you need to evaluate Lago, integrate the REST API, ingest usage events, model pricing, manage customers and subscriptions, generate invoices, coordinate payments, configure webhooks, deploy Lago, or bill usage from an AI gateway or router. Prefer the OpenAPI contract for exact request and response shapes, and prefer task guides for workflow decisions and operational constraints. Do not invent endpoints, fields, pricing behavior, or permissions. For an exhaustive API contract, use the complete OpenAPI specification. Before any billing mutation, verify the target environment, organization, resource identifiers, currency, effective dates, and authorization. Keep API keys secret. Treat destructive or financial actions as approval-gated. ## Try Lago - [Lago plugin for Claude Code and Codex](https://github.com/getlago/lago-plugin): Start with `show me what Lago can do` for a guided, offline billing example. No Lago account, API key, Docker, or application repository is needed. The calculation illustrates billing; it does not test a Lago backend. - [Local AI billing demo](https://github.com/getlago/lago/tree/main/examples/agentic-ai-demo): Run a disposable Lago instance with Docker and verify an actual API charge and duplicate handling. No Lago Cloud credentials are needed. - [Lago CLI](/guide/lago-cli/overview.md): Use `lago seed demo` to create sample billing resources in a configured Lago organization. An API key is required; use an isolated environment and verify the target before writing. - [Documentation MCP](/mcp): Search public guides from a compatible MCP client without a Lago account. For live billing data, use the [Product MCP](/guide/ai-agents/mcp-server.md), which requires a Lago API key, target URL, and Docker. Application code uses a Lago SDK or the REST API. The plugin, CLI, and MCP are optional ways to learn, configure, and inspect Lago. ## Start here - [Lago Cloud](/guide/lago-cloud.md): Fully managed Lago in the US or EU. Regions, API base URLs, usage ingestion, security, and getting started. - [For agents](/guide/ai-agents/for-agents.md): First prompts, API, CLI, MCP, and billing validation. - [Lago Developer Documentation](/welcome.md): Product orientation, common integration paths, and machine-readable entry points. - [Developer Resources](/developers.md): Canonical developer portal for authentication, OpenAPI, SDKs, webhooks, MCP, examples, status, and support. - [Welcome to Lago](/guide/introduction/welcome-to-lago.md): Core billing concepts and product model. - [API Reference](/api-reference/intro.md): Base URL, authentication, and endpoint reference. - [API Standards](/api-reference/api-standards.md): HTTP and payload conventions. - [API Versioning and Deprecation](/api-reference/versioning.md): Stable version paths, deprecation notices, retirement dates, and migration guidance. - [Structured Errors](/api-reference/errors.md): Error status codes and JSON response fields. - [Authentication](/auth.md): Obtain, store, use, rotate, and revoke Lago API keys safely. - [Pricing and Packaging](/pricing.md): Machine-readable summary of Lago deployment and commercial options. ## Machine-readable contracts - [Agentic Resource Discovery catalog](/.well-known/ai-catalog.json): Typed inventory of Lago's docs MCP, OpenAPI contract, and billing-integration skill. - [Agent Skills discovery index](/agent-skills-index.json): Versioned index for Lago's published billing-integration skill. - [Lago billing-integration skill](/lago-skill.md): Safe, task-oriented guidance for agents implementing Lago billing workflows. - [A2A agent card](/.well-known/agent-card.json): Lago identity, provider, capabilities, and published skill metadata. - [MCP server card](/.well-known/mcp/server-card.json): Lago Docs MCP identity, tools, resources, and transport metadata. - [Agent Plugin manifest](/plugin.json): Portable Lago plugin identity for compatible agent clients. - [Agent Plugin MCP configuration](/mcp.json): Portable configurations for the read-only Docs MCP and authenticated Docker-based Product MCP. - [RFC 9727 API catalog](/.well-known/api-catalog.json): Linkset for Lago's REST API schemas, documentation, versioning policy, and status. - [Same-origin OpenAPI discovery schema](/openapi.json): OpenAPI 3.1 schema for automated discovery, function generation, authentication, and structured errors. - [Complete production OpenAPI specification](https://swagger.getlago.com/openapi.yaml): Exhaustive Lago REST API contract. - [OpenAPI source repository](https://github.com/getlago/lago-openapi): Version history and contributions. - [Sitemap](/sitemap.xml): Index of published documentation pages. - [Complete documentation corpus](/llms-full.txt): Full text export for retrieval and offline context. - [Scoped developer index](/developers/llms.txt): Conventional entry point for developer tools and machine-readable contracts. - [Scoped API index](/api/llms.txt): Conventional API-focused index for authentication, contracts, errors, pagination, and versioning. - [Scoped guide index](/docs/llms.txt): Conventional task-guide index for billing implementation and operations. - [MCP endpoint](/mcp): Streamable HTTP endpoint for documentation search and retrieval. - [Product MCP guide](/guide/ai-agents/mcp-server.md): Run the Docker-based Lago Product MCP against live billing data and operations. - [Product MCP source](https://github.com/getlago/lago-agent-toolkit): Open-source server implementation, tools, and deployment guidance. ## Core billing workflows - [Ingest usage events](/guide/events/ingesting-usage.md): Send idempotent product-usage events to Lago. - [Aggregation types](/guide/billable-metrics/aggregation-types/overview.md): Count, sum, unique count, latest, maximum, weighted sum, and custom expressions. - [Plan model](/guide/plans/plan-model.md): Structure reusable pricing and billing rules. - [Usage-based charges](/guide/plans/charges/usage-based-charges.md): Price a billable metric per unit, per tier, per package, or as a percentage. - [Filters and dimensions](/guide/billable-metrics/filters.md): Price one metric differently per attribute, such as model or region for AI token usage. - [Retrieve usage](/guide/events/retrieve-usage.md): Read a customer's current, projected, and past usage through the API. - [Prepaid credits and wallets](/guide/wallet-and-prepaid-credits/overview.md): Sell credits up front, apply them to invoices automatically, and set expiration and recurring top-ups. - [Top-up and void credits](/guide/wallet-and-prepaid-credits/wallet-top-up-and-void.md): Add paid or free credits to a wallet, or void them. - [Custom pricing units](/guide/plans/custom-pricing-units.md): Express charges in credits or tokens instead of a fiat currency. Premium feature. - [Commitments](/guide/plans/commitment.md): Set a minimum spend per billing period, with a true-up fee for the shortfall. Premium feature. - [Progressive billing](/guide/plans/progressive-billing.md): Invoice automatically when cumulative usage crosses a threshold. Premium add-on. - [Usage alerts](/guide/alerts/usage-alerts.md): Notify when a subscription's usage or spend crosses a threshold. - [Credits consumption alerts](/guide/alerts/credits-consumption-alerts.md): Notify when a wallet balance crosses a threshold. Premium feature. - [Entitlements](/guide/entitlements.md): Define the features and limits each plan grants, and read them per subscription. - [Customers](/guide/customers/customer-management.md): Model billable customer accounts. - [Subscriptions](/guide/subscriptions/assign-plan.md): Attach plans and lifecycle rules to customers. - [Plan overrides](/guide/subscriptions/assign-plan.md#overriding-a-plan): Customize prices, charge properties, currency, trial, and taxes for one subscription with `plan_overrides`. The parent plan and the charge model stay unchanged. Premium feature. - [Billing entities](/guide/billing-entities.md): Manage customers under distinct billing configurations, such as invoice prefix and footer, within one organization. Multiple entities are a premium feature. - [Invoicing](/guide/invoicing/overview.md): Generate, finalize, and manage invoices. - [Quotes and order forms](/guide/quotes/overview.md): Assemble a priced deal, approve it into an order form, and execute the signed order into billing. Premium feature. Quotes are authored in the user interface; the API reads them and drives every transition after authoring. - [Webhooks](/guide/webhooks.md): Process asynchronous billing state changes safely. - [Integration testing](/guide/integration-testing.md): Validate billing behavior before production rollout. ## Revenue recognition Revenue recognition is an alpha, premium feature released account by account. Reconcile its output before using it for a statutory close. - [Revenue recognition overview](/guide/revenue-recognition/overview.md): Turn billing data into accrual-basis recognized and deferred revenue, period by period. - [Enable revenue recognition](/guide/revenue-recognition/get-started/enable.md): Turn it on for an account and prepare billing data. - [Methodology](/guide/revenue-recognition/how-it-works/methodology.md): How Lago decides what revenue to recognize, and when. - [Recognized revenue report](/guide/revenue-recognition/reports/recognized-revenue.md): Revenue earned in a period, regardless of billing or payment timing. - [Deferred revenue report](/guide/revenue-recognition/reports/deferred-revenue.md): Revenue invoiced in advance but not yet earned. - [Revenue waterfall](/guide/revenue-recognition/reports/revenue-waterfall.md): How each invoice releases into revenue across current and future periods. - [Journal entry details](/guide/revenue-recognition/reports/journal-entry-details.md): The double-entry lines behind every recognized-revenue figure. - [Export revenue data](/guide/revenue-recognition/get-started/export.md): Get recognized and deferred revenue out of Lago for the close. ## Security and access control - [Role-based access control](/guide/security/rbac.md): Define member roles and permissions. Premium add-on. - [Audit logs](/guide/security/audit-logs.md): Activity and API logs recording who did what, through the UI, the API, or the system, and when. - [Security logs](/guide/security/security-logs.md): Records of team management, authentication, API key, and webhook changes. ## SDKs and examples - [JavaScript SDK on npm](https://www.npmjs.com/package/lago-javascript-client) and [source](https://github.com/getlago/lago-javascript-client) - [Python package](https://pypi.org/project/lago-python-client/) and [source](https://github.com/getlago/lago-python-client) - [Ruby package](https://rubygems.org/gems/lago-ruby-client) and [source](https://github.com/getlago/lago-ruby-client) - [Go module](https://pkg.go.dev/github.com/getlago/lago-go-client) and [source](https://github.com/getlago/lago-go-client) - [Java client](https://github.com/getlago/lago-java-client) - [PHP client](https://github.com/getlago/lago-php-client) - [C# client](https://github.com/getlago/lago-csharp-client) - [Rust client](https://github.com/getlago/lago-rust-client) - [Lago Agent SDK package](https://pypi.org/project/lago-agent-sdk/) - [Billing examples](https://github.com/getlago/lago-billing-examples) - [Main Lago repository](https://github.com/getlago/lago) - [Lago documentation repository](https://github.com/getlago/lago-doc) and [version-controlled agent rules](https://github.com/getlago/lago-doc/blob/main/AGENTS.md) ## Deployment and operations - [Self-hosted overview](/guide/lago-self-hosted/overview.md): Choose and operate a self-hosted deployment. - [Docker deployment](/guide/lago-self-hosted/docker.md): Run Lago with Docker. - [Compatibility matrix](/guide/lago-self-hosted/compatibility-matrix.md): Check supported component versions. - [Update a self-hosted instance](/guide/lago-self-hosted/update-instance.md): Upgrade guidance. - [Helm charts](https://github.com/getlago/lago-helm-charts): Kubernetes deployment packages. - [Lago status](https://status.getlago.com/): Current managed-service status and incidents. ## AI agent development - [Agent SDK overview](/guide/ai-agents/agent-sdk/overview.md): Add structured billing tools to agent applications. - [Agent SDK billing](/guide/ai-agents/agent-sdk/billing.md): Billing workflows for agents. - [OpenAI integration](/guide/ai-agents/agent-sdk/openai.md): Use Lago tools with OpenAI models. - [Anthropic integration](/guide/ai-agents/agent-sdk/anthropic.md): Use Lago tools with Anthropic models. - [Billing assistant](/guide/ai-agents/billing-assistant.md): Assistant workflow patterns. - [Finance assistant](/guide/ai-agents/finance-assistant.md): Read-oriented finance workflows. - [Dunning agent](/guide/ai-agents/dunning-agent.md): Approval-aware collections workflows. ## Platform and pricing - [Usage metering](https://getlago.com/platform/usage-metering): Event ingestion, billable metrics, and aggregation. - [Usage ingestion walkthrough](https://getlago.com/platform/usage-metering/ingestion): Visual event-to-balance pipeline; use the ingestion guide above for implementation details and retry rules. - [Billing and invoicing](https://getlago.com/platform/billing-invoicing): Plans, charges, subscriptions, and invoice generation. - [Cash collection](https://getlago.com/platform/cash-collection): Payments, dunning, and collections. - [Revenue analytics](https://getlago.com/platform/revenue-analytics): Reporting and revenue recognition. - [Entitlements](https://getlago.com/platform/entitlements): Feature access tied to plans. - [Lago AI](https://getlago.com/platform/ai): AI-assisted billing workflows. - [Lago pricing](https://getlago.com/pricing): Current commercial packaging. ## Company, trust, and support - [About Lago](/about.md): Company, project, and open-source foundation. - [Contact Lago](/contact.md): Community, support, commercial, security, and privacy routes. - [Privacy and data protection](/privacy.md): Controlling privacy policy and safe integration practices. - [Lago privacy policy](https://getlago.com/legal/privacy-policy): Controlling privacy terms. - [Security policy](https://github.com/getlago/lago/security): Private vulnerability-reporting route. - [Lago customers](https://getlago.com/customers): Production usage and reference implementations. - [Lago blog](https://getlago.com/blog): Engineering and product writing. - [Trust center](https://security.getlago.com): Security posture, SOC 2 Type II, and compliance documentation. - [Careers](https://getlago.com/hiring): Open roles. ## Recovery guidance If a link is missing, search this index first, then the [sitemap](/sitemap.xml), the [developer portal](/developers.md), or the [API reference](/api-reference/intro.md). A documentation 404 does not imply that an API resource or feature is unavailable; verify the complete OpenAPI contract and current product guides before concluding that a capability does not exist.