Sign inSign up

etordera/copilot-api

By etordera

•Updated 10 months ago

Turn GitHub Copilot into OpenAI/Anthropic API compatible server.

Image
Machine learning & AI
0

2.6K

etordera/copilot-api repository overview

⁠Overview

A reverse-engineered proxy for the GitHub Copilot API that exposes it as an OpenAI and Anthropic compatible service. This allows you to use GitHub Copilot with any tool that supports the OpenAI Chat Completions API or the Anthropic Messages API.

Created from this GitHub project: https://github.com/ericc-ch/copilot-api⁠

⁠Requirements

You need a GitHub Copilot account.

⁠Usage

⁠Create GitHub Copilot token

You will need to authenticate against GitHub Copilot servers and get an access token:

docker run --rm -it --entrypoint bun etordera/copilot-api run dist/main.js auth --show-token

Follow instructions and copy the generated token.

⁠Run the server
docker run --rm -d --name copilot-api -p 4141:4141 \
  -e GH_TOKEN="your-token-here" \
  etordera/copilot-api
⁠Test the server
curl http://localhost:4141/v1/chat/completions \
  -H "Content-Type: application/json" \
  -d '{
    "model": "gpt-4o",
    "messages": [
      {"role": "user", "content": "Hello! What can you do?"}
    ]
  }'
⁠Follow the server logs
docker logs -f copilot-api
⁠Stop the server
docker stop copilot-api

Tag summary

Content type

Image

Digest

sha256:1d4cde87b…

Size

58.9 MB

Last updated

10 months ago

docker pull etordera/copilot-api