For the complete documentation index, see llms.txt. This page is also available as Markdown.

API Key Management

API key management — secure storage, environment variables,.env files, rotation.

This guide covers best practices for securely managing your Stratix API keys throughout the development lifecycle.

API Key Security Fundamentals

What Makes API Keys Sensitive

API keys are sensitive credentials that provide access to your Stratix organization and projects. They should be treated with the same level of security as passwords or other authentication tokens.

Risks of compromised API keys:

  • Unauthorized access to your evaluations and data

  • Unintended usage charges on your account

  • Potential data breaches or intellectual property theft

  • Abuse of your API quotas and rate limits

API Key Best Practices

  1. Never hardcode API keys in source code

  2. Use environment variables or secure credential stores

  3. Rotate keys regularly

  4. Use different keys for different environments

  5. Monitor key usage and access patterns

  6. Revoke unused or compromised keys immediately

Secure API Key Storage

Good — using environment variables:

Setting Environment Variables Securely

Linux/macOS:

Windows:

Using.env Files

Create a.env file (never commit this to version control):

Load.env file in Python:

Important: Add .env to your .gitignore file:

See Also

Last updated

Was this helpful?