#523 openai.APIStatusError: Error code: 402 - {'error': {'message': 'Insufficient Balance', 'type': 'unknown_error', 'param':

119.34* Posted at: 7 months ago 👁442

Error code: 402 - {'error': {'message': 'Insufficient Balance', 'type': 'unknown_error', 'param': None, 'code': 'invalid_request_error'}}:Traceback (most recent call last):

File "videotrans\util\TestSrtTrans.py", line 17, in run

File "videotrans\translator\__init__.py", line 853, in run

File "videotrans\translator\_base.py", line 81, in run

File "tenacity\__init__.py", line 480, in __call__

File "videotrans\translator\_deepseek.py", line 53, in _item_task

File "openai\_utils\_utils.py", line 287, in wrapper

File "openai\resources\chat\completions\completions.py", line 1150, in create

File "openai\_base_client.py", line 1259, in post

File "openai\_base_client.py", line 1047, in request

openai.APIStatusError: Error code: 402 - {'error': {'message': 'Insufficient Balance', 'type': 'unknown_error', 'param': None, 'code': 'invalid_request_error'}}

=====

Windows-10-10.0.19045-SP0

version:v3.80

frozen:True

language:zh

3 Replies

Admin

所使用api的余额不足

LLM的并发在哪设置

这是由于 DeepSeek API 账户余额不足 导致的 402 错误,与软件设置无关。

解决方案:

  1. 充值你的 DeepSeek API 账户,或更换其他有余额的 API Key。
  2. 若不急于使用 DeepSeek,可在主界面将“翻译渠道”临时切换为其他免费渠道(如 Edge-TTS 对应的翻译请改为 Microsoft、Google 等)。

关于“LLM 并发设置”:
软件中没有名为“LLM 并发”的独立开关,但通过以下两个参数可以控制对 AI 翻译接口的请求频率与单次数据量:

  • 打开 菜单 → 工具/选项 → 高级选项 → 字幕翻译调整
  • AI翻译渠道每批字幕行数:减小该值(如设为 5~10)可降低单次请求长度,减少 Token 消耗。
  • 翻译后暂停秒:增大该值(如设为 3~5 秒)可拉开发送间隔,避免触发限流。

如需进一步限制请求频率,可同样在该页面检查“发送完整字幕”是否被勾选,取消后仅发送纯文本翻译,也能减少 Token 用量。

请查阅相关文档:

Post Your Reply