haraberget commited on
Commit
7155a3e
·
verified ·
1 Parent(s): d15c3c8

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -1
app.py CHANGED
@@ -5,7 +5,12 @@ import requests
5
  # CONFIG
6
  # -----------------------------
7
  SUNO_API_BASE = "https://api.sunoapi.org"
8
- API_KEY = "YOUR_API_KEY_HERE" # set via env in real use
 
 
 
 
 
9
 
10
  HEADERS = {
11
  "Authorization": f"Bearer {API_KEY}",
 
5
  # CONFIG
6
  # -----------------------------
7
  SUNO_API_BASE = "https://api.sunoapi.org"
8
+ import os
9
+
10
+ API_KEY = os.getenv("SunoKey")
11
+
12
+ if not API_KEY:
13
+ raise RuntimeError("Missing SunoKey environment variable")
14
 
15
  HEADERS = {
16
  "Authorization": f"Bearer {API_KEY}",