# Get an API Token

> Create an API token in the LLMoxy console and configure quota, groups, and environment variables for tool access.

### Click Token Management

Show the available actions, then select **Add Token**.

![Token management](https://en.llmoxy.com/docs-assets/migrated/get-token/image-01.png)

### Create a Token

After clicking **Add Token**, fill in the following information:

- **Expiration time**: select **Never expires**
- **Quantity**: the default value **1** is enough
- **Quota setting**: select **Unlimited quota**
- **Model restriction list**: leave unselected by default
- **IP allowlist**: leave empty by default to avoid restrictions

![Create token](https://en.llmoxy.com/docs-assets/migrated/get-token/image-02.png)

### Copy the Secret Key

For the generated key, select **Click to copy** next to the eye icon.

![Copy secret key](https://en.llmoxy.com/docs-assets/migrated/get-token/image-07.png)

## Key Creation Strategy

We recommend creating at least two types of keys:

- `personal-dev`: for local development
- `ci-or-bot`: for automation or team-shared bots

## Environment Variable Reference

Tool integrations usually need two pieces of information: the gateway address and the API Key. The environment variable names differ depending on the tool you use:

**Claude Code** (Anthropic-compatible interface, URL without `/v1`):

```bash
export ANTHROPIC_BASE_URL="https://llmoxy.com"
export ANTHROPIC_AUTH_TOKEN="你的API Key"
```

**Gemini CLI** (write to the `~/.gemini/.env` configuration file):

```bash
GOOGLE_GEMINI_BASE_URL=https://llmoxy.com
GEMINI_API_KEY=你的API Key
```

**Other compatible tools** (OpenClaw, etc., URL with `/v1`):

```bash
export OPENAI_BASE_URL="https://llmoxy.com/v1"
export OPENAI_API_KEY="你的API Key"
```

## Permission Recommendations

- **Development Key**: limit the daily quota to avoid runaway costs caused by misuse
- **Team Key**: group by project to simplify later reconciliation and quota management
- **CI Key**: configure separate environment variables and do not reuse a personal Key

## Common Mistakes

- Copying a Key with extra spaces or line breaks
- Using a Claude Code URL without `/v1`, while other compatible tools require it
- Using a Key that has been disabled or exceeded its quota

This is the markdown version of https://en.llmoxy.com/docs/get-started/get-token.
