auth
Manage API key authentication. An API key is optional — without one, requests are rate-limited.
zora auth [command]Subcommands
| Subcommand | Description |
|---|---|
auth configure | Save an API key |
auth status | Check current authentication status |
Options
auth configure accepts --yes to skip the interactive prompt. Both subcommands accept the global --json flag.
| Flag | Subcommand | Description |
|---|---|---|
--yes | auth configure | Skip the interactive prompt and execute directly |
--json | both | Machine-readable JSON output |
Get an API Key
Get a key at zora.co/settings/developer. The key is stored at ~/.config/zora/config.json with restricted permissions.
Examples
Save an API key
npx @zoralabs/cli auth configure Get your API key from: https://zora.co/settings/developer
Paste your API key: ********
API key saved to ~/.config/zora/config.jsonWith --json, a successful save returns:
{ "saved": true, "path": "~/.config/zora/config.json" }If ZORA_API_KEY is set in the environment, configure reports that the key is set via the environment variable and does not write to the config file:
{
"status": "env_override",
"message": "API key is set via ZORA_API_KEY environment variable."
}Check authentication status
npx @zoralabs/cli auth status Authenticated
Key f7c3502c...3458
Source ~/.config/zora/config.jsonJSON output
npx @zoralabs/cli auth status --json{
"authenticated": true,
"key": "f7c3502c...3458",
"source": "~/.config/zora/config.json"
}When no key is configured:
{
"authenticated": false
}Environment Variable
The ZORA_API_KEY environment variable takes precedence over the config file. When the key comes from the environment, source is reported as env (ZORA_API_KEY):
export ZORA_API_KEY=your-key-here
npx @zoralabs/cli auth status --json{
"authenticated": true,
"key": "your-key...here",
"source": "env (ZORA_API_KEY)"
}