Use ApexApi in GitHub Copilot

Copilot's bring-your-own-key mode lets Copilot Chat run on models outside GitHub's own list. Point it at ApexApi and pick anything from our catalog.

1. Get your API key

Create a key in your dashboard. It starts with ak-.

2. Open the model manager

In VS Code, open the Command Palette and run Chat: Manage Language Models, then choose Add Models and Custom Endpoint (OpenAI compatible).

3. Enter the endpoint and key

Paste your ak- key, select Chat Completions as the API type, and set the model URL to:

https://api.apexapi.dev/v1/chat/completions

Note that Copilot wants the full path here, not just the base URL.

4. Set the model ID

In the generated configuration, set the model to a catalog ID, for example:

anthropic/claude-sonnet-4.6

The ID must match the catalog exactly, in provider/model format. Browse all IDs on the models page.

5. Pick it in chat

The model appears in Copilot Chat's model picker. Tab completions stay on GitHub's own backend; BYOK covers chat and agent mode.

Troubleshooting

  • 401 Unauthorized: the key wasn't pasted correctly or has been revoked.
  • Model not found: the model ID doesn't match a catalog ID. Copy it verbatim from the models page.
  • Connection fails: make sure the base URL is exactly https://api.apexapi.dev/v1 (no trailing slash after v1) and your balance is positive.
  • Custom Endpoint option missing: BYOK ships in current VS Code releases and is unavailable in some enterprise plans. Update VS Code and check your Copilot policy.
  • Anything else: check the error codes reference; streaming and tool calling are fully supported on /v1/chat/completions.