File size: 1,324 Bytes
96a6300
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
# API Key Setup Instructions

## Generated API Key
```
c5fd7c64cf05a6cbfae3a8cdc4edb25fa4735b324489776fdcf114aefba12748
```

## Steps to Add to HuggingFace Spaces:

1. Go to your HuggingFace Space: https://huggingface.co/spaces/garyboon/visualisable-ai-backend
2. Click on "Settings" (gear icon) in the top right
3. Scroll down to "Repository secrets"
4. Click "New secret"
5. Add:
   - Name: `API_KEY`
   - Value: `c5fd7c64cf05a6cbfae3a8cdc4edb25fa4735b324489776fdcf114aefba12748`
6. Click "Add new secret"

## Frontend Configuration

Add this API key to your frontend environment variables:

### For Vercel:
1. Go to your Vercel project settings
2. Navigate to Environment Variables
3. Add:
   - Name: `NEXT_PUBLIC_API_KEY`
   - Value: `c5fd7c64cf05a6cbfae3a8cdc4edb25fa4735b324489776fdcf114aefba12748`

### 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:
```bash
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.