Coxy Logo

GitHub Copilot as OpenAI-compatible APIs

Coxy is a lightweight proxy that lets you use your free GitHub Copilot quota with any OpenAI-compatible client, freeing the power of modern LLMs from your VS Code editor.

Coxy demo

Why Coxy?

You have a lot of free quota on GitHub Copilot, you want to use it like OpenAI-compatible APIs.

You want the computing power of GitHub Copilot beyond VS Code.

You want to use modern models like gpt-4.1 free.

You have multiple GitHub accounts and the free quota is just wasted.

Host LLM locally and leave the computing remotely.

Features

Proxy API Endpoints: Supports /chat/completions and /models endpoints.

User-Friendly Admin UI: Easily log in with GitHub to generate and manage tokens, view usage statistics, and evaluate models with a built-in chatbot.

Broad Compatibility: Works seamlessly with OpenAI clients, LLM CLI, and Open WebUI.

Use Cases

Local LLMs
Integrate Coxy with your local LLM setup for powerful, remote computing.
Open WebUI
Chat with GitHub Copilot using the user-friendly Open WebUI interface.
LLM CLI
Use Coxy with LLM CLI to interact with the models directly from your command line.

Getting Started

1. Installation

Option 1: Use Docker

docker run -p 3000:3000 ghcr.io/coxy-proxy/coxy:latest

Option 2: Use pnpx (recommended) or npx

pnpx coxy

2. Setup

Browse http://localhost:3000 to generate or add tokens manually. Set a default token from the admin UI.

3. Quick Test Example

Your OpenAI-compatible API base URL is http://localhost:3000/api. Test it with curl:

curl --request POST --url http://localhost:3000/api/chat/completions --header 'content-type: application/json' --data '{"model": "gpt-4","messages": [{"role": "user", "content": "Hi"}]}'

Troubleshooting

GPT-5-mini 400 Error
Make sure you have enabled "OpenAI GPT-5 mini" in your GitHub account Copilot settings. The URL is https://github.com/settings/copilot/features.
Fail to load API keys
Ensure you have the SQLite DB file and have provisioned it correctly.
Podman Localhost Issue
If you cannot access via localhost:3000, try using 127.0.0.1:3000 instead.

Resources

References
Useful links to related projects and packages
GitHub Repository

Explore the full source code and contribute on official GitHub repository coxy-proxy/coxy.