-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.env.example
More file actions
47 lines (36 loc) · 2.12 KB
/
Copy path.env.example
File metadata and controls
47 lines (36 loc) · 2.12 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
# ============================================
# zai-image-proxy — Environment Configuration
# ============================================
# ── Required Variables ───────────────────────────────────────
# Session token from image.z.ai (browser cookies → "session")
Z_IMAGE_SESSION=your_session_token_here
# Chat token from chat.z.ai for automatic session renewal (browser cookies → "token")
Z_CHAT_TOKEN=your_chat_token_here
# API key for all protected endpoints
# ⚠️ If left empty, endpoints will be unprotected (local dev only)
API_KEY=sk-your-api-key-here
# Custom User-Agent for requests to Z.AI (optional)
# If left empty, the proxy will rotate randomly through a pool of realistic UAs
# Z_USER_AGENT=
# Server port
PORT=3000
# ── Optional: Extra Cookies (WAF bypass) ─────────────────────
# Some Z.AI endpoints require additional cookies
# Z_COOKIE_WBKFRO=
# Z_COOKIE_ACW_TC=
# Z_COOKIE_C=
# Z_COOKIE_SSXMOD=
# Z_COOKIE_SSXMOD2=
# ── Optional: Custom User Agent ──────────────────────────────
# Z_USER_AGENT=Mozilla/5.0 (Windows NT 10.0; Win64; x64) ...
# ── Optional: Rate Limiting ──────────────────────────────────
# RATE_LIMIT_MAX=30 # Max requests per window per IP
# RATE_LIMIT_WINDOW_MS=60000 # Window duration in ms
# ── Optional: Timeouts ───────────────────────────────────────
# GENERATION_TIMEOUT=180000 # Image generation timeout (ms)
# DOWNLOAD_TIMEOUT=30000 # Image download timeout (ms)
# REQUEST_TIMEOUT=180000 # Incoming HTTP request timeout (ms)
# ── Optional: System ─────────────────────────────────────────
# PUBLIC_URL=https://your-public-url.com
# LOG_LEVEL=info # debug | info | warn | error
# CORS_ORIGINS=* # Comma-separated origins, or *