Skip to content

Universal Encoder

Heavstal Universal Encoder is an intelligent transformation engine. It supports standard Base64 and Base32 operations but adds a layer of “Smart Detection.”

Magic Feature: When decoding, if the engine detects that the result is a binary file (Image, Audio, PDF, Zip) or a massive text block, it will automatically upload the result to a cloud host (Catbox) and return a direct download link instead of crashing your app with raw binary data.

POST /encoder

FieldTypeRequiredDescription
textstringYesThe string to process.
typestringNo’base64’ (default) or ‘base32’.
modestringNo’encode’ (default) or ‘decode’.
const res = await fetch('https://heavstal.com.ng/api/v1/encoder', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'x-api-key': 'YOUR_API_KEY'
},
body: JSON.stringify({
text: 'Heavstal Tech',
mode: 'encode'
})
});
{
"status": "success",
"creator": "HEAVSTAL TECH",
"data": {
"type": "base64",
"mode": "encode",
"output": "SGVhdnN0YWwgVGVjaA==",
"is_file": false
}
}

If you send a Base64 string that represents an image, the API detects it.

const res = await fetch('https://heavstal.com.ng/api/v1/encoder', {
method: 'POST',
headers: { 'x-api-key': 'YOUR_API_KEY' },
body: JSON.stringify({
text: '/9j/4AAQSkZJRgABAQAAAQABAAD...', // A long JPG base64 string
mode: 'decode'
})
});
{
"status": "success",
"creator": "HEAVSTAL TECH",
"data": {
"type": "base64",
"mode": "decode",
"output": "https://files.catbox.moe/xyz123.jpg",
"is_file": true,
"file_type": "JPG",
"file_size": "450.20 KB"
}
}