> ## Documentation Index
> Fetch the complete documentation index at: https://docs.zelinqa.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Generate an API Key

> Create the API key your application uses to authenticate with the NBQ Engine.

Your application authenticates every API request with an API key. You generate this key from the NBQ Studio.

<Note>
  The API Key section is locked until you have added at least **10 active questions** to your instance. Once that threshold is reached, the section unlocks automatically.
</Note>

## How to generate

<Steps>
  <Step title="Go to the API Key area">
    Open your Zelinqa NBQ Studio and click **API Key** in the navigation.
  </Step>

  <Step title="Click Generate Key">
    A new key is created immediately.
  </Step>

  <Step title="Copy the key now">
    The key is displayed only once. Copy it and store it in a secure location before closing the page.
  </Step>
</Steps>

<Warning>
  The API key is shown **only once**. If you close the page without copying it, you must revoke the key and generate a new one.
</Warning>

## Key format

Every NBQ Engine API key starts with `nbq_live_`:

```
nbq_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
```

## Store the key safely

Never put the key directly in your code. Use an environment variable:

```bash theme={null}
export NBQ_API_KEY="nbq_live_xxx"
```

Then reference it in your application code via `os.environ["NBQ_API_KEY"]` or equivalent.

## Use the key in API requests

Pass the key in the `Authorization` header of every request:

```
Authorization: Bearer nbq_live_xxx
```

See [API Key Safety](/en/security/api-key-safety) for full security guidance.
