> ## Documentation Index
> Fetch the complete documentation index at: https://docs.aihubmix.com/llms.txt
> Use this file to discover all available pages before exploring further.

# 在 GPT 學術優化中使用

1. 開啟 gpt\_academic/config.py 檔案：\\
   <img src="https://mintcdn.com/aihubmix/_Cbum_77AgsRh-CI/public/cn/image16.png?fit=max&auto=format&n=_Cbum_77AgsRh-CI&q=85&s=461ecf466b641c1c2acd03a52e9b2401" alt="圖片" width="847" height="341" data-path="public/cn/image16.png" />
2. 找到 config.py 中的 API\_KEY 變數，將[本站的Key](https://aihubmix.com/token)填入，即可：\\
   <img src="https://mintcdn.com/aihubmix/_Cbum_77AgsRh-CI/public/cn/image17.png?fit=max&auto=format&n=_Cbum_77AgsRh-CI&q=85&s=bf2557779c2388032d503f475fdb8e59" alt="圖片" width="856" height="232" data-path="public/cn/image17.png" />
3. 往下滾動，找到 config.py 中的 API\_URL\_REDIRECT 變數，修改為（直接複製下面的程式碼區塊進去就行）：

```
API_URL_REDIRECT = {"https://api.openai.com/v1/chat/completions": "https://aihubmix.com/v1/chat/completions"}
```

<img src="https://mintcdn.com/aihubmix/_Cbum_77AgsRh-CI/public/cn/image18.png?fit=max&auto=format&n=_Cbum_77AgsRh-CI&q=85&s=65fc3d203180ae516ecd27052222a12c" alt="圖片" width="1304" height="194" data-path="public/cn/image18.png" />

3\. 然後就能用了\\

<img src="https://mintcdn.com/aihubmix/_Cbum_77AgsRh-CI/public/cn/image19.png?fit=max&auto=format&n=_Cbum_77AgsRh-CI&q=85&s=b5cfcc3e264032b5bdb7f0b265120c95" alt="圖片" width="1246" height="498" data-path="public/cn/image19.png" />

***

最後更新：2026-06-01
