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).

API Limits & Access

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 0 Generate synonyms of your text in a template using AI (0 - off, 1 - on).
2.5 zeroFront integer no 0 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 separateCssClasses integer no 1 Separate CSS classes into individual classes (0 - off, 1 - on).
3.2 inlineStylesToClasses integer no 0 Convert inline styles to classes (0 - off, 1 - on).
3.2.1 inlineStylesToClassesProbability integer no 40 Probability % for converting inline styles to classes (1-100).
3.3 classesToInlineStyles integer no 0 Convert CSS classes to inline styles (0 - off, 1 - on).
3.3.1 classesToInlineStylesProbability integer no 40 Probability % for converting CSS classes to inline styles (1-100).
3.4 insertGarbageCode integer no 1 Insert random "garbage" code (0 - off, 1 - on).
3.5 insertGarbageCodeProbability integer no 15 Probability % of inserting "garbage" code (1 - 100).
3.6 randomChangeTags integer no 1 Random tag replacement in the entire template (0 - off, 1 - on).
3.7 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.8 changeNameClass integer no 1 Classes and ID renamed to random names (0 - off, 1 - on).
3.9 fileCountGen integer no 10 Number of generated letters.
3.10 colorChangeRange integer no 8 Color change range (0-16).
3.11 paddingChangeRange integer no 2 Padding change range.
3.12 temperature float no 0.6 AI creativity level.
3.13 aiLanguage string no "auto" AI language override. Use "auto" to detect from HTML/meta or sample text. Examples: "en", "de", "es", "fr", "it", "pt", "nl", "pl", "ru", "tr", "zh", "ja".
3.14 startMacros string no "[%%" Macro start template.
3.15 endMacros string no "%%]" Macro end template.
3.16 startSpintax string no "{" Spintax start template.
3.17 separatorSpintax string no "|" Spintax separator template.
3.18 endSpintax string no "}" Spintax end template.
3.19 listLinks string no "" A list of your links that will be used when converting the template to an image.
3.20 garbageToLink integer no 1 Convert garbage text to links (0 - off, 1 - on).
3.21 addRandomComments integer no 1 Add random comments to HTML (0 - off, 1 - on).
3.22 selectedAttributes array no ["background", "background-color", "bgcolor", "border-bottom-color", "border-bottom-width", "border-color", "border-radius", "border-top-color", "border-top-width", "border-width", "box-shadow", "cellpadding", "cellspacing", "color", "height", "letter-spacing", "line-height", "margin", "margin-bottom", "margin-left", "margin-right", "margin-top", "max-height", "padding", "padding-bottom", "padding-left", "padding-right", "padding-top", "text-decoration", "valign", "width", "word-spacing"] List of attributes that will be processed.
3.23 selectedGarbageTags array no ["span", "bdi", "bdo", "data", "samp", "var", "abbr", "time", "dfn", "code", "kbd", "sub", "sup", "rp", "rt", "u", "i", "em", "b", "strong", "small", "cite", "del", "ins", "s", "font", "label", "wbr", "big", "tt"] List of HTML tags to use for garbage code. Only these tags will be randomly inserted when insertGarbageCode is enabled. Total: 32 tags available.
3.24 addPreviewText integer no 0 Add preview text to the letter (0 - off, 1 - on).
3.25 previewTextAI integer no 0 AI randomization for preview text (0 - off, 1 - on).
3.26 previewTextCustom string no "" Custom preview text.
3.27 transformStructure integer no 0 Transform letter structure (0 - off, 1 - on).
3.28 transformTrProbability integer no 50 Transform letter structure probability (0 - 100).
3.29 addRandomAuth integer no 0 Add random authentication to links (0 - off, 1 - on).
3.30 randomChangeTagsProbability integer no 50 Random change tags probability (0 - 100).
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"
4.6 valueStopWords string no "" Words that will be ignored during processing.
4.7 addSchemaCalendar integer no 0 Add schema.org calendar to the letter (0 - off, 1 - on).
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 insertTrustRedditText integer no 0 Inserts invisible text from a Reddit link (0 - off, 1 - on).
5.6 trustLinkHidden integer no 1 Hide inserted link (0 - off, 1 - on).
5.7 insertTrustLinkLengthMin integer no 10 The minimum number of blank lines before the inserted link (0-100).
5.8 insertTrustLinkLengthMax integer no 30 The maximum number of blank lines before the inserted link (0-999).
5.9 insertTrustLinkKeywordWiki string no "" Keyword for inserting a link from wikipedia. If not found by keyword then random link will be inserted.
5.10 insertTrustLinkKeywordReddit string no "" Keyword for inserting a link from Reddit. If not found by keyword then random link will be inserted.
5.11 listTrustLinks string no "" List own trust links format https://trust.com your_anchor\n
5.12 languageInsertTextWiki string no "en" The language of wikipedia.
5.13 trustLinkPosition string no "bottom" The position of the trust link (bottom, top, random).
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).
6.4 uploadServices array no ["GoogleCloud", "AmazonAWS", "Backblaze", "BunnyStorage"] List of services to upload images to. Can take one of the following values: "GoogleCloud", "AmazonAWS", "Backblaze", "BunnyStorage", "Cloudflare", "Bitbucket", "AzureStorage"
6.5 convertImgToBackground integer no 0 Converts images to background images (0 - off, 1 - on).

Example Request (cURL)

