Skip to main content

Authentication

Create a deployment key in the Sutro app under API Keys. Keys are scoped to one deployment.
SUTRO_API_URL accepts the deployment origin with or without /v1. To store both values in ~/.sutro/config.json instead:
The SDK resolves credentials in this order:
  1. Explicit Sutro(api_url=..., api_key=...) values or setters
  2. SUTRO_API_URL and SUTRO_API_KEY
  3. Values saved by sutro login
You can also update the shared client at runtime:
A partial environment pair never borrows its missing value from saved configuration. Changing the deployment URL clears the current key so it cannot be sent to another deployment. Direct API calls use the same key: