Generate and use API keys
API keys authenticate your requests to the Vantage CLI, SDK, and REST API. This guide covers creating a key, using it across different interfaces, and revoking it when no longer needed.
Create an API key
- Click your avatar in the top-right corner and select Account Settings.
- Navigate to the API Keys section.
- Click
Generate New Key. - Copy the key immediately.
API keys are shown only once. If you lose the key, you must generate a new one.
- Store the key securely (for example, in a password manager or environment variable).
Use with the CLI
Authenticate the Vantage CLI with your API key:
vantage login --api-key YOUR_API_KEY
Alternatively, set the environment variable:
export VANTAGE_API_KEY=YOUR_API_KEY
vantage cluster list
Use with direct HTTP calls
Pass the key as a Bearer token in the Authorization header:
curl -H "Authorization: Bearer YOUR_API_KEY" \
https://api.vantage.omnivector.solutions/v1/reference/clusters
A successful request returns a JSON response. A 401 Unauthorized response means the key is invalid or expired.
Use with the SDK
Pass the key when initializing the SDK client:
from vantage_sdk import VantageClient
client = VantageClient(api_key="YOUR_API_KEY")
clusters = client.clusters.list()
Or use the environment variable (VANTAGE_API_KEY) and the SDK picks it up automatically.
Revoke a key
- Navigate to Account Settings > API Keys.
- Click the revoke icon next to the key you want to invalidate.
- Confirm the revocation.
Revoked keys stop working immediately. Any CLI sessions, SDK clients, or integrations using the key will receive 401 errors.
Rotate API keys periodically. Create the new key first, update your integrations, then revoke the old key to avoid downtime.