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

# Authentication

> Authenticate 1eye API requests with a bearer token generated from your workspace settings.

The 1eye API authenticates every request with a bearer token. Generate keys from your workspace settings and pass them in the `Authorization` header.

## Generate an API key

<Steps>
  <Step title="Open workspace settings">
    Navigate to **Settings → API keys** in your 1eye workspace.
  </Step>

  <Step title="Create a new key">
    Click **Create key**, give it a descriptive name, and select the scopes it needs.
  </Step>

  <Step title="Copy and store the key">
    Copy the key immediately. You won't be able to see it again after you close the dialog.
  </Step>
</Steps>

## Use the key

Include the key in the `Authorization` header on every request:

<CodeGroup>
  ```bash cURL theme={null}
  curl https://api.1eye.com/v1/signals \
    -H "Authorization: Bearer YOUR_API_KEY"
  ```

  ```javascript Node.js theme={null}
  const res = await fetch("https://api.1eye.com/v1/signals", {
    headers: { Authorization: `Bearer ${process.env.ONEYE_API_KEY}` },
  });
  ```

  ```python Python theme={null}
  import requests

  res = requests.get(
      "https://api.1eye.com/v1/signals",
      headers={"Authorization": f"Bearer {api_key}"},
  )
  ```
</CodeGroup>

<Warning>
  Never commit API keys to source control or expose them in client-side code. Rotate any key that leaks.
</Warning>
