# Use API Key

There are two ways to create an API key:

[Option 1: Generate the API key on the Tronsave website.](/developer/get-api-key/on-the-website.md)

[Option 2: Generate the API key on Telegram.](/developer/get-api-key/on-telegram.md)

### *You can use the API key for*

1. [Get Internal Account Info](/developer/rest-api-v0/buy-on-rest-api/use-api-key/get-internal-account-info.md)
2. [Get Order Book](/developer/rest-api-v0/buy-on-rest-api/use-api-key/get-order-book.md)
3. [Estimate TRX](/developer/rest-api-v0/buy-on-rest-api/use-api-key/estimate-of-trx.md)
4. [Buy Energy](/developer/rest-api-v0/buy-on-rest-api/use-api-key/create-order.md)
5. [Get one order details](/developer/rest-api-v0/buy-on-rest-api/use-api-key/get-one-order-details.md)
6. [Get Internal Account Order History](/developer/rest-api-v0/buy-on-rest-api/use-api-key/get-internal-account-order-history.md)

### API List for Testing - TRON Nile Testnet

{% tabs %}
{% tab title="Test-API" %}

* Estimate TRX: <mark style="color:orange;">`POST`</mark> `https://api-dev.tronsave.io/v0/estimate-trx`
* Create order: <mark style="color:orange;">`POST`</mark> `https://api-dev.tronsave.io/v0/internal-buy-energy`
* Get Internal Account Info: <mark style="color:blue;">`GET`</mark> `https://api-dev.tronsave.io/v0/user-info`
* Get Internal Account Order History: <mark style="color:blue;">`GET`</mark> `https://api-dev.tronsave.io/v0/orders`
* Get one order details: <mark style="color:blue;">`GET`</mark> `https://api-dev.tronsave.io/v0/orders/:id`
* Get Order Book: <mark style="color:blue;">`GET`</mark> `https://api-dev.tronsave.io/v0/order-book`
  {% endtab %}
  {% endtabs %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.tronsave.io/developer/rest-api-v0/buy-on-rest-api/use-api-key.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
