# GenAI Stack REST APIs

### How to Use Our REST APIs

GenAI Stack  [APIs](https://en.wikipedia.org/wiki/API) power developers to integrate the stacks that they built & deployed in GenAI Stack into their platform.

### Working with GenAI Stack APIs

GenAI Stack APIs support bearer authentication. Where you have to send the api key in the **Authorization** header when you're making api requests.

```hpkp
Authorization: Bearer <api-key>
```

### How to get API keys?

Step 1: Go to the API Keys page (<https://app.aiplanet.com/account/api-keys>)

<figure><img src="https://3489179498-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FjlRjmrZThWiLNO9xTu9d%2Fuploads%2Ft9hyreGeTbAzpWoueFyS%2FScreenshot%202024-04-09%20at%201.17.52%20PM.png?alt=media&#x26;token=2991dd78-252f-4a3c-9d99-4145919a7eb9" alt=""><figcaption><p>API Keys</p></figcaption></figure>

Step 2: Click on the `Create new API key` & add the name.

Click on the `Create API key` to generate the key.

<figure><img src="https://3489179498-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FjlRjmrZThWiLNO9xTu9d%2Fuploads%2FrDQ07L8uWl3gnKkRu9xB%2FScreenshot%202024-04-09%20at%201.20.49%20PM.png?alt=media&#x26;token=5af6c0c5-b79a-4c6b-ab13-2ade3c557447" alt=""><figcaption><p>API Key Modal</p></figcaption></figure>

Step 3: Save the API Key.

Once the key is generated please save the api key somewhere. Once the api key modal is closed you will not be able to view the api key for security reasons.

<figure><img src="https://3489179498-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FjlRjmrZThWiLNO9xTu9d%2Fuploads%2FUs7P7RSTB3OFDTHbNrxB%2Fimage.png?alt=media&#x26;token=195c1b69-9c2e-4237-b006-a186eac8e82e" alt=""><figcaption><p>API Key generated</p></figcaption></figure>
