> For the complete documentation index, see [llms.txt](https://docs.nexos.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.nexos.ai/gateway-api/api-keys.md).

# API Keys

Use an API key to authenticate requests to the Gateway API.

### How to generate API Key

Within Gateway:

1. Open the **API Keys tab**.
2. Select **Generate API Key**.
3. Enter the name of the key and click Generate.
4. Copy and save the key immediately.&#x20;

<figure><img src="https://4112003433-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDcOhapgXnoeDvgGQ8Jm4%2Fuploads%2FhSrxeh1QPMDBopvqOXfA%2FScreenRecording2026-09-15at12.49.26-ezgif.com-video-to-gif-converter.gif?alt=media&amp;token=fdb32ec3-451a-4f62-9908-71a954fd4df0" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
Make sure you save this API Key - you won't be able to access it again after closing the dialog.
{% endhint %}

If needed, you can rotate the API Key within API keys tab settings. This will rotate the API Key so the old one is deprecated, and you can change it to a new one.

### Managing your API key

From the API Keys tab, click the actions menu next to any key to:

* Edit: update the key's name.
* Rotate: deprecate the old key and generate a new one in its place.
* Delete: permanently remove the key.

<figure><img src="https://4112003433-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDcOhapgXnoeDvgGQ8Jm4%2Fuploads%2FbV2PCRdEhs29okwoOBru%2Fimage.png?alt=media&amp;token=f255e865-8582-443c-b9dc-7d63cf5b593f" alt="" width="563"><figcaption></figcaption></figure>

{% hint style="info" %}
Your API Key is set with custom settings: models enabled, fallbacks, etc. based on the settings (made by org owner).
{% endhint %}

{% hint style="info" %}
API usage requires purchased API credits.
{% endhint %}


---

# 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://docs.nexos.ai/gateway-api/api-keys.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.
