LLM API
GuidesCoding Assistants

GitHub Copilot Integration

Connect GitHub Copilot to LLM API for AI-powered capabilities

GitHub Copilot is an AI pair programmer that integrates into popular IDEs. It provides real-time code suggestions, chat-based assistance, and agent capabilities powered by large language models from multiple providers.

GitHub Copilot supports bring-your-own-key configurations through GitHub Models, letting you use your own API keys for supported providers.

Prerequisites

  • An LLM API account with an API key
  • GitHub Copilot installed or accessible

Setup

Get Your LLM API Key

  1. Log in to your LLM API dashboard
  2. Click Create Key to Start
  3. Copy your new API key immediately — it will only be shown once
  4. Store the key securely (e.g., in a password manager or .env file)

LLM API is an OpenAI-compatible gateway that gives you access to dozens of AI models through a single API key and endpoint.

Use Custom API Keys with GitHub Copilot

  1. Navigate to github.com/settings/copilot.
  2. Under "Model provider keys," click "Add key".
  3. Select the provider and enter:
    • API Key: paste the key you copied from app.llmapi.ai/api-keys
  4. Configure the endpoint if prompted:
  5. Click "Save" to store the key.
  6. Select the model in your IDE's Copilot settings.

Test the Integration

Verify that GitHub Copilot can successfully communicate with LLM API by sending a test request. All requests will now be routed through LLM API.

GitHub Copilot's BYOK feature is available for GitHub Enterprise and select plans. Check your plan's eligibility.

Benefits of Using LLM API with GitHub Copilot

  • Multi-Provider Access: Use models from OpenAI, Anthropic, Google, and more through a single API
  • Cost Control: Track and limit your AI spending with detailed usage analytics
  • Unified Billing: One account for all providers instead of managing multiple API keys
  • Caching: Reduce costs with response caching for repeated requests

View all available models on the models page.

How is this guide?