Skip to main content
nodepick.ai uses API key authentication for all programmatic access and CLI operations. Every request you make through the Python CLI (np), Python SDK, or HTTP API requires a valid API key.

Generating an API Key

You generate API keys from the nodepick.ai dashboard. Follow these steps:
  1. Register at nodepick.ai and log in.
  2. Set up your credit card in the dashboard.
  3. In the left-hand navigation, open Developer, then go to API Keys.
  4. Click Generate and give the key a descriptive name (for example, dev or ci-pipeline).
  5. Copy and save the key immediately — it will not be shown again after you leave the page.
You can create multiple keys for different environments or applications and revoke any of them independently from the same settings page.

Python CLI Authentication (np auth)

The np command-line tool provides built-in authentication commands to store, test, and clear your credentials securely in your operating system’s keyring.

Configure Credentials (np auth configure)

Run np auth configure to save your API key securely into your OS keyring. When prompted, paste your API key:
The CLI securely stores your API key using the OS keyring (nodepick-cli service).

Custom API Base URL

If you need to target a custom API endpoint, pass the --base-url (-u) option:

Test API Access (np auth test)

Verify your stored credentials and display your user and organization information:

Example Output

Clear Credentials (np auth clear)

Remove the stored API key from your OS keyring:

Non-Interactive Authentication (Environment Variable)

For CI/CD workflows, automated scripts, or headless environments, set the NODEPICK_API_KEY environment variable:
The CLI will automatically detect and use NODEPICK_API_KEY if present, overriding any key stored in the OS keyring.

Python API / SDK Authentication

When using the nodepick Python SDK, pass your API key directly when initializing the client.

Initialize with Explicit API Key

Every SDK method called on client automatically includes your key in the request headers. To avoid hardcoding secrets in your source code, load your API key from an environment variable:

Using Context Manager

You can also use the client as a context manager (with block) to ensure connections close automatically:

HTTP API Bearer Token

If you are calling the REST API directly from tools like curl, Postman, or other languages, include your API key as a Bearer token in the Authorization header:

Keeping Your API Key Secure

Never commit your API key to source code or check it into version control. If a key is exposed in a public repository, revoke it immediately from Developer Settings and generate a new one.
  • Use .env files: For local development, store secrets in a .env file and load them with python-dotenv.
  • Add to .gitignore: Ensure .env is listed in your .gitignore file.
  • Rotate Compromised Keys: If a key is compromised, generate a replacement in Developer Settings > API Keys, update your applications, and delete the old key.

Next Steps

Create a Node

Provision a new compute node using the Python CLI, SDK, or HTTP API.

Manage Nodes

List, inspect, control power, and delete compute nodes.