# How to create an API key

> Make a key in the dashboard, copy it once, send your first request, and revoke it when it is no longer needed. The key spends your balance, so it is treated like a password.

- Updated: 2026-09-25
- Do it here: https://tronbase.io/dashboard/api-keys/ (Create a key; needs a signed-in tronbase account unless the step says otherwise)
- Same guide with screenshots, for people: https://tronbase.io/guides/create-api-key/
- API reference: https://tronbase.io/api-docs.md

A key lets your own code do what you do on the Buy Energy page: read prices, look up an address and place orders against your balance. It takes about a minute to make one.

## Steps

### 1. Open API Keys

Keys live in the dashboard, next to the balance they spend. Nothing has to be requested from support and nothing has to be approved.

On screen: The dashboard tabs with API Keys among them.

### 2. Give the key a name and create it

The name is for you: it is what you will be reading later, when there are four keys and one of them has to go. Name it after the thing that will hold it — the payout worker, the staging box, the script on your laptop.

A separate key per consumer is worth the ten seconds it costs. Revoking one then stops exactly one thing instead of all of them.

On screen: The name field with the Create key button beside it.

### 3. Copy it while it is on the screen

This is the only moment the key is readable. We keep a hash of it, not the key itself, so a lost key cannot be looked up or sent again — it can only be revoked and replaced.

Put it straight into whatever holds your secrets: an environment variable, a secret manager, the deployment settings. Not into the repository, not into a chat, not into a ticket.

On screen: The new key shown once, with a button to copy it.

### 4. Make the first request

The quickest check that the key works is asking who it belongs to. The full documentation is public, at /api-documentation/ for people and /api-docs.md for agents.

From there an order is one POST: an address to send the energy to, and how much of it. The balance is charged as the order is placed, and a refused order is refunded on its own.

On screen: The example request shown on the API Keys page.

### 5. Revoke what you no longer use

The table shows when each key was made and when it was last used — which is usually enough to spot the one nobody needs any more. Revoking takes effect at once, on the next request that key makes.

Revoke without hesitating if a key has been anywhere it should not have been. Making another one costs a minute; a key in the wrong hands spends your balance.

On screen: The table of keys with their creation and last use dates.

## FAQ

### What can someone do with my key?

Place orders against your balance and read your orders, prices and account. It cannot withdraw funds, change your password or sign in as you — but a spent balance is a real loss, so treat the key as a password.

### I lost the key. Can you send it again?

No. Only a hash of it is stored, which is what stops anyone here reading your key either. Revoke that one and create another.

### How many keys can I have?

Ten live at a time. Revoked ones stay in the table as a record and do not count.

### Does a key expire?

No. It works until you revoke it, or until the account is blocked.

### Is there a rate limit?

60 requests a minute per account, shared by all of its keys, so making more keys does not raise it. Over that the API answers 429 with a Retry-After header saying how long to wait.

### Where is the API documentation?

Publicly, with no key: /api-documentation/ for reading, /api-docs.md as plain Markdown and /openapi.json as the contract. They come from one source, so they agree.
