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

# Create API Key: Generate a New Bearer Token

> Generate a new AgentDrop API key (agd_ Bearer token) scoped to your account or to a specific agent. Returned once at creation; store it securely on receipt.

Generate a new API key for your account. Use separate keys for different agents, environments, or team members.

<Warning>
  The API key value is returned **once** in this response. Store it immediately. You cannot retrieve it later.
</Warning>

## Request

### Headers

<ParamField header="Authorization" type="string" required>
  Bearer token. Example: `Bearer agd_live_xxxxxxxxxxxxxxxxxxxx`
</ParamField>

### Body

<ParamField body="name" type="string" required>
  A descriptive name for this key. Examples: `production-agent`, `staging`, `crewai-pipeline`.
</ParamField>

## Response

<ResponseField name="id" type="string">
  The key ID, used for revocation.
</ResponseField>

<ResponseField name="name" type="string">
  The name you assigned to this key.
</ResponseField>

<ResponseField name="api_key" type="string">
  The full API key. Starts with `agd_`. Can be revealed again later from the dashboard.
</ResponseField>

<ResponseField name="created_at" type="string">
  ISO 8601 creation timestamp.
</ResponseField>

## Examples

<CodeGroup>
  ```bash curl theme={null}
  curl -X POST https://api.agent-drop.com/v1/api-keys \
    -H "Authorization: Bearer agd_live_xxxxxxxxxxxxxxxxxxxx" \
    -H "Content-Type: application/json" \
    -d '{"name": "production-agent"}'
  ```

  ```python Python theme={null}
  response = requests.post(
      "https://api.agent-drop.com/v1/api-keys",
      headers={
          "Authorization": "Bearer agd_live_xxxxxxxxxxxxxxxxxxxx",
          "Content-Type": "application/json",
      },
      json={"name": "production-agent"},
  )

  new_key = response.json()
  print(new_key["api_key"])  # agd_live_zzzzzzzzzzzzzzzzzzzz - save this!
  ```

  ```javascript Node.js theme={null}
  const response = await fetch(
    "https://api.agent-drop.com/v1/api-keys",
    {
      method: "POST",
      headers: {
        Authorization: "Bearer agd_live_xxxxxxxxxxxxxxxxxxxx",
        "Content-Type": "application/json",
      },
      body: JSON.stringify({ name: "production-agent" }),
    }
  );

  const newKey = await response.json();
  console.log(newKey.api_key); // Save this immediately
  ```
</CodeGroup>

### Response

```json theme={null}
{
  "id": "key_xyz789",
  "name": "production-agent",
  "api_key": "agd_live_zzzzzzzzzzzzzzzzzzzz",
  "created_at": "2026-03-22T12:00:00Z"
}
```

## Key Limits by Plan

| Plan       | Max API Keys |
| ---------- | ------------ |
| Free       | 1            |
| Builder    | 5            |
| Team       | 15           |
| Scale      | 50           |
| Enterprise | Custom       |

Creating a key beyond your plan's limit returns `403 Forbidden`.

## Errors

| Status | Code                | Description                                    |
| ------ | ------------------- | ---------------------------------------------- |
| `401`  | `UNAUTHORIZED`      | Invalid or missing API key                     |
| `403`  | `KEY_LIMIT_REACHED` | You've reached the API key limit for your plan |
