sums001/Windows-Copilot-API

An unofficial, OpenAI-compatible REST wrapper for the Windows Copilot interface, for experimentation and research. Access to GPT-4 and GPT-5 models.

What it solves

It lets you use your free Microsoft Copilot account as a programmatically accessible API without paying for API credits or having an API key. It solves the problem of needing to access LLM capabilities in code while avoiding the cost and setup of commercial APIs. It also works in regions where anonymous Copilot is blocked by using your signed-in account.

How it works

The project uses your Microsoft (or Google) account to sign in to Copilot once and stores the session locally. It then talks directly to the Copilot backend over HTTP, using a WebSocket to Microsoft's substrate service. It provides two interfaces: a Python client (CopilotClient) for direct use, and a local server that mimics the OpenAI API format, so any OpenAI-compatible client can be pointed at localhost. The server serializes requests because a single Copilot account can't handle concurrent conversations, and it enforces rate limiting to avoid overloading the free tier.

Who it's for

Developers who want to use a free LLM in their projects without paying for API access, especially those who already have a Microsoft account. It's also useful for people in regions where anonymous Copilot is blocked. It's for personal use, not high-throughput production, and requires that you're comfortable with an unofficial project that might break if Microsoft changes things.

Highlights

  • Free: uses your existing Copilot account, no API key or credits required.
  • OpenAI-compatible: a local server at localhost:8000/v1 that works with the official openai SDK.
  • Streaming and multi-turn conversations: supports token-by-token output and conversation IDs.
  • Simple sign-in: one browser login, session saved and automatically refreshed.
  • Cross-platform: works on Windows, macOS, and Linux.

Related

  • Project
  • Project
  • Project
  • Project