释义
POST
https://api.ai21.com/studio/v1/paraphrase请求参数
Body 参数application/json
text
string
必需
要释义的输入文本。 文本长度不应超过 500 个字符。
style
string
可选
控制长度和音调。在这里阅读更多内容 默认:general
startIndex
integer
可选
该参数指定给定文本中释义过程的起始位置。它是可选的,默认值为 0。
endIndex
integer
可选
该参数指定要释义的最后一个字符的位置,包括其后面的字符。如果未提供该参数,则默认值设置为给定文本的长度。
示例
{
"text": "string",
"style": "string",
"startIndex": 0,
"endIndex": 0
}
示例代码
返回响应
成功(200)
HTTP 状态码: 200
内容格式: JSONapplication/json
数据结构
id
string
必需
suggestions
array [object {1}]
必需
text
string
必需
示例
{
"id": "862829b2-29be-c86d-370e-db2f7f5dbf5b",
"suggestions": [
{
"text": "One life is enough if you live it right."
},
{
"text": "When you do it right, you only live once."
},
{
"text": "Once is all you have, but if you do it right, once is enough."
},
{
"text": "When you live right, you only need to live once."
},
{
"text": "One life is enough if you live it right, but if you don't do it right, one life is not enough."
},
{
"text": "The only chance you have to live is once, but if you live well, a once is enough."
},
{
"text": "The only way to live is right, so if you do it right, once is enough."
},
{
"text": "Once is enough if you live it right, but if you do it wrong, you'll regret it later."
},
{
"text": "In life, you only live once, but if you do it right, once should be plenty."
},
{
"text": "It takes only one life to live a fulfilling life, but if you do it right, one life is enough."
}
]
}
最后修改时间: 1 年前