關於 OpenAI 的所有精彩內容的精選列表 - ChatGPT 背後的研究公司
要安裝官方 Python 綁定,請運行以下命令:
要安裝官方 Node.js 庫,請在 Node.js 項目目錄中運行以下命令:
驗證
OpenAI API 使用 API 密鑰進行身份驗證。訪問您的 API 密鑰 頁面以檢索您將在請求中使用的 API 密鑰。
請記住,您的 API 密鑰是秘密的!不要與他人共享或在任何客戶端代碼(瀏覽器、應用程序)中公開它。生產請求必須通過您自己的後端服務器進行路由,您的 API 密鑰可以從環境變量或密鑰管理服務中安全加載。
所有 API 請求都應在 Authorization HTTP 標頭中包含您的 API 密鑰,如下所示:
A curated list of all things awesome about OpenAI - the research company behind ChatGPT
To install the official Python bindings, run the following command:
To install the official Node.js library, run the following command in your Node.js project directory:
Authentication
The OpenAI API uses API keys for authentication. Visit your API Keys page to retrieve the API key you'll use in your requests.
Remember that your API key is a secret! Do not share it with others or expose it in any client-side code (browsers, apps). Production requests must be routed through your own backend server where your API key can be securely loaded from an environment variable or key management service.
All API requests should include your API key in an Authorization HTTP header as follows: