Practical overview
When it fits
Use it when integrating consumer Copilot chat into a script or an OpenAI-compatible client, and you can sign in through its browser-based setup.
Who it is for
- Python developers who want to call Copilot chat from scripts.
- Developers using OpenAI-compatible clients or applications who want to direct chat requests to a local endpoint.
Documented uses
- Send prompts to Copilot from Python code.
- Connect an OpenAI-format chat client to the local `/v1` endpoint.
- Stream answers and continue a conversation by passing its conversation ID.
Requirements & limits
Requires an account sign-in through a browser; the README supports Microsoft or Google accounts and says the session is saved locally. The repository is MIT-licensed.
- The project automates the consumer Copilot web experience and is explicitly unofficial, not affiliated with or endorsed by Microsoft.
- The API-key field required by the OpenAI SDK is ignored; requests rely on the saved account session.
- Docker requires host-based browser sign-in, and its headless container cannot obtain fresh Cloudflare clearance when the existing clearance expires.
- Setup requires Python 3.9 or later and Playwright's Chromium browser.
Check current requirements in the official documentation. Source-based guidance does not mean OpenViST has run or independently tested this project.
Set up a signed-in local session
Install the project dependencies and complete browser sign-in so the saved session is available for later use.
Before you start
- Python 3.9 or later
- A Microsoft or Google account
- A visible browser for the Playwright sign-in flow
Steps
Clone the repository and change into its directory.
Create and activate a Python virtual environment.
Install requirements with the command below and install Chromium with
playwright install chromium.pip install -r requirements.txtRun the command below and complete sign-in in the browser.
python -m copilot login
Expected outcome
The project saves a signed-in session under `session/` for reuse on subsequent runs.
Guide limitations
- The project describes its automation as an unofficial use of the consumer Copilot web experience and advises use within Microsoft's terms.
- The first login may require completing a human-verification checkbox in the visible browser.
Sources & review
Source record details
- Source availability
- Active
- Sources checked
- 11 October 2026
- Original website title
- sums001/Windows-Copilot-API · Official homepage title · retained in its source language

