Skip to main content
Authenticate with Runpod and save your API key for all Flash operations, including CLI commands and standalone @Endpoint functions.
flash login [OPTIONS]

Example

Authenticate with Runpod (opens browser automatically):
flash login
The command opens your default browser to the Runpod authorization page. After you approve the request, your API key is saved locally for future CLI operations.

How it works

  1. Flash generates an authorization request.
  2. Your browser opens to the Runpod console authorization page.
  3. You approve the request in your browser.
  4. Flash saves your API key to ~/.runpod/credentials.toml.

Flags

--no-open
Don’t automatically open the browser. Instead, manually copy the authorization URL and open it yourself.
--timeout
float
default:"600"
Maximum time in seconds to wait for authorization. Default is 600 seconds (10 minutes).

Credential storage

After successful login, your API key is saved to ~/.config/runpod/credentials.toml. This file is used by:
  • All Flash CLI commands (flash run, flash deploy, etc.)
  • Standalone Python scripts using @Endpoint functions
  • Any code using the Flash SDK
Keep your API key secure. Never commit it to version control. The credentials file is stored in your home directory, outside of project directories.

Alternative: Environment variable authentication

Instead of using flash login, you can set your API key directly as an environment variable:
export RUNPOD_API_KEY=your_api_key_here
Or add it to your project’s .env file:
RUNPOD_API_KEY=your_api_key_here
You can generate an API key with the correct permissions from Settings > API Keys in the Runpod console.
Your Runpod API key needs All access permissions to your Runpod account.