Skip to main content

Tutorial: Transparent Image Maker Agent

This agent specializes in removing image backgrounds. If you have a photo from which you require the background to be removed, this is your go-to solution. This agent can help you isolate the subject from its surroundings, unclutter the image, and improve its focus. This can be particularly helpful for product images, professional headshots, or any image that you want to customize for different needs.

RemoveBG API Key

  1. Go to https://www.remove.bg/api#remove-background
  2. If you do not have an account, proceed to create one by following the registration process.
  3. Go to your profile located in the upper right corner and select My Account.
alt text
  1. Click on API Keys on your dashboard, then click the New API Key button.
alt text
  1. Create a key label for easy identification of your API key, then click Create API Key button.
alt text
  1. Copy your API Key and click the Save Changes button.
alt text

Agent Setup

  1. In SmythOS, navigate to the Templates tab.
alt text
  1. You can scroll down to find the Transparent Image Maker or simply search for it in the Search tab, then click the Remix button.
alt text
  1. Allow the template to initialize and configure.

Adding API Key to the Vault

Your API Key will be needed on your Remove Background API Call component.

  1. Navigate to the Vault section on your SmythOS dashboard.
alt text
  1. Click the Add Key button to add your RemoveBG API Key.
alt text
  1. Input the RemoveBG API Key generated from your RemoveBG account.
alt text
  1. Select a distinct Key name that you can readily differentiate whenever it is required for use.
alt text
  1. Choose API Call for the Scope and click Done to save your API Key.
alt text
  1. Your RemoveBG API Key has been successfully added to your Vault and is now ready for use.
alt text

API Call Component Setup

  1. Locate the Remove Background API Call component that has a missing key. Click the gear icon to access its settings. Then, then click the edit button situated in the headers section.
alt text
  1. Highlight the text, then click on the key icon. Choose the RemoveBG API Key stored in your Vault, and finally, click the Save button.
alt text
  1. Once saved, your API key is now added in the headers section. Additionally, don’t forget to click the checkmark icon to save your configuration.
alt text
  1. You’re all set!

Test the Agent

  1. Open the chatbot embodiment.
alt text
  1. Open the debugger when testing via the chat embodiment to preview the generated image.
alt text
  1. In the chat embodiment, ask the agent to remove the background of your preferred image using a prompt.

    1. Sample Prompt:
      1. Remove the background from this image: Classic turquoise VW Beetle parked on a cobblestone street in a quaint European village.
  2. When the debugger is successfully attached, click Run to allow the agent to proceed with the process. It won't proceed unless Run is clicked.

alt text
alt text
  1. In the Image Generator component, hover over the output and click Preview to see the generated image before the background removal.
alt text
  1. This is the preview image. You can also open it in a new tab.
alt text
  1. In the Remove Background component, you can check the preview of the image with the background removed.
alt text
  1. Here’s the preview.
alt text
  1. Background successfully removed. You can go to the preview or click the link to download the image.
alt text