# Environment Variables Configuration for Hugging Face Spaces | |
# Copy these to your HF Spaces Settings → Variables | |
# API Key Configuration | |
API_KEY=sk-your-secure-api-key-here | |
# Performance Settings (Optional) | |
NODE_ENV=production | |
PORT=7860 | |
# Security Settings (Optional) | |
MAX_CONCURRENT_REQUESTS=3 | |
CPU_THRESHOLD=95 | |
# Instructions for Hugging Face Spaces: | |
# 1. Go to your Space Settings | |
# 2. Click on "Variables" tab | |
# 3. Add API_KEY variable with your secure key | |
# 4. Space will automatically restart with new configuration | |
# Example API Key Generation: | |
# - Use random strings of 32+ characters | |
# - Include letters, numbers, and optionally symbols | |
# - Keep them secure and don't share publicly | |
# - Consider format: sk-1234567890abcdef... | |
# | |
# Generate with Node.js: | |
# node -e "console.log('sk-' + require('crypto').randomBytes(32).toString('hex'))" | |
# | |
# Generate with Python: | |
# python -c "import secrets; print('sk-' + secrets.token_hex(32))" |