zai2api / .env.example
xiaoyi7894's picture
Deploy zai2api to Hugging Face Space
b65f9e0
# Public bind address for Docker Compose
BIND_HOST=127.0.0.1
HOST_PORT=8000
# Public container image
ZAI2API_IMAGE=ghcr.io/orbitoo/zai2api:latest
# Optional local data directory bind mount
DATA_DIR=./data
# Server logging
LOG_LEVEL=info
# Upstream target
ZAI_BASE_URL=https://chat.z.ai
DEFAULT_MODEL=glm-5
REQUEST_TIMEOUT=120
# Optional single-account fallback credentials
# Used when there are no enabled persisted accounts in the database.
# ZAI_JWT=your-zai-jwt
# ZAI_SESSION_TOKEN=your-zai-session-token
# Admin panel password
# PANEL_PASSWORD has higher priority, ADMIN_PASSWORD is kept as an alias.
# If both are omitted, the backend falls back to: 123456
PANEL_PASSWORD=123456
# ADMIN_PASSWORD=123456
# OpenAI-compatible API password
# If omitted, API auth is disabled.
# API_PASSWORD=change-me
# Persistence
DATABASE_PATH=data/zai2api.db
LOG_RETENTION_DAYS=7
# Admin session cookie
ADMIN_COOKIE_NAME=zai2api_admin_session
ADMIN_SESSION_TTL_HOURS=168
ADMIN_COOKIE_SECURE=false
# Background account health polling interval in seconds
ACCOUNT_POLL_INTERVAL_SECONDS=300