-
Setup env: cp .env.example .env
-
Login: docker compose run --rm --service-ports chatmock-login login
- The command prints an auth URL, copy paste it into your browser.
- If your browser cannot reach the container's localhost callback, copy the full redirect URL from the browser address bar and paste it back into the terminal when prompted.
- Server should stop automatically once it receives the tokens and they are saved.
-
Start the server: docker compose up -d chatmock
-
Free to use it in whichever chat app you like!
Set options in .env or pass environment variables:
PORT: Container listening port (default 8000)CHATMOCK_IMAGE: image tag to run (defaultstoragetime/chatmock:latest)VERBOSE:true|falseto enable request/stream logsCHATGPT_LOCAL_REASONING_EFFORT: minimal|low|medium|high|xhighCHATGPT_LOCAL_REASONING_SUMMARY: auto|concise|detailed|noneCHATGPT_LOCAL_REASONING_COMPAT: legacy|o3|think-tags|currentCHATGPT_LOCAL_FAST_MODE:true|falseto enable fast mode by default for supported modelsCHATGPT_LOCAL_CLIENT_ID: OAuth client id override (rarely needed)CHATGPT_LOCAL_EXPOSE_REASONING_MODELS:true|falseto add reasoning model variants to/v1/modelsCHATGPT_LOCAL_ENABLE_WEB_SEARCH:true|falseto enable default web search tool
Set VERBOSE=true to include extra logging for troubleshooting upstream or chat app requests. Please include and use these logs when submitting bug reports.
curl -s http://localhost:8000/v1/chat/completions \
-H 'Content-Type: application/json' \
-d '{"model":"gpt-5-codex","messages":[{"role":"user","content":"Hello world!"}]}' | jq .