Docs
Authentication
Authentication
Learn how to authenticate with Tatry and manage your API keys.
Getting Started
- Sign up at tatry.dev
- Navigate to Settings > API Keys
- Click "Generate New Key"
- Copy and securely store your API key
Using Your API Key
The API key must be included in all requests as a Bearer token in the Authorization header.
Direct Usage
from tatry import TatryRetriever
# Initialize with your API key
client = TatryRetriever(api_key="your-api-key")
# Validate the key
is_valid = client.validate_api_key()
# Validate an API key
curl -H "Authorization: Bearer YOUR_API_KEY" \
-X POST https://api.tatry.dev/v1/auth/validate
# Make an authenticated request
curl -H "Authorization: Bearer YOUR_API_KEY" \
https://api.tatry.dev/v1/auth/keys
Environment Variables
Set your API key as an environment variable:
export TATRY_API_KEY="your-api-key"
Then use in code:
from tatry import TatryRetriever
# Will automatically use TATRY_API_KEY environment variable
client = TatryRetriever()
curl -H "Authorization: Bearer $TATRY_API_KEY" \
https://api.tatry.dev/v1/auth/keys
## Next Steps
- [Authentication API Reference](/docs/reference/authentication.md)