MCPcopy Create free account
hub / github.com/CJackHwang/AIstudioProxyAPI / initialize_keys

Function initialize_keys

api_utils/auth_utils.py:24–29  ·  view source on GitHub ↗

Initializes API keys. Ensures key.txt exists and loads keys.

()

Source from the content-addressed store, hash-verified

22
23
24def initialize_keys():
25 """Initializes API keys. Ensures key.txt exists and loads keys."""
26 if not os.path.exists(KEY_FILE_PATH):
27 with open(KEY_FILE_PATH, "w"):
28 pass # Create an empty file
29 load_api_keys()
30
31
32def verify_api_key(api_key_from_header: str) -> bool:

Callers 1

Calls 1

load_api_keysFunction · 0.85

Tested by 1