---
title: Authentication
description: Set up your API key to use server-powered tools.
---

# Authentication

Local tools (JSON, Base64, hashing, etc.) work without any authentication. Server-powered tools (screenshot, OCR, DNS) require an API key.

## Get an API key

1. Go to [devv.tools](https://devv.tools)
2. Create an account or log in
3. Navigate to Settings → API Keys
4. Generate a new key (starts with `dv_live_`)

## Login

```bash
devv login dv_live_abc123...
```

```
✓ API key saved
  Authenticated as josh@example.com
```

The key is stored securely in `~/.config/devv/config.json`.

## Check status

```bash
devv whoami
```

```
  Authenticated: yes
  Email: josh@example.com
  Plan: Pro
  Key: dv_live_...abc1 (masked)
```

## Logout

```bash
devv logout
```

Removes the stored API key from your config.

## Environment variable

You can also set the API key via environment variable:

```bash
export DEVV_API_KEY=dv_live_abc123...
devv screenshot https://example.com
```

The environment variable takes precedence over the stored config.

## CI/CD usage

For CI pipelines, set `DEVV_API_KEY` as a secret:

```yaml
# GitHub Actions
env:
  DEVV_API_KEY: ${{ secrets.DEVV_API_KEY }}
steps:
  - run: devv screenshot https://staging.myapp.com
```

<Note>
API keys with `dv_live_` prefix are for production. Test keys (`dv_test_`) have lower rate limits but don't count toward billing.
</Note>
