Skip to main content

Generate and use API keys

Create, use, and revoke API keys for CLI, SDK, and direct HTTP access.

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

  1. Click your avatar in the top-right corner and select Account Settings.
  2. Navigate to the API Keys section.
  3. Click Generate New Key.
  4. Copy the key immediately.
warning

API keys are shown only once. If you lose the key, you must generate a new one.

  1. 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

  1. Navigate to Account Settings > API Keys.
  2. Click the revoke icon next to the key you want to invalidate.
  3. Confirm the revocation.

Revoked keys stop working immediately. Any CLI sessions, SDK clients, or integrations using the key will receive 401 errors.

tip

Rotate API keys periodically. Create the new key first, update your integrations, then revoke the old key to avoid downtime.

Ask AI
Ask a question about Vantage Compute...