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

# API keys

> Securely access the Thena platform programmatically.

## Overview

Thena provides flexible API key options for developers and teams to securely interact with our platform.

## Personal API key

<Card>
  <p>🔐 Every Thena user has access to a personal API key.</p>

  <ul className="mt-4 ml-6 space-y-2">
    <li>Your API key is unique to your account and tied to your user-level permissions.</li>
    <li>You can view and regenerate your key by heading to Settings → Security & access.</li>
    <li>After regenerating, your old key will be deactivated immediately.</li>
  </ul>
</Card>

<Warning>
  Keep your API key secure. Treat it like a password—don't expose it in client-side code or version control.
</Warning>

## App-based API key

<Card>
  <p>🧱 If you prefer not to use your personal key—or want to build integrations that aren't tied to a specific user—you can create an app in Thena:</p>

  <ol className="mt-4 ml-6 space-y-2 list-decimal">
    <li>Go to Settings → Apps and click Create app.</li>
    <li>Each app comes with its own API key and can be scoped with specific permissions.</li>
  </ol>

  <p className="mt-4 ml-6">This is recommended for long-term integrations, third-party services, or production environments.</p>
</Card>

## Best practices

<Card>
  <p>🛠 Follow these guidelines to keep your API keys secure:</p>

  <ul className="mt-4 ml-6 space-y-2">
    <li>Use environment variables to store and reference API keys in your code.</li>
    <li>Rotate your keys periodically for security.</li>
    <li>Create separate apps for staging, dev, and production environments to isolate access.</li>
    <li>Audit access regularly through the Thena dashboard.</li>
  </ul>
</Card>
