> For the complete documentation index, see [llms.txt](https://docs.luganodes.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.luganodes.com/tron-energy/energy-rental-api.md).

# API reference

Every Energy Rental API endpoint and the rules that apply to all of them.

The Energy Rental API is the on-demand API described in the [Overview](https://docs.luganodes.com/tron-energy/overview.md): your system requests energy for each transaction before it broadcasts. A rental is the energy delegated to the receiver, the address that sends the transaction and receives the energy, for one transaction. For a first rental end to end, follow the [Quickstart](https://docs.luganodes.com/tron-energy/energy-rental-api/quickstart.md).

| Endpoint                                                                                               | Method and path              | What it does                                                    |
| ------------------------------------------------------------------------------------------------------ | ---------------------------- | --------------------------------------------------------------- |
| [Check capacity](https://docs.luganodes.com/tron-energy/energy-rental-api/check-capacity.md)           | `GET /v1/capacity`           | Returns the energy available now and the current wait           |
| [Estimate energy](https://docs.luganodes.com/tron-energy/energy-rental-api/estimate-energy.md)         | `POST /v1/estimate`          | Returns the energy and bandwidth a transfer needs               |
| [Check an address](https://docs.luganodes.com/tron-energy/energy-rental-api/check-an-address.md)       | `GET /v1/accounts/{address}` | Returns the activation, free bandwidth and energy of an address |
| [Activate an address](https://docs.luganodes.com/tron-energy/energy-rental-api/activate-an-address.md) | `POST /v1/accounts/activate` | Puts a new address on chain so it can receive energy            |
| [Create a rental](https://docs.luganodes.com/tron-energy/energy-rental-api/create-a-rental.md)         | `POST /v1/rentals`           | Requests energy for a transaction                               |
| [Get a rental](https://docs.luganodes.com/tron-energy/energy-rental-api/get-a-rental.md)               | `GET /v1/rentals/{id}`       | Returns the status and on-chain record of one rental            |
| [List rentals](https://docs.luganodes.com/tron-energy/energy-rental-api/list-rentals.md)               | `GET /v1/rentals`            | Lists all your rentals, newest first                            |
| [Get usage](https://docs.luganodes.com/tron-energy/energy-rental-api/get-usage.md)                     | `GET /v1/usage`              | Returns daily rentals, activations and energy over a date range |

## Rules for every endpoint

| Topic                                              | Page                                                                                                         |
| -------------------------------------------------- | ------------------------------------------------------------------------------------------------------------ |
| Headers and request signing                        | [Authentication and signing](https://docs.luganodes.com/tron-energy/energy-rental-api/making-requests.md)    |
| Base URL, formats, rate limits and retries         | [Conventions and limits](https://docs.luganodes.com/tron-energy/energy-rental-api/conventions-and-limits.md) |
| Statuses, the 10-second window and queued requests | [Rental lifecycle](https://docs.luganodes.com/tron-energy/energy-rental-api/rental-lifecycle.md)             |
| Error format and every code                        | [Errors](https://docs.luganodes.com/tron-energy/energy-rental-api/errors.md)                                 |

Each endpoint page has cURL, Node.js and Python samples. The cURL samples sign the request inline and need `BASE_URL`, `API_KEY` and `API_SECRET` in your environment. The Node.js (18 or later) and Python (3.9 or later, with `requests`) samples call the signing helper from [Authentication and signing](https://docs.luganodes.com/tron-energy/energy-rental-api/making-requests.md). Sample IDs, addresses and hashes are illustrative.
