Spaces:
Running
Running
API Key Setup Instructions
Generated API Key
c5fd7c64cf05a6cbfae3a8cdc4edb25fa4735b324489776fdcf114aefba12748
Steps to Add to HuggingFace Spaces:
- Go to your HuggingFace Space: https://huggingface.co/spaces/garyboon/visualisable-ai-backend
- Click on "Settings" (gear icon) in the top right
- Scroll down to "Repository secrets"
- Click "New secret"
- Add:
- Name:
API_KEY
- Value:
c5fd7c64cf05a6cbfae3a8cdc4edb25fa4735b324489776fdcf114aefba12748
- Name:
- Click "Add new secret"
Frontend Configuration
Add this API key to your frontend environment variables:
For Vercel:
- Go to your Vercel project settings
- Navigate to Environment Variables
- Add:
- Name:
NEXT_PUBLIC_API_KEY
- Value:
c5fd7c64cf05a6cbfae3a8cdc4edb25fa4735b324489776fdcf114aefba12748
- Name:
For local development:
Create .env.local
in your frontend directory:
NEXT_PUBLIC_API_KEY=c5fd7c64cf05a6cbfae3a8cdc4edb25fa4735b324489776fdcf114aefba12748
NEXT_PUBLIC_API_URL=https://garyboon-visualisable-ai-backend.hf.space
Testing the API Key
Once configured, test with:
curl -H "X-API-Key: c5fd7c64cf05a6cbfae3a8cdc4edb25fa4735b324489776fdcf114aefba12748" \
https://garyboon-visualisable-ai-backend.hf.space/health
Should return the health status if the key is correctly configured.