「 AI 」 三月 15, 2026
【转】如何调用Github Copilot订阅的Chat Completions API
文章字数 6k 阅读约需 5 mins.
- 原文地址:https://skae.top/p/copilot-api/
- 原文作者:^薄荷布丁^
这篇文章教你怎么自己编写代码,把你的Github Copilot订阅的API接出来用。
大致流程是:
- 发起 Device Flow 请求,获取
device_code和user_code(XXXX-XXXX)。 - 在浏览器访问 https://github.com/login/device,输入`user_code`。
- 轮询换取
access_token(ghu_开头的 token)。 - 用
access_token...