API Documentation

Base URL: https://htmlmix.pro/api

Authentication

Auth Type: Bearer Token

All requests must include the Authorization header:

Authorization: Bearer YOUR_API_TOKEN

Error Codes

Code Message Description
400 Missing required parameters Occurs when source is not provided.
400 The action parameter was not passed. Occurs when actions is not specified correctly.
401 Invalid API token or user not found Occurs when the API token is missing or invalid.
403 The quota of requests has been depleted Quota for API usage is exhausted.
403 Subscription expired Subscription has ended, access denied.
429 Too Many Requests Exceeded request limit (1 request per 60 sec).

Rate Limits

Endpoint: Randomize HTML letter

Method: POST

URL: https://htmlmix.pro/api?action=getRandomizeLetter

Request Parameters

Parameter Type Required Default Value Description
1 source string yes HTML template code to process.
2 modeMorphing array no Parameters for morphing letter.
2.1 randomTableLayot integer no 0 Random table layout (0 - off, 1 - on).
2.2 splitInversion integer no 0 Split words into two parts and then invert each one and add a style direction: rtl; unicode-bidi: bidi-override; display: inline-block; (0 - off, 1 - on).
2.3 wrapLettersInTags integer no 0 Wrap words in a span tag (0 - off, 1 - on).
2.4 synonymsAI integer no 1 Generate synonyms of your text in a template using AI (0 - off, 1 - on).
2.5 zeroFront integer no 1 Inserting special tags with styles that will contain a random symbol or trending words of the selected region. (0 - off, 1 - on).
3 settings array no Parameters with different settings.
3.1 insertGarbageCode integer no 1 Insert random "garbage" code (0 - off, 1 - on).
3.2 insertGarbageCodeProbability integer no 15 Probability % of inserting "garbage" code (1 - 100).
3.3 randomChangeTags integer no 1 Random tag replacement in the entire template (0 - off, 1 - on).
3.4 randomizeFonts integer no 0 Random font replacement in the template. Only standard fonts that are compatible for all devices are used (0 - off, 1 - on).
3.5 changeNameClass integer no 1 Classes and ID renamed to random names (0 - off, 1 - on).
3.6 fileCountGen integer no 10 Number of generated letters.
3.7 colorChangeRange integer no 8 Color change range (0-16).
3.8 temperature float no 0.6 AI creativity level.
3.9 startMacros string no "[%%" Macro start template.
3.10 endMacros string no "%%]" Macro end template.
3.11 listLinks string no A list of your links that will be used when converting the template to an image.
4 additionalSettings array no Parameters with different additional settings.
4.1 splitInversionWordsLength integer no 6 Length of words that will be processed if inversion is enabled.
4.2 probabilityInvers integer no 40 Probability of word processing in percent.
4.3 zeroFrontLengthCharacters integer no 2 Number of characters after which the zerofront will be executed.
4.4 insertTrends integer no 0 Using google trends instead of random characters when working zerofront (0 - off, 1 - on).
4.5 regionTrends string no "US" Google Trends Region. Can take one of the following values: "BR", "CA", "CN", "CZ", "DE", "DK", "ES", "FR", "GB", "IN", "JP", "NL", "NO", "NZ", "PL", "RU", "SE", "UA", "US"
5 trustLinks array no Options using trusted links.
5.1 insertTrustLink integer no 0 Enables the option to insert trusted links (0 - off, 1 - on).
5.2 insertTrustWiki integer no 0 Insert a link from Wikipedia (0 - off, 1 - on).
5.3 insertTrustWikiText integer no 0 Inserts invisible text from a wikipedia link (0 - off, 1 - on).
5.4 insertTrustReddit integer no 0 Insert a link from Reddit (0 - off, 1 - on)
5.5 trustLinkHidden integer no 1 Hide inserted link (0 - off, 1 - on).
5.6 insertTrustLinkLengthMin integer no 10 The minimum number of blank lines before the inserted link (0-100).
5.7 insertTrustLinkLengthMax integer no 30 The maximum number of blank lines before the inserted link (0-999).
5.8 insertTrustLinkKeywordWiki string no Keyword for inserting a link from wikipedia. If not found by keyword then random link will be inserted.
5.9 listTrustLinks string no List own trust links format https://trust.com your_anchor\n
5.10 languageInsertTextWiki string no "en" The language of wikipedia.
6 imagesFunctions array no Options to convert email to image and upload images to trusted hosting.
6.1 convertTemplateToImage integer no 0 Converts letter to a base64 image (0 - off, 1 - on).
6.2 convertTemplateToImageUploadHosting integer no 0 Upload the converted image to a trusted hosting (0 - off, 1 - on).
6.3 uploadImgToHosting integer no 0 Automatically upload all images from the letter to a trusted hosting service (0 - off, 1 - on).

