Skip to content

Instantly share code, notes, and snippets.

@GrayXu
Last active July 27, 2025 13:54
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.
OpenAI GPT API for Zotero-PDF-Translate

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兼容接口时,填写规范与上述对齐即可。
@gptfortest00
Copy link

1753452863256 补个图,我是这样设置的,不能正确翻译

@nvzi2
Copy link

nvzi2 commented Jul 27, 2025

接千问mtplus的有成功的吗,我咋怎么试都翻译不了,总显示这个Error: HTTP POST https://dashscope.aliyuncs.com/compatible-mode/v1/chat/completions failed with status code 400:

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