Text Paraphrasing API
Transform text into different styles while maintaining its original meaning. This endpoint offers multiple paraphrasing modes to suit different needs, from simple rewording to academic style transformation.
Token Usage
This endpoint consumes tokens based on input text length and selected mode. Academic and formal modes may use additional tokens.
Learn more about billingEndpoint Details
Endpoint
POST /api/paraphrase
Headers
Content-Type: application/json
X-API-Key: your_api_key_here
Request Body
{
"text": "The text you want to paraphrase",
"mode": "standard", // Optional: standard, fluency, formal, simple, academic
"preserveStructure": false // Optional: try to maintain original structure
}
Parameter | Type | Required | Description |
---|---|---|---|
text | string | Yes | The text to be paraphrased. |
mode | string | No | Paraphrasing mode: standard, fluency, formal, simple, or academic. Defaults to standard. |
preserveStructure | boolean | No | Try to maintain original paragraph and sentence structure. Defaults to false. |
Success Response (200 OK)
{
"originalText": "The original text that was submitted",
"paraphrasedText": "The resulting paraphrased version",
"mode": "standard",
"wordCount": 120,
"tokensUsed": 156,
"readabilityScores": {
"original": {
"fleschKincaid": 65.2,
"automatedReadability": 12.3
},
"paraphrased": {
"fleschKincaid": 68.1,
"automatedReadability": 11.8
}
}
}
Field Descriptions
Field Path | Type | Description |
---|---|---|
originalText | string | The original input text. |
paraphrasedText | string | The resulting paraphrased text. |
mode | string | The paraphrasing mode that was used. |
wordCount | number | Word count of the original text. |
tokensUsed | number | Number of tokens consumed by this request. |
readabilityScores | object | Readability metrics for both original and paraphrased text. |
Error Responses
Example error for invalid input:
{
"error": "Invalid request body",
"details": "Text field is required"
}
Refer to the Error Handling section for details on other potential errors (e.g., 401, 403, 429, 500).
Code Examples
Use the following examples to integrate the Text Paraphrasing API.
curl -X POST https://your-api-domain.com/api/paraphrase \
-H "Content-Type: application/json" \
-H "X-API-Key: your_api_key_here" \
-d '{
"text": "The text you want to paraphrase",
"mode": "standard"
}'
Paraphrasing Modes
Each mode is optimized for different use cases:
- standard - Balanced rewriting that maintains meaning and readability
- fluency - Focuses on natural, conversational language
- formal - Elevates the language to a more professional tone
- simple - Simplifies complex text for better understanding
- academic - Adapts text to scholarly writing conventions