Help Documentation

AntimenaJS - AI Image Generator Add-on For Palleon Javascript Image Editor

Antimena allows you to generate AI images without leaving Palleon interface. Antimena is integrated with Stability.ai and Clipdrop API's. You should sign up to the API's for free and create personal API keys to get started. All new users are granted a small amount of free credits upon creating an account. After depleting your free credits, additional credits can be purchased.

1) Stability.ai

Authentication

You can create an account by visiting dreamstudio.ai. Access to your API keys can then be managed through DreamStudio's account page. All DreamStudio accounts are assigned a default API key on creation.To find your key, first navigate to your profile picture in the upper right hand corner and click on it.

In the API Keys panel you'll see a listing of all active API keys for your account.

Copy the contents of any key you'd like to use by clicking Copy.

Your API key needs to be kept secret. Someone could drain your credits if your key is compromised. If you suspect your key has been leaked, first create a new one from your account page, and then delete the old one as shown below.

Credits + Billing

Credits are required to use the API. All new users are granted 25 free credits upon creating an account. Your 25 initial free credits represent approximately 50 images with the API's default settings.

After depleting your free credits, additional credits can be purchased via your DreamStudio Account page. Credits can be purchased on the DreamStudio Account page in any desired amount, with a minimum $10 purchase for 1000 credits.

2) OpenAI

Create an account and create a secret key by visiting openai.com.

You only pay for what you use on OpenAI. OpenAI Image Models Pricing.

3) Clipdrop

Clipdrop provides some handy AI tools that can help you save time and be more productive.To create a Clipdrop account, click here...

Once logged in, you can claim 100 free ClipDrop APIs credits. Once the 100 images have been consumed, further calls will be rejected. You can purchase more credits from this page...

Your API key needs to be kept secret. Someone could drain your credits if your key is compromised. If you suspect your key has been leaked, revoke the api key and generate new one from your account.

AntimenaJS is a PalleonJS addon (Minimum supported version 2.1) and can be integrated to PalleonJS only.
You can buy the plugin on Codecanyon.
Click here to read PalleonJS documentation.

Step 1 - Include required files to PalleonJS

1) Open the zip file which you have downloaded from your Codecanyon account.

2) Move the antimena.css file to the palleon-js/css folder.

3) Move the antimena.js file to the palleon-js/js folder.

4) Move the ai-placeholder.png file to the palleon-js/assets folder.

5) Put the php folder into the palleon-js folder.


Step 2 - Edit PalleonJS files

1) Open palleon-js/index.html file and add the following code into <head> tag.

<link href="css/antimena.css" rel="stylesheet" type="text/css">

2) Open palleon-js/index.html file and add the following code before </body> tag.

<script src="js/antimena.js"></script>

3) Open palleon-js/js/custom.js file and add the following code into customFunctions function.

if (typeof antimena === 'function') {
    antimena(selector, canvas, lazyLoadInstance);
}

Step 3 - Add your API keys

You can add your API keys directly to the js/antimena.js file.

usePHP must be false;

But this is not recommended. You should store your API keys on the server side to prevent them from being stolen. The PHP function will only respond if the request comes from the same domain. You can add your API keys by editing the php/get_api_keys.php file.

usePHP must be true

In order for "get_api_keys.php" file to run on your server, your server must support PHP.

Step 4 (Optional) - Save Image

To make the "save image" button to work, you must edit the following codes below according to your needs. It is in js/antimena.js file.