> 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/workspace/settings/user-settings/api-keys.md).

# API Keys

### How to generate your API key

You need an API key to make API requests from your own tool or app.

{% stepper %}
{% step %}

### Create your API key

Open **Settings**, then go to the **API Keys** sections.
{% endstep %}

{% step %}

### Generate a key

Click **Generate API key**.

<figure><img src="/files/Fx6gZRTc0OcwlJzfLPqw" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}

### Name the key and generate

Enter a name so you can recognize it later (for example, “Production” or “My app”), then click **Generate**.
{% endstep %}

{% step %}

### Save your API Key

After you click **Generate**, a pop up will appear showing your API key. Copy it and save it somewhere secure right away. You will not be able to see the full key again after you close the pop up.

<figure><img src="/files/nmtwrwvVJWZk0gJtEzko" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}

### Rotate API key

If you think your API key was shared by mistake, or you just want to replace it for security reasons, you can **rotate** the key. Rotating means the old key will stop working and a new key will be created in its place.

To rotate a key, go to the **API Keys** tab in Settings, find the key you want to change, and choose **Rotate**. A confirmation window will appear explaining that the current key will be permanently disabled and replaced with a new one.

<figure><img src="/files/AONsuENveSXYRcyaDGWL" alt=""><figcaption></figcaption></figure>
{% endstep %}
{% endstepper %}

{% hint style="info" %}
API access requires both a paid subscription plan and purchased API credits.&#x20;

API credits are not included in your subscription and must be purchased separately before API requests can be made.
{% 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 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://docs.nexos.ai/workspace/settings/user-settings/api-keys.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.
