SAMMI Extensions
AI Image Generator
Easily generate and edit AI images with simple SAMMI commands using DALL-E.
Features
Generating images
- Generate new image(s) based on a prompt with DALL-E 2 or DALL-E 3 models
- Generate image variation(s) based on a provided image
- Generate image edit(s) based on a provided image and mask.
Saving Images
- Saves the generated image(s) to URL or to a file.
Verifying Prompts
- Verify the prompt is safe before generating an image (0 cost)
User friendly
- Lots of checks implemented to avoid sending invalid parameters to Open API
- Automatically generates new file names to prevent overwriting old files
- Saves image URLs or file paths in an array within the button for easy access
- All image URLs are also saved in a text file to prevent loss in case of crashes
Setup
DALL-E Service Warning
DALL-E is a paid service requiring an OpenAI account and a credit card. Monitor your usage and set limits via the OpenAI dashboard.
- Install the extension. You can follow the Extension Install Guide.
- Setup your INIT button:
- API Key:
- Go to OpenAI.
- Create an account or log in.
- Access the API Keys page and create a new secret key.
- Enter the key in the OpenAI API box within the INIT button.
- Add your payment method in the Billing section and add credits to your balance or enable auto-recharge.
- Set your usage limits.
- API Key:
Available Commands
Command Usage Reminder
These commands require a waiting period before 'Save Variable As' is populated. Use the Wait Until Variable Exists command, and remember to delete the variable you're waiting for beforehand.
DALL-E Generate (DALL-E 2)
Generates a new image based on a prompt using the DALL-E 2 model.
Box Name | Description |
---|---|
Prompt | The image description (max 1000 characters). The more detailed, the better. |
Amount | Number of images to generate (1–10). |
Size | Size of the generated image. |
Response | Save the image as a file or URL. If saving it as a file, it will be saved in your SAMMI folder/Ext/image generations. To prevent files from being accidentally overridden, the filename is automatically generated in the following format: DALL·E {timestamp} - {truncated prompt}_{index}.png |
Save As Variable | Variable to save the result into, won't be set at all if generating failed. If saving the image as a file, it will be an array containing all image file paths. If saving the image as a URL, it will be an array containing all image URLs. |
Save as (status) | Variable name to save the status result (1 for success, 0 for failure). |
DALL-E 3 Generate
Generates a new image based on a prompt using the DALL-E 3 model.
Box Name | Description |
---|---|
Prompt | The image description (max 1000 characters). The more detailed, the better. |
Amount | Number of images to generate (currently supports 1 image). |
Quality | HD for higher quality, or Standard for regular quality. |
Size | Size of the generated image. |
Style | Vivid for hyper-realism, or Natural for more realistic images. |
Response | Save the image as a file or URL. If saving it as a file, it will be saved in your SAMMI folder/Ext/image generations. To prevent files from being accidentally overridden, the filename is automatically generated in the following format: DALL·E {timestamp} - {truncated prompt}_{index}.png |
Save As Variable | Variable to save the result into, won't be set at all if generating failed. If saving the image as a file, it will be an array containing all image file paths. If saving the image as a URL, it will be an array containing all image URLs. |
Save as (status) | Variable name to save the status result (1 for success, 0 for failure). |
DALL-E Variations
Generates image variations based on a supplied image using the DALL-E 2 model.
Box Name | Description |
---|---|
Image File Path | The image to use as the basis for the variation(s). Must be a valid PNG file, less than 4MB, and square |
Amount | Number of images to generate (1–10). |
Size | Size of the generated images. |
Response | Save the image as a file or as a URL. If saving it as a file, it will be saved in your SAMMI folder/Ext/image generations. To prevent files from being accidentally overridden, the filename is automatically generated in the following format: DALL·E Variations {timestamp} - {filename}_{index}.png |
Save As Variable | Variable to save the result into. If saving the image as a file, it will be an array containing all image file paths. If saving the image as a URL, it will be an array containing all image URLs. |
Save as (status) | Variable name to save the status result (1 for success, 0 for failure). |
DALL-E Edit
Creates an edited image based on an original image and a prompt using the DALL-E 2 model.
Box Name | Description |
---|---|
Image File Path | The image to edit, must be a valid PNG file, less than 4MB, and square. |
Mask File Path | An additional image whose fully transparent areas indicate where the image should be edited. Must be a valid PNG file, less than 4MB, and square. |
Prompt | Description of the desired edit (max 1000 characters). |
Amount | Number of images to generate (1–10). |
Size | Size of the generated image. |
Response | Save the image as a file or as a URL. If saving it as a file, it will be saved in your SAMMI folder/Ext/image generations. To prevent files from being accidentally overridden, the filename is automatically generated in the following format: DALL·E Variations {timestamp} - {filename}_{index}.png |
Save As Variable | Variable to save the result into. If saving the image as a file, it will be an array containing all image file paths. If saving the image as a URL, it will be an array containing all image URLs. |
Save as (status) | Variable name to save the status result (1 for success, 0 for failure). |
DALL-E Verify Prompt
Verifies the prompt is safe before attempting to generate an image. This is a free endpoint.
The response will contain an object with detailed categories and their scores.
The easiest way to see if the prompt has been tagged is to check the flagged
key.
Box Name | Description |
---|---|
Prompt | The prompt to verify. |
Save As Variable | Variable name to save the verification result. |
Save as (status) | Variable name to save the status result (1 for success, 0 for failure). |
By installing this extension, you agree to monitor your usage and cost. If you notice high usage, please uninstall and report it to Christina on Itch or Discord.
Get Help
Please see Troubleshooting for common extensions issues.