Download deploy/zai2api.service from bg5/zai2api: direct link, hf CLI and curl.
- Browser
- Download file 640 Bytes
-
https://huggingface.co/spaces/bg5/zai2api/resolve/main/deploy/zai2api.service
- Command line
-
hf download hf://spaces/bg5/zai2api/deploy/zai2api.service
-
curl -L -o zai2api.service https://huggingface.co/spaces/bg5/zai2api/resolve/main/deploy/zai2api.service
640 Bytes
| [Unit] | |
| Description=zai2api - Z.AI to OpenAI API proxy | |
| After=network.target zai-captcha-provider.service | |
| Requires=zai-captcha-provider.service | |
| [Service] | |
| Type=simple | |
| ExecStartPre=-/usr/bin/docker rm -f zai2api | |
| ExecStart=/usr/bin/docker run --rm --name zai2api \ | |
| --network host \ | |
| -v /opt/zai2api/data:/app/data \ | |
| -e PORT=8000 \ | |
| -e AUTH_TOKEN=your-api-key \ | |
| -e BACKUP_TOKEN=your-zai-jwt-token \ | |
| -e CAPTCHA_PROVIDER_URL=http://127.0.0.1:9876 \ | |
| -e RETRY_COUNT=2 \ | |
| -e LOG_LEVEL=info \ | |
| zai2api:latest | |
| ExecStop=/usr/bin/docker stop zai2api | |
| Restart=always | |
| RestartSec=5 | |
| [Install] | |
| WantedBy=multi-user.target | |