Skip to Content

API Keys

API keys authenticate your SDK, CLI, and GitHub Action requests to the LaunchGate API.

Creating an API key

  1. Sign in to the LaunchGate dashboard 
  2. Navigate to Settings → API Keys
  3. Click Create API Key
  4. Copy the key immediately — it will only be displayed once

API keys are shown in plaintext only at creation time. After that, only the first 8 characters (key_prefix) are visible. Store your key securely.

Key format

All LaunchGate API keys follow this format:

lg_live_a1b2c3d4e5f6...
  • Prefix: lg_live_ (live keys) or lg_test_ (test keys)
  • The key is bcrypt-hashed before storage — LaunchGate never stores your key in plaintext

Setting your API key

export LAUNCHGATE_API_KEY=lg_live_your_key_here

The SDK and CLI automatically read from the LAUNCHGATE_API_KEY environment variable.

SDK configuration

const lg = new LaunchGate({ apiKey: "lg_live_your_key_here", });

CLI flag

launchgate run my-suite --api-key lg_live_your_key_here --output "..."

Configuration file

Create a .launchgaterc file in your project root or home directory:

.launchgaterc
{ "apiKey": "lg_live_your_key_here", "baseUrl": "https://api.launchgate.ai" }

Resolution order

The API key is resolved in this priority order:

  1. Explicit parameter (SDK constructor or CLI --api-key flag)
  2. LAUNCHGATE_API_KEY environment variable
  3. .launchgaterc file in current directory
  4. .launchgaterc file in home directory

Security best practices

  • Never commit API keys to version control
  • Use environment variables or secret managers in CI/CD
  • Rotate keys periodically in Settings → API Keys
  • Use separate keys for development and production environments
  • Revoke compromised keys immediately from the dashboard
Last updated on