> For the complete documentation index, see [llms.txt](https://help.nightfall.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.nightfall.ai/developer-api/key-concepts/setup/api_key.md).

# Creating API Key

The API expects an API Key to be passed via the `Authorization: Bearer <key>` HTTP header.

To create and manage API keys:

1. Log in to Nightfall.
2. Click **Overview** under the **DEVELOPER APIS** sectio&#x6E;**.**&#x20;
3. Click **Create key**.&#x20;

The **Generate API Key** window is displayed.

4. Enter a name for the API key and click **Create**.

<figure><img src="https://3789559529-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDE6VZCJNhkLwvzLp4YDN%2Fuploads%2FGBE22VUmU0iW4WmGdBp2%2F121212.png?alt=media&amp;token=20364ac9-cd46-4552-a1c3-b9e899dec99c" alt="" width="563"><figcaption></figcaption></figure>

The API key is generated and displayed. Click the copy button to copy the API key and store it in a. secure location. Once you click the **Got it** button, you cannot retrieve the API key again. &#x20;

> ### 🚧Be Sure to Record the API Key's Value
>
> For security reasons, after closing the window, you will not be able to recover the key's value.

Once you close the window, the **Your API Keys** section will display your newly generated key, with the majority of the Key redacted.&#x20;

You can click the **Create Key** button to create new keys (assuming your license allows you to generate additional keys). You can click the Delete icon against an API key to delete the key.&#x20;

<figure><img src="https://3789559529-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDE6VZCJNhkLwvzLp4YDN%2Fuploads%2FokIZFa1DIlr7Ob7BCDzS%2Fimage.png?alt=media&amp;token=234a238a-ab68-4d89-8a53-78438cc521de" alt="" width="563"><figcaption></figcaption></figure>

***


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://help.nightfall.ai/developer-api/key-concepts/setup/api_key.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
