Turn Microsoft Copilot into a free OpenAI API — 550+ stars in 5 days
👤 Who This Is For
Ever wonder why Microsoft Copilot's web interface gives you free access to GPT-4 and GPT-5, but there's no API you can actually call? sums001 wondered the same thing — and then went ahead and reverse-engineered Windows Copilot.
Here's the clever part: this project turns your own Copilot session at copilot.microsoft.com into a fully OpenAI-compatible local API. You sign in once with your Microsoft account, the session gets saved and auto-refreshed, and then it spins up a local server at `http://localhost:8000/v1` that speaks the exact same format as OpenAI's API. Change your base URL from OpenAI to localhost, and everything just works.
Two usage modes, both practical: use it as a Python library (one line: `client.chat("Hi")`, with streaming and multi-turn support), or run it as a local API server that any OpenAI-compatible app can plug into.
What I find interesting about this project is its shameless cleverness — it's essentially «legally leeching» the free Copilot quota Microsoft gives to consumers. The author is upfront about it being unofficial, and advises using it responsibly within Microsoft's terms.
For indie developers, this is genuinely valuable: prototyping, small scripts, cost-sensitive scenarios where latency isn't critical. 553 stars and 207 forks in 5 days tells you the community gets it. Just keep in mind it depends on Copilot's web interface — if Microsoft changes things on their end, the project will need to catch up.
Get Started
Open Source · Commercial Friendly
pip install windows-copilot-api