# 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="/files/rrqPWK8nXwitarlrN1FF" 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="/files/hIjKeJMCI57EnBTNeXtk" 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="/files/d4PxM1f7uZfAEdZ79R0s" alt=""><figcaption><p>API Key generated</p></figcaption></figure>


---

# 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.aiplanet.com/genai-stack-1/rest-apis/genai-stack-rest-apis.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.
