uniTranslate (统一翻译)
  1. 翻译配置
uniTranslate (统一翻译)
  • 说明
  • 翻译配置
    • 添加配置-百度
      POST
    • 添加配置-有道
      POST
    • 添加配置-Google
      POST
    • 添加配置-Deepl
      POST
    • 添加配置-ChatGPT
      POST
    • 添加配置-XunFei
      POST
    • 添加配置-XunFeiNiu
      POST
    • 添加配置-腾讯
      POST
    • 添加配置-火山
      POST
    • 添加配置-PaPaGo
      POST
  • 配置
    • 刷新配置缓存
      GET
    • 删除配置
      POST
    • 修改配置状态
      POST
    • 获取配置列表
      GET
  • 获取翻译缓存大小
    GET
  • 清除翻译缓存
    GET
  • 获取请求记录
    GET
  • 翻译
    POST
  • 聚合翻译
    POST
  • libre 翻译
    POST
  • 白嫖谷歌协议
    POST
  • 获取支持的翻译语种
    GET
  1. 翻译配置

添加配置-百度

POST
/api/saveConfig
最后修改时间:2024-07-25 02:48:26

请求参数

Body 参数application/json
platform
string 
录入的平台名称
必需
status
boolean 
必需
状态 true 打开 false 关闭
level
integer 
等级越高优先级越低
必需
cfg
object 
必需
配置具体配置按照平台
key
string 
必需
appId
string 
必需
url
string 
必需
curlTimeOut
integer 
必需
type
string 
必需
平台类型 Baidu YouDao Google PaPaGo ChatGPT HuoShan Tencent XunFei XunFeiNiu Deepl
示例
{
    "platform": "百度1", // 录入的平台名称
    "status": true, // 状态 true 打开 false 关闭
    "level": 1, // 等级越高优先级越低
    "cfg": { // 配置具体配置按照平台
        "key": "",
        "appId": "",
        "url": "https://fanyi-api.baidu.com/api/trans/vip/translate",
        "curlTimeOut": 1000
    },
    "type": "Baidu" // 平台类型 Baidu YouDao Google PaPaGo ChatGPT HuoShan Tencent XunFei XunFeiNiu Deepl
}

示例代码

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location --request POST '/api/saveConfig' \
--header 'Content-Type: application/json' \
--data-raw '{
    "platform": "百度1", // 录入的平台名称
    "status": true, // 状态 true 打开 false 关闭
    "level": 1, // 等级越高优先级越低
    "cfg": { // 配置具体配置按照平台
        "key": "",
        "appId": "",
        "url": "https://fanyi-api.baidu.com/api/trans/vip/translate",
        "curlTimeOut": 1000
    },
    "type": "Baidu" // 平台类型 Baidu YouDao Google PaPaGo ChatGPT HuoShan Tencent XunFei XunFeiNiu Deepl
}'

返回响应

🟢200成功
application/json
Body
code
integer 
状态码
必需
1000 成功 其他失败
data
array[string]
返回的数据
必需
msg
string 
系统信息
必需
time
integer 
当前系统时间
必需
示例
{
  "code": 1000,
  "data": [],
  "msg": "SUCCESS !!!",
  "time": 1715393900901
}
修改于 2024-07-25 02:48:26
上一页
说明
下一页
添加配置-有道
Built with