# Development medical API onboarding This invitation grants only the text API, no SSH, VPN, desktop or general server account. No fixed IP or inbound port is needed. Network changes work automatically on the next request. This is development/testing access: use synthetic data. No clinical quality or production certification is claimed. Security: TLS verifies medical.polymorphic.group. Your device generates a P-256 key locally; the private key never goes to the service. Every API request is signed with its exact body, destination, timestamp and unique nonce. The invitation expires after 24 hours, binds once to one key, and access expires seven days after enrolment. Both invitation and device access can be revoked by the operator. The password is supplemental to the strong random invitation. Never paste private keys, invitation or password into shared logs or source control. ## Windows 11 Pro and Windows Server Use supported Python 3.11 or newer from python.org (verify its Microsoft Authenticode publisher before installation). No OpenSSH or VPN installation is required. Use a private folder under your own user profile. In PowerShell: py -3 -m venv .venv .\.venv\Scripts\python.exe -m pip install cryptography==46.0.3 Invoke-WebRequest https://medical.polymorphic.group/medical_client.py -OutFile medical_client.py Get-FileHash .\medical_client.py -Algorithm SHA256 Compare the hash to the value on the HTTPS setup page and inspect the script before execution. pip obtains packages over authenticated TLS from the normal PyPI index; do not substitute unknown package sources or bypass TLS verification. The client restricts its profile configuration directory with an exact DACL for the current Windows user's SID on the directory and credential files; keys are not encrypted against that same user or an administrator. Keep the Windows account and disk protected. .\.venv\Scripts\python.exe medical_client.py enroll .\.venv\Scripts\python.exe medical_client.py models .\.venv\Scripts\python.exe medical_client.py test .\.venv\Scripts\python.exe medical_client.py serve Enter the complete invitation and password at the hidden prompts. Do not put them in command arguments. The connector prints a loopback-only OpenAI-compatible base URL and a random local API key; configure your development application with those values and model qwen3.8-27b. Keep that terminal private. Ctrl+C stops it. Sleep/resume or DHCP changes need no re-enrolment; restart the connector if needed. There is no automatic replay of failed inference. Windows Server: first complete the same interactive tests under the intended dedicated service account. For unattended use create a Task Scheduler task under that account, triggered at startup with network available, working directory set to this private folder, program set to the full venv python.exe path and arguments `medical_client.py serve`. Choose “Do not start a new instance”; keep stdout in an ACL-protected local log so the application owner can retrieve the local API key. The local key changes at restart; integrations must update it. No password or invitation belongs in the task. Stop through Task Scheduler before starting interactively. This optional persistence recipe has not been tested on your particular Windows Server version; the foreground route is the verified protocol. ## Linux Install supported Python 3.11+ and its venv module using the distribution's normal package manager (Ubuntu/Debian: python3-venv; Fedora/RHEL: python3). No root is required for the connector. In a private user folder: umask 077 python3 -m venv .venv .venv/bin/python -m pip install cryptography==46.0.3 curl --fail --proto '=https' --tlsv1.2 https://medical.polymorphic.group/medical_client.py -o medical_client.py sha256sum medical_client.py .venv/bin/python medical_client.py enroll .venv/bin/python medical_client.py models .venv/bin/python medical_client.py test .venv/bin/python medical_client.py serve Compare the checksum on the HTTPS setup page and inspect code. Configuration ~/.medical-development is mode0700 and key files mode0600. For unattended Linux, use a systemd user service with WorkingDirectory to this folder, ExecStart the full venv Python path plus medical_client.py serve, Restart=on-failure, RestartSec=15, UMask=0077, and no duplicated instance. StandardOutput must be private to that user because it contains the local process API key. Login lingering is an explicit administrator choice, unnecessary for foreground testing. Stop with systemctl --user stop for your chosen unit. No external fallback or inbound firewall change. ## Contract and application configuration Base URL comes from the connector, normally http://127.0.0.1:18195/v1. API key is the connector's local random key, never the invitation password. Model: qwen3.8-27b. Endpoint POST /v1/chat/completions; Content-Type application/json. Example: {"model":"qwen3.8-27b","messages":[{"role":"user","content":"Synthetic test: what is 17 multiplied by 23?"}],"max_tokens":128,"temperature":0.2,"stream":false} Read choices[0].message.content. Preserve existing result.rawOutput wrapping and application delivery behavior. Supports only model, messages, max_tokens, temperature and stream:false. Text-only system/user/assistant roles; 64 messages; body64KiB; output tokens1–2048; temperature0–2. No tools/images/streaming. One inference at a time. Per-device10 API calls/minute and500/day (model discovery also counts). No prompt or output logging by the gateway. Device key expiry7days; invitation24hours. Client clock must be correct within60seconds. HTTP400/413/415: fix request. 401: verify clock/key/expiry/revocation. 429: wait before a new request. 503 or timeout: result uncertain, do not automatically replay clinical content or application postbacks. No cloud fallback. `chat --input request.json` supports direct file requests without a running connector. ## Recovery / renewal / revocation Enrolment response lost? Retain the original device-key.pem and rerun enroll with the original invitation within its24h validity: it returns the same device receipt, never binds another key. If device.json already exists, models/test checks the existing registration. Never remove the key or re-enrol merely because a network call failed. A consumed invitation cannot enrol a different device. Contact the operator for explicit revocation/renewal or a locked invitation. Eight wrong-password attempts lock the invitation. After expiry or revocation API requests are rejected. No access renews itself. Platform caveat: server protocol and Linux client tests are verified by the operator; Windows instructions require acceptance on the destination Windows host. Do not claim Windows was tested before running models/test there. Optional service setup is not executed automatically.