curl -X POST "https://htmlmix.pro/api?action=getRandomizeLetter" \
     -H "Authorization: Bearer YOUR_API_TOKEN" \
     -H "Content-Type: application/json" \
     -d '{
      "source": "Your html",
      "modeMorphing": {
        "randomTableLayot": 1,
        "splitInversion": 1,
        "zeroFront": 1,
        "synonymsAI": 1
      },
      "settings": {
          "inlineStylesToClasses": 0,
          "inlineStylesToClassesProbability": 40,
          "classesToInlineStyles": 0,
          "classesToInlineStylesProbability": 40,
          "startMacros": "[%%",
          "endMacros": "%%]",
          "startSpintax": "{",
          "separatorSpintax": "|",
          "endSpintax": "}",
          "temperature": 0.6,
          "aiLanguage": "auto",
          "insertGarbageCode": 1,
          "insertGarbageCodeProbability": 15,
          "selectedGarbageTags": ["span", "strong", "em", "del", "font"],
          "garbageToLink": 1,
          "addRandomComments": 1
      },
      "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 = "https://htmlmix.pro/api?action=getRandomizeLetter"
headers = {
    "Authorization": "Bearer YOUR_API_TOKEN",
    "Content-Type": "application/json"
}
data = {
    "source": "Your html",
    "modeMorphing": {
      "randomTableLayot": 1,
      "splitInversion": 1,
      "zeroFront": 1,
      "synonymsAI": 1
    },
    "settings": {
        "inlineStylesToClasses": 0,
        "inlineStylesToClassesProbability": 40,
        "classesToInlineStyles": 0,
        "classesToInlineStylesProbability": 40,
        "startMacros": "[%%",
        "endMacros": "%%]",
        "temperature": 0.6,
        "aiLanguage": "auto",
        "insertGarbageCode": 1,
        "insertGarbageCodeProbability": 15,
        "selectedGarbageTags": ["span", "div", "strong", "em"],
        "garbageToLink": 1,
        "addRandomComments": 1
    },
    "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: Create Redirect Links

Method: POST

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

Create trusted redirect links through high-reputation domains (search.app, share.google, AWS S3, pages.dev). The cost is deducted from your balance. If you have an active redirect subscription, daily free links are used first for covered providers (search.app, share.google, pages.dev).

Rate limit: 1 request per 60 seconds. Quota is not consumed — redirects are paid from balance.

Request Parameters

Parameter Type Required Default Description
target_url string yes The final destination URL that the redirect chain will point to.
redirect_chain array no ["aws"] Ordered list of provider IDs forming the redirect chain. Available providers: "aws", "search_app", "share_google", "cf_pages". Example multi-hop: ["search_app", "aws"].
count integer no 1 Number of redirect links to create (1–50). Max 7 when AWS is used, max 1 for share.google.
google_safe_monitoring boolean no false Enable Google Safe Browsing monitoring for the target URL.
aws_credentials_id integer no Specific AWS server ID to use (only when aws is in the chain).
settings object no {} Provider-specific settings. Keys are provider IDs with nested config objects. Examples:
AWS: {"aws": {"meta_title": "My Page", "content_type": "text", "redirect_delay": 3}}
CF Pages: {"cf": {"content_type": "text", "redirect_delay": 2, "custom_title": "My Page"}}

Available Providers

ID Name Max in chain Requires AWS Notes
aws AWS S3 2 yes Always paid from balance.
search_app search.app 2 no Available with subscription (free daily links).
share_google share.google 1 no Must be the last hop. Available with subscription (free daily links).
cf_pages pages.dev 2 no Cloudflare Pages redirect. Supports wiki content, custom title and redirect delay. Available with subscription (free daily links).

Example Request (cURL)

curl -X POST "https://htmlmix.pro/api?action=createRedirect" \
     -H "Authorization: Bearer YOUR_API_TOKEN" \
     -H "Content-Type: application/json" \
     -d '{
      "target_url": "https://example.com/landing",
      "redirect_chain": ["search_app"],
      "count": 10,
      "google_safe_monitoring": true
  }'
    

Example Request (Python)

import requests

url = "https://htmlmix.pro/api?action=createRedirect"
headers = {
    "Authorization": "Bearer YOUR_API_TOKEN",
    "Content-Type": "application/json"
}
data = {
    "target_url": "https://example.com/landing",
    "redirect_chain": ["search_app"],
    "count": 10,
    "google_safe_monitoring": True
}
response = requests.post(url, json=data, headers=headers)
print(response.json())
    

Response Format

{
    "status": "success",
    "redirect_urls": [
        "https://search.app/abc123",
        "https://search.app/def456",
        "..."
    ],
    "message": "Redirects created successfully",
    "cost": 0.12,
    "new_balance": 84.50,
    "redirect_remaining_daily": 40,
    "redirect_chain": ["search_app"]
}
    

Response Fields

Field Type Description
status string "success", "partial" (some created), or "error".
redirect_urls array List of created redirect URLs.
message string Result message.
cost number Cost per redirect link.
new_balance number Updated account balance after the operation.
redirect_remaining_daily integer Remaining free daily links from redirect subscription.
redirect_chain array The redirect chain that was used.
Partial success: If some redirects fail mid-batch, status will be "partial". Already created URLs are returned in redirect_urls, and message contains the error reason.

Endpoint: Get information about subscription and quota

Method: POST

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

Example Request (cURL)

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

Example Request (Python)

import requests

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

Response Format

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