# Billing API and CLI Reference Last edited on 13 Mar 2026 ## The DigitalOcean API The [DigitalOcean API](https://docs.digitalocean.com/reference/index.html.md) lets you manage resources programmatically with standard HTTP requests. All actions available in the control panel are also available through the API. [DigitalOcean Billing API Reference](https://docs.digitalocean.com/reference/api/api-reference/index.html.md#tag/Billing): Retrieve your balance, invoices, and billing history programmatically with the DigitalOcean API. ## The DigitalOcean Command Line Client, doctl [`doctl`](https://github.com/digitalocean/doctl) is the command-line interface for the DigitalOcean API. It supports most of the same actions available in the API and DigitalOcean Control Panel. [doctl balance](https://docs.digitalocean.com/reference/doctl/reference/balance/index.html.md): The subcommands of `doctl balance` retrieve information about your account balance. [doctl billing-history](https://docs.digitalocean.com/reference/doctl/reference/billing-history/index.html.md): The subcommands of `doctl billing-history` are used to access the billing history for your DigitalOcean account. [doctl invoice](https://docs.digitalocean.com/reference/doctl/reference/invoice/index.html.md): The subcommands of `doctl invoice` retrieve details about invoices for your account. ## The DigitalOcean MCP Server The DigitalOcean Model Context Protocol (MCP) Server lets you use natural language prompts to view and manage account details, billing history, SSH keys, and balances. [DigitalOcean MCP Server](https://docs.digitalocean.com/reference/mcp/index.html.md): View and manage account details, billing history, SSH keys, and balances with the DigitalOcean MCP Server.