Troubleshoot Configuration
Fix common issues you may encounter when configuring the SDK, like a missing API key or commands that use the wrong environment.
Add --verbose (or -v) before the command name to see the SDK's INFO and DEBUG logs. It's a global option, so it must come before the command, not after.
"API key is required"
Run haystack-enterprise login, set the environment variable, or pass --api-key. For help, see Set Up Configuration.
If you logged in and you're still seeing this error, a local .env in the directory you're running from may be shadowing the global one. The local file takes precedence.
Commands Use the Wrong Environment
API_URL resolved to something unexpected. The same precedence applies: an API_URL in your shell takes precedence over a local .env, which takes precedence over the global one. A trailing /api/v1 is stripped automatically, so pasting a full endpoint URL is safe.
haystack-enterprise: command not found
The scripts directory of the environment you installed into isn't on your PATH. After uv tool install, add the uv tools directory (often ~/.local/bin) to your PATH, or run uv tool update-shell. python -m haystack_enterprise_sdk.cli works only if that Python environment has the SDK installed. For help, see Install the SDK and Troubleshoot Installation.
Related Information
Was this page helpful?