# Use API Key

There are two ways to create an API key:

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

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

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

1. [Get Internal Account Info](https://docs.tronsave.io/developer/buy-resources-v2/use-api-key/get-internal-account-info)
2. [Get Order Book](https://docs.tronsave.io/developer/buy-resources-v2/use-api-key/get-order-book)
3. [Estimate TRX](https://docs.tronsave.io/developer/buy-resources-v2/use-api-key/estimate-trx)
4. [Buy Energy](https://docs.tronsave.io/developer/buy-resources-v2/use-api-key/create-order)
5. [Get the order details](https://docs.tronsave.io/developer/buy-resources-v2/use-api-key/get-one-order-details)
6. [Get Internal Account Order History](https://docs.tronsave.io/developer/buy-resources-v2/use-api-key/get-internal-account-order-history)

### 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/v2/estimate-buy-resource`
* Create order: <mark style="color:orange;">`POST`</mark> `https://api-dev.tronsave.io/v2/buy-resource`
* Get Internal Account Info: <mark style="color:blue;">`GET`</mark> `https://api-dev.tronsave.io/v2/user-info`
* Get Internal Account Order History: <mark style="color:blue;">`GET`</mark> `https://api-dev.tronsave.io/v2/orders`
* Get the order details: <mark style="color:blue;">`GET`</mark> `https://api-dev.tronsave.io/v2/orders/:id`
* Get Order Book: <mark style="color:blue;">`GET`</mark> `https://api-dev.tronsave.io/v2/order-book`
  {% endtab %}
  {% endtabs %}

If you want to integrate with the **Nile Testnet**, simply replace the URL with <https://testnet.tronsave.io/> and follow the same steps as in [the guide](https://docs.tronsave.io/developer/get-api-key/on-the-website).
