# DuckLedger > DuckLedger is a multi-tenant SaaS financial intelligence and unit economics platform. It unifies gateway revenues (Asaas, Stripe, Pagar.me, Paddle, Iugu, Mercado Pago, AbacatePay) with cloud infrastructure costs (AWS Cost Explorer, Google Cloud, Azure) and AI token consumption (OpenAI, Anthropic, AWS Bedrock, OpenRouter) to deliver real net profit, contribution margins per customer, and cohort retention. DuckLedger bridges the gap between top-line billing gateways and bottom-line cloud/AI infrastructure bills. It also provides developer-first webhooks with HMAC-SHA256 signatures, a typed TypeScript SDK, and an official Model Context Protocol (MCP) server for autonomous AI coding agents (Cursor, Claude, Antigravity). Production API base URL is `https://api.duckledger.com/api/v1`; sandbox is `https://sandbox-api.duckledger.com/api/v1`. ## Guides: Cloud, FinOps & SaaS Economics - [Como Reduzir Custos de Nuvem em até 40% (AWS, GCP e Azure)](https://duckledger.com/blog/como-otimizar-custos-nuvem-aws-gcp-azure): Guia prático de engenharia para eliminar desperdícios silenciosos de infraestrutura: armadilhas de NAT Gateway, tráfego inter-AZ, right-sizing de instâncias ARM (Graviton/Tau), volumes de disco órfãos e Savings Plans. - [Guia Definitivo dos Créditos de Nuvem para Startups (AWS, Google Cloud e Azure)](https://duckledger.com/blog/como-funcionam-creditos-aws-google-cloud-azure-startups): Como conseguir até centenas de milhares de dólares em créditos (AWS Activate, Google for Startups, Microsoft Founders Hub), regras de expiração, pegadinhas de faturamento e como evitar a "ressaca dos créditos" (the credit cliff). - [AWS vs Google Cloud vs Azure vs Bare Metal: Qual a Melhor Nuvem para SaaS?](https://duckledger.com/blog/diferencas-infraestrutura-nuvem-aws-vs-gcp-vs-azure): Comparativo técnico e financeiro entre os três grandes provedores e bare metal (Hetzner, OVH, Railway): computação em contêineres (ECS vs Cloud Run vs Container Apps), bancos gerenciados, taxas de saída de dados (egress) e ecossistemas de IA. - [FinOps para SaaS: Por que Olhar Apenas para o MRR Pode Quebrar a Sua Empresa](https://duckledger.com/blog/finops-para-saas-lucro-liquido-vs-mrr): Por que o MRR bruto é insuficiente na era dos serviços gerenciados e IA. Cálculo de COGS em SaaS, identificação de clientes com margem negativa e retenção de coortes por lucro líquido. - [Custos de IA por Cliente: Como Rastrear e Cobrar Consumo de LLMs no SaaS](https://duckledger.com/blog/como-calcular-custos-de-ia-por-cliente): O fim do custo marginal zero. Estratégias de precificação (soft caps, carteira de créditos, markup direto), prompt caching, model cascading e instrumentação de código via SDK `@duckledger/usage`. ## Developer documentation & API - [Developer documentation](https://duckledger.com/developers): Quickstart, searchable 208-operation Asaas parity matrix, and implementation status. - [Interactive API reference](https://duckledger.com/developers/reference): OpenAPI-powered reference with generated request examples. - [OpenAPI 3.1 contract](https://duckledger.com/openapi.json): Machine-readable contract for all 278 callable operations. - [SDK integration guide](https://duckledger.com/sdk-integration.md): Guide for Node.js/TypeScript (`@duckledger/api-client` and `@duckledger/usage`). - [SDK upgrade and MCP guide](https://duckledger.com/sdk-upgrade.md): Usage identity, meters, traces, costs, and agent prompts. - [Webhook integration guide](https://duckledger.com/developers/guides/webhooks): HMAC-SHA256 signature verification, delivery behavior, and receiver examples. - [Full LLM context](https://duckledger.com/llms-full.txt): Comprehensive self-contained product, FinOps formulas, SDK, and API reference. ## Integration entry points - [DuckLedger web application](https://duckledger.com): Register and manage financial connections, gateways, and workspaces. - [DuckLedger Blog](https://duckledger.com/blog): FinOps and cloud optimization guides for technical founders. - [DuckLedger production API](https://api.duckledger.com/api/v1): Production endpoints authenticated with `dlk_live_...` bearer keys. - [DuckLedger sandbox API](https://sandbox-api.duckledger.com/api/v1): Sandbox endpoints authenticated with `dlk_test_...` bearer keys. ## Optional - [llms.txt proposal](https://llmstxt.org/): Specification format followed by this file.