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

# API Keys

> Authenticate the mutagent CLI and SDK with your Platform account.

API keys authenticate the [`mutagent` CLI](/cli/overview) and SDK with your Mutagent Platform account.
Managed keys use the `mg_live_` prefix.

<Note>
  For interactive use you don't need to copy a key — [`mutagent login`](/cli/overview) opens a
  browser and authorizes the CLI for you. API keys are for CI, scripts, and headless environments.
</Note>

## Create a key

<Steps>
  <Step title="Open the dashboard">
    Go to [app.mutagent.io/settings/api-keys](https://app.mutagent.io/settings/api-keys).
  </Step>

  <Step title="Create API Key">
    Click **Create API Key**, give it a name, and copy the key — it's shown only once.
  </Step>

  <Step title="Use it">
    Export it for the CLI or SDK:

    ```bash theme={null}
    export MUTAGENT_API_KEY=mg_live_...
    ```

    With this set, `mutagent` commands authenticate without the browser flow.
  </Step>
</Steps>

## Good practice

* Keep keys in environment variables or a secrets manager — never commit them.
* Use one key per environment or machine, and rotate on a schedule.
* Revoke a key from the same dashboard page the moment it's no longer needed.
