Skip to content

Instantly share code, notes, and snippets.

@GrayXu
Last active October 10, 2024 11:53
Show Gist options
  • Save GrayXu/f1b72353b4b0493d51d47f0f7498b67b to your computer and use it in GitHub Desktop.
Save GrayXu/f1b72353b4b0493d51d47f0f7498b67b to your computer and use it in GitHub Desktop.
Register OpenAI GPT API

This gist is for zotero-pdf-translate.
Please ask your question at repo issues for faster responses
请在仓库issue进行提问以获得更快的回复


  1. Register an account on the OpenAI website.
  2. After successful registration, go to API keys and create an key, which looks like sk-XXXXXX.
  3. Fill in the url with the complete URL, such as https://api.openai.com/v1/chat/completions.
  4. For the model, enter a model name such as gpt-4o.
  5. When using the official OpenAI API, ensure your network environment allows direct connection to OpenAI .
  6. When using a 3-party OpenAI compatible API, follow the same format as above.

  1. OpenAI网站注册账号。
  2. 注册成功后,打开API keys,创建密钥(API Secret Key),如sk-XXXXXX
  3. 接口填写如https://api.openai.com/v1/chat/completions的完整调用URL。
  4. 模型填写如gpt-4o的模型名。
  5. 使用官方接口需要确保你的网络环境可以直连OpenAI。
  6. 使用第三方OpenAI兼容接口时,填写规范与上述对齐即可。
@GrayXu
Copy link
Author

GrayXu commented Sep 20, 2024

@Merle-h 说明你的key不能访问4o

@WJHHHH1001
Copy link

在添加ChatGPT的密钥之后为什么对选中的内容不是翻译成中文,而是类似于解读的作用
aa02177a-5e5b-4dea-98ce-c7ef9a8620aa

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment