A Node.js wrapper for Koja API services including Ephoto generation, YouTube MP4 and MP3 downloads.
npm install koja-api
const koja = require('koja-api');
// Example 1: Generate ephoto
(async () => {
try {
const ephotoResult = await koja.ephoto(
'https://en.ephoto360.com/ice-text-effect-online-101.html',
'Koja'
);
console.log(ephotoResult);
} catch (error) {
console.error(error);
}
})();
// Example 2: Download YouTube video as MP4
(async () => {
try {
const mp4Result = await koja.ytmp4(
'https://youtu.be/dovWTFlRIWs?si=9DStVzGBfr2-mDfz',
'720p' // optional quality parameter
);
console.log(mp4Result);
} catch (error) {
console.error(error);
}
})();
// Example 3: Download YouTube video as MP3
(async () => {
try {
const mp3Result = await koja.ytmp3(
'https://youtu.be/dovWTFlRIWs?si=9DStVzGBfr2-mDfz',
'320kbps' // optional quality parameter
);
console.log(mp3Result);
} catch (error) {
console.error(error);
}
})();
-
url
(String): The ephoto360 effect URL -
text
(String): The text to apply the effect to
-
url
(String): YouTube video URL -
quality
(String, optional): Preferred quality (e.g., '360p', '720p')
-
url
(String): YouTube video URL -
quality
(String, optional): Preferred quality (e.g., '128kbps', '320kbps')
All methods return a Promise that resolves to an object with the following structure:
{
creator: "ALI KOJA",
status: 200,
success: true,
// Method-specific response data (result/download)
// Metadata (for YouTube methods)
}
MIT