Generating text content is as easy as making a POST request in your terminal to the Enterprise Text Generation API to this URL:

https://api.textcortex.com/hemingwai/generate_text

In each request, you need to send your auth token inside the JSON.


An example POST request would look like this:

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"
    }'

 

With the respective 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
}