There are different kinds of texts that you can generate using TextCortex AI. No matter if on our frontend products or as API the functionalities are the same.

 

Here is a list of categories you can use:

Auto Complete: Expands, continues and completes the instructed prompt

Blog Body: Generates blog articles on a instructed blog title and keywords.

Ads: Generates ads based on the product that you are selling. This model is instructed with a product and a target segment for generating texts.

Instagram Caption: Generates Instagram captions to promote a product from a perspective of a user.

Email Body: Generates email bodies. This model takes an email subject and a target segment for generating the main body text.

Email Subject: Generates email subjects. This model takes the keywords as an input and then generates an email subject.

Paraphrase: Paraphrases an instructed sentence and returns multiple variations of it


For example; to generate an email body you should send the Email Body as a category inside the post request JSON

Post Request:


curl --location --request POST 'https://api.textcortex.com/hemingwai/generate_text' \
--header 'Content-Type: application/json' \
--data-raw '{
        "prompt": "Summer Sale Newsletter",
        "parameters": "Young People",
        "character_count": 500,
        "source_language": "en",
        "category": "Email Body",
        "temperature": 0.7,
        "n_gen": 2,
        "api_key":"YOUR_API_KEY"
    }'

Response:

{
  "status": "success",
  "ai_results": [
    {
      "generated_text": "\n\nHey!\n\nWe're happy to announce our annual Summer Sale! We have discounts on all our products for the entire month of July.\n\nDon't miss out on these amazing deals!\n\nSincerely,\n\nYour Friends at the Store",
      "rank": 0.901,
      "text_length": 202,
      "word_frequency": [],
      "word_count": 35
    }
  ],
  "error": 200
}