mirror of
https://github.com/TheSmallHanCat/flow2api.git
synced 2026-05-08 06:49:25 +08:00
77 lines
2.3 KiB
TOML
77 lines
2.3 KiB
TOML
[global]
|
||
api_key = "han1234"
|
||
admin_username = "admin"
|
||
admin_password = "admin"
|
||
|
||
[flow]
|
||
labs_base_url = "https://labs.google/fx/api"
|
||
api_base_url = "https://aisandbox-pa.googleapis.com/v1"
|
||
timeout = 120
|
||
max_retries = 4
|
||
image_request_timeout = 40
|
||
image_timeout_retry_count = 1
|
||
image_timeout_retry_delay = 0.8
|
||
image_timeout_use_media_proxy_fallback = true
|
||
image_prefer_media_proxy = true
|
||
image_slot_wait_timeout = 900
|
||
image_launch_soft_limit = 25
|
||
image_launch_wait_timeout = 900
|
||
image_launch_stagger_ms = 250
|
||
video_slot_wait_timeout = 480
|
||
video_launch_soft_limit = 20
|
||
video_launch_wait_timeout = 480
|
||
video_launch_stagger_ms = 250
|
||
poll_interval = 3.0
|
||
max_poll_attempts = 200
|
||
|
||
[server]
|
||
host = "0.0.0.0"
|
||
port = 8000
|
||
|
||
[debug]
|
||
enabled = false
|
||
log_requests = true
|
||
log_responses = true
|
||
mask_token = true
|
||
|
||
[proxy]
|
||
proxy_enabled = false
|
||
proxy_url = ""
|
||
|
||
[generation]
|
||
image_timeout = 300
|
||
video_timeout = 1500
|
||
|
||
[call_logic]
|
||
call_mode = "default" # default=随机轮询策略, polling=顺序轮询策略
|
||
|
||
[admin]
|
||
error_ban_threshold = 3
|
||
|
||
[cache]
|
||
enabled = false
|
||
timeout = 7200 # 缓存超时时间(秒), 默认2小时
|
||
base_url = "" # 缓存文件访问的基础URL, 留空则使用服务器地址
|
||
|
||
[captcha]
|
||
captcha_method = "personal" # 打码方式: yescaptcha/browser/personal/remote_browser
|
||
browser_recaptcha_settle_seconds = 1.0 # 打码完成额外稳态等待,速度优先可设 1.0
|
||
browser_launch_background = true # browser 打码默认后台启动(最小化/避免抢占前台)
|
||
|
||
# 内置浏览器打码 (personal) 配置
|
||
# 每个项目(project_id)对应一个常驻标签页,标签页会被复用以提高性能
|
||
# 推荐配置(每个标签约占用200-300MB内存):
|
||
# - 2GB内存: 3个标签
|
||
# - 4GB内存: 5个标签
|
||
# - 8GB内存: 10个标签
|
||
# - 16GB内存: 20个标签
|
||
# 注意:标签数量取决于不同项目的数量,单个项目的并发请求会复用同一个标签页
|
||
personal_max_resident_tabs = 5 # 最大常驻标签页数量
|
||
personal_idle_tab_ttl_seconds = 600 # 标签页空闲超时(秒),超时后自动回收
|
||
|
||
yescaptcha_api_key = "" # YesCaptcha API密钥
|
||
yescaptcha_base_url = "https://api.yescaptcha.com"
|
||
remote_browser_base_url = "http://127.0.0.1:8060" # 本地 token 池服务地址
|
||
remote_browser_api_key = "" # 本地 token 池服务 API Key
|
||
remote_browser_timeout = 35 # 远程有头打码请求超时(秒)
|