Example Request (cURL)

curl -X POST "http://api.genhtml?action=getRandomizeLetter" \
     -H "Authorization: Bearer YOUR_API_TOKEN" \
     -H "Content-Type: application/json" \
     -d '{
      "source": "Your html",
      "modeMorphing": {
        "randomTableLayot": 1,
        "zeroFront": 1
    },
      "settings": {
          "startMacros": "[",
          "endMacros": "]",
          "temperature": 0.6,
      },
      "additionalSettings": {
        "zeroFrontLengthCharacters": 4,
        "insertTrends": 1,
        "regionTrends": "US",
        "valueStopWords": ""
    },
      "trustLinks": {
          "insertTrustLink": 1,
          "insertTrustWiki": 1,
          "trustLinkHidden": 0,
          "insertTrustLinkLengthMin": 10,
          "insertTrustLinkLengthMax": 30,
          "insertTrustLinkKeywordWiki": "Bank",
          "languageInsertTextWiki": "en"
      },
      "imagesFunctions": {
          "convertTemplateToImage": 1,
          "convertTemplateToImageUploadHosting": 0,
          "uploadImgToHosting": 1
      }
  }'
    

Example Request (Python)

import requests

url = "http://api.genhtml?action=getRandomizeLetter"
headers = {
    "Authorization": "Bearer YOUR_API_TOKEN",
    "Content-Type": "application/json"
}
data = {
  '{
    "source": "Your html",
    "modeMorphing": {
      "randomTableLayot": 1,
      "zeroFront": 1
  },
    "settings": {
        "startMacros": "[",
        "endMacros": "]",
        "temperature": 0.6,
    },
    "additionalSettings": {
      "zeroFrontLengthCharacters": 4,
      "insertTrends": 1,
      "regionTrends": "US",
      "valueStopWords": ""
  },
    "trustLinks": {
        "insertTrustLink": 1,
        "insertTrustWiki": 1,
        "trustLinkHidden": 0,
        "insertTrustLinkLengthMin": 10,
        "insertTrustLinkLengthMax": 30,
        "insertTrustLinkKeywordWiki": "Bank",
        "languageInsertTextWiki": "en"
    },
    "imagesFunctions": {
        "convertTemplateToImage": 1,
        "convertTemplateToImageUploadHosting": 0,
        "uploadImgToHosting": 1
    }
}'
response = requests.post(url, json=data, headers=headers)
print(response.json())
    

Response Format

{
    "status": "success",
    "html": ["html-1","html-2","html-3"....]
}
    

Endpoint: Get information about subscription and quota

Method: POST

URL: https://htmlmix.pro/api?action=getUserInfo

Example Request (cURL)

curl -X POST "http://api.genhtml?action=getUserInfo" \
     -H "Authorization: Bearer YOUR_API_TOKEN" \
     -H "Content-Type: application/json" \
    

Example Request (Python)

import requests

url = "http://api.genhtml?action=getUserInfo"
headers = {
    "Authorization": "Bearer YOUR_API_TOKEN",
    "Content-Type": "application/json"
}'
response = requests.post(url, json=data, headers=headers)
print(response.json())
    

Response Format

  {
    "status": "success",
    "user": {
        "subscription_end_date": "2028-01-15",
        "quota_api": 9992
    }
}