Skip to content

利用 AI 大模型和自动化工作流,根据主题或关键词一键生成高清短视频。Generate HD short videos from a topic or keyword with an automated AI workflow.

optimize pexels_api_keys config

harrya5f208f951a6
diff --git a/app/services/material.py b/app/services/material.py
index f9c108e5..29f61eb4 100644
--- a/app/services/material.py
+++ b/app/services/material.py
@@ -17,6 +17,10 @@ if not pexels_api_keys:
def round_robin_api_key():
+ # if only one key is provided, return it
+ if isinstance(pexels_api_keys, str):
+ return pexels_api_keys
+
global requested_count
requested_count += 1
return pexels_api_keys[requested_count % len(pexels_api_keys)]