fix: update custom api

This commit is contained in:
Gabe
2025-10-23 14:33:12 +08:00
parent f7ba744e7f
commit f7fc9560d5
2 changed files with 37 additions and 1 deletions

View File

@@ -1,5 +1,41 @@
# 自定义接口示例
## 默认接口规范
如果接口的请求数据和返回数据符合以下规范,
则无需填写 `Request Hook``Response Hook`
Request body
```json
{
"texts": ["hello"], // 需要翻译的文本列表
"from":"auto", // 原文语言
"to": "zh-CN" // 目标语言
}
```
Response
```json
[
{
"text": "你好", // 译文
"src": "zh-CN" // 原文语言
}
]
// v2.0.4版后亦支持以下返回格式
{
"translations": [ // 译文列表
{
"text": "你好", // 译文
"src": "zh-CN" // 原文语言
}
]
}
```
## 谷歌翻译接口
> 此接口不支持聚合