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

# 1. Create an API key

> Generate a scoped API key in the AtlaSent Console.

API keys are the primary auth for service-to-service calls (your AI agent → AtlaSent). Keys are **scoped by role at creation time** and stored server-side as SHA-256 hashes — the plaintext is never persisted.

## Create the key

<Steps>
  <Step title="Log in to the Console">
    Open [console.atlasent.io](https://console.atlasent.io) and sign in.
  </Step>

  <Step title="Open Settings → API Keys">
    Choose **API Keys** in the sidebar (`/api-keys`; organization admins land on **Settings → API Keys**), then click **New Key**.
  </Step>

  <Step title="Pick a scope preset">
    For the quickstart, pick the **Evaluate only** preset. It grants `evaluate:write`, `verify:execute`, `audit:read`, and `policy:read`. Scopes always take the `resource:action` form. You can create an **Audit read-only** key (`audit:read`) or choose **Custom** scopes later.
  </Step>

  <Step title="Copy the plaintext key">
    It's shown **once**. Store it in a password manager or a secrets store. Lost keys must be rotated.
  </Step>
</Steps>

## Put the key in your environment

```bash theme={null}
export ATLASENT_API_KEY="ask_live_..."   # keys from console.atlasent.io are live keys
export ATLASENT_API_URL="https://api.atlasent.io/functions/v1"
```

The base URL includes the `/functions/v1` path. Endpoints are hyphenated
function names appended directly to it — `$ATLASENT_API_URL/v1-evaluate`
(i.e. `https://api.atlasent.io/functions/v1/v1-evaluate`), not
`$ATLASENT_API_URL/v1/evaluate`. The next two pages use this convention.

A live key is accepted only when the request's `context.environment` is
`production`; any other value is refused with `ENVIRONMENT_MISMATCH`. The
examples on the next pages already send `production`.

<Warning>
  Do not check API keys into source control. Use your platform's secret manager (GitHub Actions secrets, AWS Secrets Manager, Vercel env, etc.).
</Warning>

## Next

Now [make your first evaluation →](/quickstart/first-evaluation)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.