如何取得
OpenAI API Key

步驟教學 — 取得 GPT-4、GPT-4o 等模型的 API 存取權

1

前往 OpenAI Platform

在瀏覽器中開啟 OpenAI 開發者平台,使用你的 OpenAI 帳號登入(或註冊新帳號)。

https://platform.openai.com
🟢

Welcome to OpenAI Platform

Log in(登入)
or Sign up(註冊)
如果還沒有帳號,點 「Sign up」 註冊。可以用 Google、Microsoft 或 Apple 帳號快速註冊。
2

進入 API Keys 頁面

登入後,在左側選單或儀表板中找到並點擊 「API keys」

platform.openai.com/api-keys
3

建立新的 API Key

「Create new secret key」,可以輸入一個名稱方便辨識,然後按 「Create」

platform.openai.com/api-keys

Create new secret key

我的專案 Key
All
Create secret key
4

複製並儲存你的 API Key

新的 API Key 只會顯示一次。請立刻複製並存放到安全的地方。

sk-proj-AbCdEfGhIjKlMnOpQrStUvWxYz1234567890...
🎉

API Key 建立成功!

現在你可以用這個 Key 來呼叫 OpenAI 的 API(GPT-4、GPT-4o、DALL-E、Whisper 等)

OpenAI 不會再次顯示此 Key。如果遺失了,你需要建立一個新的。建議存在密碼管理器或環境變數中。
5

設定付款方式(必要)

API 使用需要付費。前往左側選單的 「Billing」,新增付款方式。你可以設定用量上限來控制費用。

platform.openai.com/settings/organization/billing
「Limits」 設定每月用量上限,避免意外超支。

祝你開發順利!🟢