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

# API Keys

> Creating and managing API keys

API keys authenticate your requests to Fenra.

## Creating a Key

1. Go to [app.fenra.io](https://app.fenra.io)
2. Navigate to **Settings → API Keys**
3. Click **Create New Key**
4. Give it a descriptive name
5. Copy the key immediately. It is only shown once.

## Using a Key

Include it in the `X-Api-Key` header:

<CodeGroup>
  ```bash cURL theme={null}
  curl -X POST 'https://ingest.fenra.io/usage/transactions' \
    -H 'Content-Type: application/json' \
    -H 'X-Api-Key: YOUR_API_KEY' \
    -d '...'
  ```

  ```javascript Node.js theme={null}
  await fetch('https://ingest.fenra.io/usage/transactions', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
      'X-Api-Key': process.env.FENRA_API_KEY
    },
    body: JSON.stringify(transaction)
  });
  ```

  ```python Python theme={null}
  requests.post(
      'https://ingest.fenra.io/usage/transactions',
      headers={
          'Content-Type': 'application/json',
          'X-Api-Key': os.getenv('FENRA_API_KEY')
      },
      json=transaction
  )
  ```
</CodeGroup>

## Managing Keys

In **Settings → API Keys** you can:

* **Create** new keys with descriptive names
* **Deactivate** keys temporarily (returns 401 immediately)
* **Delete** keys permanently

## Troubleshooting

If you're getting `401 Unauthorized`:

1. Check the key exists in your dashboard
2. Check it's active (not disabled)
3. Verify the header name is `X-Api-Key`
4. Check for typos or extra spaces

## Next Steps

* [Send your first transaction](/quickstart)
* [See the API Reference](/api-reference/introduction)
