#9104 智谱AI: 令牌已过期或验证不正确https://open.bigmodel.cn/api/paas/v4/

118.74**5 Posted at: 7 hours ago

智谱AI: 令牌已过期或验证不正确
https://open.bigmodel.cn/api/paas/v4/
{'model': 'glm-5.3', 'timeout': 300, 'temperature': 0.1, 'max_tokens': 16384}
None,
Traceback (most recent call last):
File "videotrans\translator\_openaicompat.py", line 99, in _item_task
File "videotrans\translator\_openaicompat.py", line 39, in _create_completion
File "openai\_utils\_utils.py", line 298, in wrapper
File "openai\resources\chat\completions\completions.py", line 1215, in create
File "openai\_base_client.py", line 1332, in post
File "openai\_base_client.py", line 1105, in request
openai.AuthenticationError: Error code: 401 - {'error': {'code': '401', 'message': '令牌已过期或验证不正确'}}

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "videotrans\util\TestSrtTrans.py", line 19, in run
File "videotrans\translator\_runner.py", line 71, in run
File "videotrans\translator\_base.py", line 82, in run
File "videotrans\translator\_base.py", line 165, in _run_srt
File "tenacity\__init__.py", line 338, in wrapped_f
File "tenacity\__init__.py", line 477, in call
File "tenacity\__init__.py", line 378, in iter
File "tenacity\__init__.py", line 400, in
File "concurrent\futures\_base.py", line 451, in result
File "concurrent\futures\_base.py", line 403, in __get_result
File "tenacity\__init__.py", line 480, in call
File "videotrans\translator\_openaicompat.py", line 112, in _item_task
videotrans.configure.excepts.StopTask: 令牌已过期或验证不正确
https://open.bigmodel.cn/api/paas/v4/
{'model': 'glm-5.3', 'timeout': 300, 'temperature': 0.1, 'max_tokens': 16384}
None


=
system:Windows-10-10.0.26200-SP0
version:v4.20
frozen:True
language:zh_CN
root_dir:D:/AI/win-pyvideotrans-v4.20

1 Replies

#1 DeepSeek reply at 7 hours ago

这是 API Key(令牌)无效、过期或复制不完整 导致的 401 认证失败,与软件本身无关;glm-5.3 也需确认是智谱平台真实存在的模型名。

处理步骤:

  1. 登录智谱开放平台 https://open.bigmodel.cn/ → 「API Keys」页面,确认该 Key 未被删除、未过期,且账户有可用余额/资源包。
  2. 点击「新建/复制」重新获取完整 Key(xxxxx.xxxxx 形式的完整字符串),确保复制时没有遗漏后半段、没有多余空格或换行。
  3. 打开软件 菜单 → 翻译设置 → 智谱AI,清空原内容后重新粘贴 Key,保存。注意不要填到「本地大模型/兼容AI」「OpenAI」等其他渠道的设置里。
  4. 在该设置窗口中,模型名从下拉列表中选择,不要手动输入 glm-5.3 这类不确定的模型名(若模型名不存在或账号无权限,同样会报错)。
  5. 保存后重启软件,再执行 测试 或重新翻译。

若以上都确认无误但仍报 401,请到智谱控制台查看该 Key 的调用日志与错误码,或发邮件/工单确认账号状态(Key 被风控、账号欠费、组织权限变更都会返回该提示)。

请查阅相关文档:

Thinking...
Post Your Reply
If you have more than 50 messages, you will no longer receive an automatic reply. Please ask a new question!
Open source and free maintenance is not easy. If this project is helpful to you, please consider making a small donation to help the project continue to maintain and update.

Dondate via ko-fi.com

Related resource