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

# Service Accounts

> Create and manage service accounts for programmatic access

API Keys provide programmatic access to Onyx APIs, enabling you to build custom applications,
integrate with external systems, and automate workflows.

<Note>
  API Keys exist as distinct users in Onyx, allowing you to trace activity and manage permissions at the key level.
</Note>

## API Key Types

There are three types of API keys:

<AccordionGroup>
  <Accordion title="Admin API Keys" icon="shield-check">
    Can access all endpoints, including those pre-fixed with `admin/`.

    **Use cases:**

    * Full system administration
    * User management operations
    * Data management and analytics
    * Complete access to all Onyx features

    **⚠️ Use with caution:** Admin keys have unrestricted access to your Onyx instance.
  </Accordion>

  <Accordion title="Basic API Keys" icon="key">
    Can access the non-admin endpoints like Search, Chat, Agents, and Actions.

    **Use cases:**

    * Building chat applications
    * Implementing search functionality
    * Creating and managing agents
    * Running actions and workflows

    **✅ Recommended:** Most users should use Basic API Keys for application development.
  </Accordion>

  <Accordion title="Limited API Keys" icon="lock">
    Read-only Agent access. Can post messages to Chat endpoints, but cannot read chat history.

    **Use cases:**

    * Highly restricted environments
    * Specific use cases requiring minimal permissions
    * Testing with limited scope
  </Accordion>
</AccordionGroup>

<Tip>
  Looking for user-scoped tokens?
  Any user can create a [Personal Access Token](/developers/overview#personal-access-tokens)
  from **Settings** > **Accounts & Access** to authenticate API requests as themselves.
</Tip>

## Creating API Keys

<Steps>
  <Step title="Navigate to API Keys">
    In the Admin Panel, go to **API Keys**.
  </Step>

  <Step title="Create New API Key">
    Click **Create New API Key** and select the appropriate key type for your use case.

    <img className="rounded-image" src="https://mintcdn.com/danswer/2sYx2-qEkfFozZU5/assets/admins/user_management/create_api_key.png?fit=max&auto=format&n=2sYx2-qEkfFozZU5&q=85&s=a6a7b158c088ffc86a7204a26ed51fae" alt="Create API Key interface" width="1820" height="1050" data-path="assets/admins/user_management/create_api_key.png" />
  </Step>

  <Step title="Save and Copy Key">
    After creation, immediately copy and securely store the API key.
  </Step>
</Steps>

You will see your new API key along with all of your existing keys on the API Keys page.

From this page, you can regenerate, rename, or delete your API keys.
