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

# Replay keys

> Manage provider API keys used when rerunning recorded LLM steps.

Step rerun needs a provider API key because Sovara sends the edited LLM request
to the same provider family as the recorded step.

Replay keys are separate from your shell environment. Store a key once, then
use `sovara rerun` without passing that key again.

## List configured keys

```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
sovara replay-keys list
```

The output shows provider names and masked previews. It does not print raw API
keys.

## Set a key from an environment variable

```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
export ANTHROPIC_API_KEY=sk-ant-...
sovara replay-keys set anthropic --api-key-env ANTHROPIC_API_KEY
```

Common provider names include:

| Provider     | Example                                                            |
| ------------ | ------------------------------------------------------------------ |
| Anthropic    | `sovara replay-keys set anthropic --api-key-env ANTHROPIC_API_KEY` |
| OpenAI       | `sovara replay-keys set openai --api-key-env OPENAI_API_KEY`       |
| Gemini       | `sovara replay-keys set gemini --api-key-env GEMINI_API_KEY`       |
| Azure OpenAI | `sovara replay-keys set azure --api-key-env AZURE_API_KEY`         |

Use the provider name shown in the recorded step when in doubt.

## Set a key from stdin

```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
printf '%s' "$ANTHROPIC_API_KEY" | sovara replay-keys set anthropic --api-key-stdin
```

The CLI intentionally does not accept raw keys as command-line arguments,
because command-line arguments can be saved in shell history or process lists.

## Remove a key

```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
sovara replay-keys unset anthropic
```

## Validation

When possible, Sovara validates a replay key before saving it. If validation
fails, the key is not saved. Check the provider name and make sure the key has
permission to call the model family used by the recorded step.

## Supported replay providers

Direct step rerun works for providers Sovara can call with a normal API key.
Anthropic, OpenAI, Gemini, Azure OpenAI, and many OpenAI-compatible API-key
providers fit that model.

Providers that require cloud request signing or service-account credentials may
still be inspectable but not directly rerunnable from `sovara rerun`.
