Chat(Translate into English)
POST
/v1/chat/completionsTranslation service from DeepL
Price: 25 PTC / 1M tokens
请求参数
Header Params
Content-Type
string
required
Example:
application/json
Accept
string
required
Example:
application/json
Authorization
string
optional
API Key from 302.AI backend
Example:
Bearer {{YOUR_API_KEY}}
Body Params application/json
model
string
required
The ID of the model to use
message
string
required
The message to be sent
Example
{
"model": "deepl-en",
"message": "你好"
}
示例代码
Responses
OK(200)
HTTP 状态码: 200
内容格式: JSONapplication/json
Data Schema
output
string
required
ExampleOK
{
"output": "hello"
}
Last modified: 2 个月前