API文件

在数小时内将我们的API集成到您的平台或您公司的通信系统中。

Rephraser是一个简单的API,它接收英文文本,然后对其进行改述与更正——就好像它是由一个以英语为母语的专业编辑人士编辑的一样。



Endpoint URLhttps://api.rephraser.ai/rephrase

API Request

API Request Our API uses a JSON format:

{ "text": "This year we deepen our industry and expand our scale, leading nearly 30 delegations." }

API Response

The text is analyzed and rephrased. The response is returned in a JSON format with the following fields:

Field

Type

Description

Original

String

The whole original text

Edited

String

The whole edited text

highlight_original

List of Lists [Integer]

List of characters in 'original' to be highlighted. Each inner list is of the form: [startind, endind] where startind is first index of character in 'original' to highlight, and endind is the last one (excluding)

highlight_edited

List of Lists [Integer]

List of characters in 'edited' to be highlighted. Each inner list is of form: [startind, endind] where startind is first index of character in 'edited' to highlight, and endind is the last one (excluding)

Here is the response for the example sentence "This year we deepen our industry and expand our scale, leading nearly 30 delegations.":

{

"original": "This year we deepen our industry and expan our scale, leading nearly 30 delegations.",

"edited": "This year, we've deepened our industry and expanded our membership, leading almost 30 delegations.",

"highlight_original":[[13,19],[37,42],[47,52],[62,68]],

"highlight_edited":[[9,10],[13,16],[17,25],[43,51],[56,66],[76,82]]