> 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="/files/jXfM1TBadXmi8bheMgri" 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="/files/bJMInffm8vw1pAEuvryZ" 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 dynamically by asking a question.

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

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

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
