Added API config

This commit is contained in:
Sirshendu Ganguly
2026-06-18 16:32:40 +05:30
parent b519527eb4
commit 1110e84c96
+6 -1
View File
@@ -33,7 +33,12 @@ def getRunwareApiHeaders(include_auth=True):
"X-SDK-Version": __version__,
}
if include_auth:
headers["Authorization"] = f"Bearer {os.getenv('RUNWARE_API_KEY')}"
api_key = getAPIKey()
if not api_key:
raise Exception(
"Runware API key is not configured. Add your API key in the Runware API Manager node."
)
headers["Authorization"] = f"Bearer {api_key}"
return headers
BASEFOLDER = Path(__file__).parent.parent.parent