API Documentation

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 billing

Endpoint 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 }
ParameterTypeRequiredDescription
textstringYesThe text to be paraphrased.
modestringNoParaphrasing mode: standard, fluency, formal, simple, or academic. Defaults to standard.
preserveStructurebooleanNoTry 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 PathTypeDescription
originalTextstringThe original input text.
paraphrasedTextstringThe resulting paraphrased text.
modestringThe paraphrasing mode that was used.
wordCountnumberWord count of the original text.
tokensUsednumberNumber of tokens consumed by this request.
readabilityScoresobjectReadability 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