✅ Link to the plugin page: https://zeroqode.com/plugin/replicate-ai-modelsplugin-for-bubble-1738947983097x768540118909296900
Demo to preview the plugin:
Introduction
The Replicate AI plugin enables you to harness the power of the Replicate AI platform and its models for advanced machine-learning tasks. This plugin allows you to generate, manage, and retrieve predictions using various AI models hosted on Replicate.
Every time you run a model, you're creating a prediction. A prediction is the result generated by an AI model in response to specific inputs provided by the user. It involves processing the input data—such as a text prompt, image, or other parameters—through a trained model to produce an output.
Input and output (including any files) are automatically deleted after an hour for any predictions created through the API, so you must save a copy of any files in the output if you'd like to continue using them.
Some models execute rapidly and may provide results in just a few milliseconds. However, more complex models, such as those generating images from text prompts, may require significantly more time to complete.
To handle this effectively:
- Wait for Response: You can configure the action to wait for the response. While this works well for faster predictions, it may not suffice for models that take longer to process.
- Using a Webhook: For lengthy predictions, it is highly recommended to provide a webhook URL. This allows the model to send updates to your server as soon as the prediction is ready, ensuring you don't miss the result.
- Manual Retrieval: If you prefer not to use a webhook or are unable to, you can manually query the prediction status later to retrieve the output once it's completed.
Available Models In The Plugin
- A generative model for creating high-quality images from textual prompts.
- Use Case: Generating artistic, photorealistic, or abstract visuals.
2. GFPGAN
- A generative model designed to enhance and restore facial features in images.
- Use Case: Improving image quality, restoring old or damaged photos.
3. SDXL
- An advanced version of the Stable Diffusion model with extended capabilities.
- Use Case: Producing ultra-high-resolution images with finer details.
4. Music-01
- A model specialized in generating music or audio based on input prompts and references.
- Use Case: Composing music tracks or audio samples.
- A premium model for advanced generative tasks requiring high fidelity and precision.
- Use Case: Creating cutting-edge visuals, animations, or simulations.
Prerequisites
To create a Replicate AI account, you first need to have a GitHub account. After setting up your GitHub account, you can sign up for Replicate AI using GitHub for authentication.
How to setup
- Create an account on Replicate AI or sign in to an existing one.
2. Set up the billing for the account, in the account “Setting” tab → “Billing” section.
- Go to “API tokens” tab and create a token.
- Copy the token and set it up in the plugin settings on bubble page for secure usage of the Replicate AI.
Plugin Data/Action Calls (API Calls only)
Create Prediction - Stable Diffusion
Create Prediction - GFPGAN
Create Prediction - SDXL
Create Prediction - Music-01
Create Prediction - FLUX 1.1 [Pro]
Get Prediction
Cancel Prediction
List Predictions
How To Set Up The Webhooks
Webhook URL is used to receive updates about the status of a prediction, such as completion or failure, without the need for continuous polling. When a webhook URL is provided, the service will send an HTTP POST request to the specified URL containing the prediction status and results.
- In your bubble app → Backend Workflows create a “New API workflow”
- Give it a name and set it up like in the image
- Click on “Detect data” button and copy the link from the screen.
- Meanwhile in a new tab while this tab is still open and detecting, create any prediction with the plugin that has this copied URL set up as the webhook URL.
- When the prediction is created, the data will be detected in backend workflows. Now every prediction that has this URL when created will be triggered on updates in backend workflow.