AI Sentence Expander

Expandes sentences using AI

Endpoint

URL

https://www.capix.uz/v2/expander/

Method

POST

Headers

Required Headers

  • Content-Type: application/json

  • token: API_KEY

Header Details

  • Content-Type: Specifies the format of the request body. Must be set to application/json.

  • token: A unique API key required to authenticate the request. Replace API_KEY with your actual API token.

Request Body

Format

The request body must be in JSON format.

Parameters

  • sentence: A string containing the text that needs to be expanded. This is the main content to be processed by the sentence expander tool.

    • Type: string

    • Required: Yes

    • Example: "Struggling with wordy sentences? Want to make your writing crisp and clear? We have got you covered! Introducing Sentence Shortener, the perfect free tool to help you cut down on those extra words. No more headaches over long, complicated sentences. With our AI, you can make your writing easy to read and understand - in just a few clicks!"

  • word_count: The desired word count for the expanded sentence. The tool will attempt to increase the length of the original sentence to this number of words.

    • Type: string

    • Required: Yes

    • Example: "50"

Example Request

{
  "sentence": "Struggling with wordy sentences? Want to make your writing crisp and clear? We have got you covered! Introducing Sentence Shortener, the perfect free tool to help you cut down on those extra words. No more headaches over long, complicated sentences. With our AI, you can make your writing easy to read and understand - in just a few clicks!",
  "word_count": "50"
}

Response

Format

The response will be in JSON format.

Success Response

  • Code: 200 OK

  • Content Example:

    {
      "original_sentence": "Struggling with wordy sentences? Want to make your writing crisp and clear? We have got you covered! Introducing Sentence Shortener, the perfect free tool to help you cut down on those extra words. No more headaches over long, complicated sentences. With our AI, you can make your writing easy to read and understand - in just a few clicks!",
      "expanded_sentence": "Are you struggling with lengthy and wordy sentences? Do you desire to make your writing more concise, clear, and to the point? We have the perfect solution for you! Introducing the Sentence Shortener, a completely free tool designed to help you eliminate unnecessary words and streamline your sentences. Say goodbye to the headaches caused by long and convoluted sentences. Our advanced AI technology assists you in transforming your writing into something that is not only easy to read but also easy to understand - all within just a few clicks!",
      "word_count": 50
    }

Error Responses

  • Code: 400 Bad Request

    • Content Example:

      {
        "error": "Invalid input data. Ensure 'sentence' is a string and 'word_count' is a valid number."
      }
  • Code: 401 Unauthorized

    • Content Example:

      {
        "error": "Invalid or missing API token."
      }
  • Code: 500 Internal Server Error

    • Content Example:

      {
        "error": "An unexpected error occurred. Please try again later."
      }

Curl Command Example

curl -X POST "https://www.capix.uz/v2/expander/" \
     -H "Content-Type: application/json" \
     -H "token: YOUR_API_KEY" \
     -d '{
           "sentence": "Struggling with wordy sentences? Want to make your writing crisp and clear? We have got you covered! Introducing Sentence Shortener, the perfect free tool to help you cut down on those extra words. No more headaches over long, complicated sentences. With our AI, you can make your writing easy to read and understand - in just a few clicks!",
           "word_count": "50"
         }'

Replace YOUR_API_KEY with your actual API key.

Notes

  • Ensure that your API key is kept secure and not exposed publicly.

  • The word_count parameter must be a string representing a number. Make sure it is set correctly to avoid input validation errors.

  • The sentence provided should be a coherent piece of text to get the best results from the sentence expander tool.

Last updated