3,701 prompts from top AI collections
← Back to Market
[UNTESTED] [whtsky/copilot2api] 3 endpoint(s)
ChatGPT API Proxy/ChatGPT
2,193 characters
Status: [UNTESTED] Endpoints found: http://localhost:7777/v1/chat/completions http://localhost:7777/v1/messages http://localhost:7777/v1/models Source: https://github.com/whtsky/copilot2api # copilot2api A lightweight Go proxy that exposes GitHub Copilot as OpenAI-compatible, Anthropic-compatible, Gemini-compatible, and AmpCode-compatible API endpoints. ## Features - **OpenAI API Compatible**: `/v1/chat/completions`, `/v1/models`, `/v1/embeddings`, `/v1/responses` - **Embeddings Support**: Native OpenAI-compatible `/v1/embeddings` endpoint - **Anthropic API Compatible**: `/v1/messages` - **Gemini API Compatible**: `/v1beta/models`, `/v1beta/models/{model}:generateContent`, `/v1beta/models/{model}:streamGenerateContent`, `/v1beta/models/{model}:countTokens` - **AmpCode Compatible**: `/amp/v1/*` routes for chat, `/api/provider/*` for provider-specific calls, management proxied to `ampcode.com` - **Streaming Support**: Full SSE streaming for both OpenAI and Anthropic formats - **Anthropic Routing**: Uses native `/v1/messages` when the model supports it, otherwise routes via `/responses` or `/chat/completions` - **Auto Authentication**: GitHub Device Flow OAuth with automatic token refresh - **Usage Monitoring**: Built-in `/usage` endpoint for quota tracking - **Models Cache**: 5-minute cache for `/v1/models` and Anthropic model capability lookups ## Quick Start ### Docker ```bash docker run -it --rm \ -p 127.0.0.1:7777:7777 \ -v ~/.config/copilot2api:/root/.config/copilot2api \ ghcr.io/whtsky/copilot2api:latest ``` The volume mount persists your GitHub credentials across container restarts. The examples publish the port on `127.0.0.1` only so the proxy stays local by default. <details> <summary>Docker Compose</summary> ```yaml services: copilot2api: image: ghcr.io/whtsky/copilot2api:latest ports: - "127.0.0.1:7777:7777" volumes: - ${HOME}/.config/copilot2api:/root/.config/copilot2api ``` Start it with: ```bash docker compose up ``` </details> ### Download a release binary ```bash # Example: macOS Apple Silicon curl -L -o copilot2api \ https://github.com/whtsky/copilot2api/releases/latest/download/copilot2api
Download .txt