← all repositories
sums001/Windows-Copilot-API

Your free Copilot account, re-routed as a local OpenAI API

It turns the consumer Copilot web chat into a self-hosted, keyless LLM endpoint you can point any OpenAI client at.

Windows-Copilot-API
Collecting fresh signals — velocity needs a few days of history.
collecting data…
star history

What it does

Windows-Copilot-API is an unofficial bridge that logs into your personal Microsoft Copilot account via browser automation, then exposes the chat session as a local REST API. It ships as both a Python library with streaming support and a FastAPI server that mimics the OpenAI /v1/chat/completions format, so existing SDKs work by simply swapping the base URL to localhost. You authenticate once in a visible browser; after that, tokens refresh automatically and your session stays local.

The interesting bit

The project treats Copilot’s consumer web interface as a free, unbilled compute backend, complete with a built-in token-bucket rate limiter to keep your account from getting throttled. Because Copilot’s backend serializes conversations per account, the server deliberately queues parallel requests behind a lock rather than pretending to scale—honest engineering for what is essentially polite scraping.

Key highlights

  • Drop-in OpenAI compatibility: point the official openai SDK at http://localhost:8000/v1 and it just works.
  • No API keys or credits: uses your existing free Microsoft account; session cookies stay in a local, git-ignored folder.
  • Auto session refresh: sign in once via Playwright; the bridge handles token renewal silently after that.
  • Self-protecting rate limits: defaults to 12 requests per minute with a burst of 4, returning standard 429 codes to keep upstream happy.
  • Cross-platform: runs on Windows, macOS, and Linux under Python 3.9+.

Caveats

  • Throughput is intentionally serial: stress tests show 4 concurrent requests is the practical ceiling before Copilot returns 502 errors.
  • Only one model is exposed—copilot—and the README benchmarks it at roughly GPT-4 class (40.9% on GPQA Diamond), not a reasoning-tier model.
  • This is consumer-account automation, not an official API; it can break if Microsoft changes the web UI or auth flow.

Verdict

Worth a look if you want a free, private LLM backend for personal scripts or local agents without signing up for another API plan. Skip it if you need reliable throughput, SLAs, or anything resembling production infrastructure.

heatdrop uses Google Analytics to see which pages get read — nothing else. Your call. How we handle data.