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

# API Keys

> Create, manage, and secure your agntdata API keys.

## Creating API Keys

API keys are created from the agntdata dashboard. Each key is associated with a workspace and shares that workspace's credit balance.

<Steps>
  <Step title="Log in to the Dashboard">
    Go to [app.agntdata.dev](https://app.agntdata.dev/login) and sign in to your account.
  </Step>

  <Step title="Navigate to API Keys">
    From the dashboard sidebar, click on **API Keys**.
  </Step>

  <Step title="Create New Key">
    Click **Create API Key**, give it a descriptive name (e.g., "Production Server" or "Development"), and click **Create**.
  </Step>

  <Step title="Copy Your Key">
    Your new API key will be displayed once. Copy it immediately and store it securely — you won't be able to see it again.
  </Step>
</Steps>

<Warning>
  API keys are shown only once when created. If you lose a key, you'll need to create a new one.
</Warning>

## Managing Keys

### Viewing Keys

The API Keys page shows all keys for your workspace:

| Column    | Description                        |
| --------- | ---------------------------------- |
| Name      | The descriptive name you assigned  |
| Created   | When the key was created           |
| Last Used | Most recent API call with this key |
| Status    | Active or Revoked                  |

### Revoking Keys

To revoke an API key:

1. Find the key in the API Keys list
2. Click the **Revoke** button
3. Confirm the action

<Warning>
  Revoking a key is immediate and permanent. Any applications using that key will immediately lose access.
</Warning>

## Key Naming Best Practices

Use descriptive names that help you identify where each key is used:

<CardGroup cols={2}>
  <Card title="Good Names" icon="check">
    * `Production API Server`
    * `Development Local`
    * `CI/CD Pipeline`
    * `Analytics Service`
  </Card>

  <Card title="Avoid" icon="xmark">
    * `Key 1`
    * `Test`
    * `My Key`
    * `asdf`
  </Card>
</CardGroup>

## Multiple Keys

You can create multiple API keys for a single workspace. Common patterns:

<AccordionGroup>
  <Accordion title="Environment Separation">
    Create separate keys for development, staging, and production. This lets you revoke a compromised dev key without affecting production.
  </Accordion>

  <Accordion title="Service Isolation">
    Give each service or application its own key. If one service is compromised, you can revoke just that key.
  </Accordion>

  <Accordion title="Team Members">
    Create individual keys for team members during development. Revoke them when someone leaves the team.
  </Accordion>
</AccordionGroup>

## Key Rotation

Periodically rotating API keys is a security best practice:

<Steps>
  <Step title="Create New Key">
    Create a new API key with a descriptive name like "Production Server (Rotated April 2024)".
  </Step>

  <Step title="Update Applications">
    Update all applications to use the new key. Verify they're working correctly.
  </Step>

  <Step title="Revoke Old Key">
    Once all applications are using the new key, revoke the old one.
  </Step>
</Steps>

## Next Steps

<CardGroup cols={2}>
  <Card title="Authentication Overview" icon="lock" href="/authentication/overview">
    Learn how authentication works with the API.
  </Card>

  <Card title="Quickstart" icon="rocket" href="/quickstart">
    Make your first API request.
  </Card>
</CardGroup>
