AI Art QR Code
On this page, you can see how to run the “AI Art QR Code” model with its most basic steps.
Last updated
On this page, you can see how to run the “AI Art QR Code” model with its most basic steps.
Last updated
Learn more about the “AI Art QR Code” endpoints by clicking here.
Create a new data type
Create data fields
output_urls
→ You can customize the number of QR codes to be generated with the “num_outputs” property. If you will generate multiple, it would be better to store this field as a list.
run_id
→ The ID of the AI model that will run after initiation. You can track the process with the value in this field.
status
→ You can track the status of the process with the value in this field.
Draw an input to get a prompt from the user
Draw an input to get QR Data from the user
Draw a button to start the workflow
Set a workflow with button click event and add the "Aicado AI - AI Art QR Code" action
We are using the input values for qr_data
and prompt
. And leaving the other properties as default. You can customize these according to your needs.
Also, we are leaving the response_web field empty for now. Once we create our endpoint on the backend workflows side, we will define the relevant endpoint here.
Store the run_id
track the process
Learn how to get your access_token
by clicking here.
We recommend using the ":formatted as JSON-safe" operator for the values you will enter in the "prompt
" and "negative_prompt
" keys. Thus, you will avoid characters that will break the JSON structure.
Switch to backend workflows and add a new API workflow to use as a webhook that tracks the process by receiving updates automatically
Important Note: If you check the 'This workflow can be run without authentication' checkbox, it means that anyone can trigger this endpoint without any authentication. This can be a risky choice. The security you provide when exposing your endpoints publicly is not Aicado AI's responsibility. Please get information about API Workflow Security from the Bubble Manual if you are not familiar with it.,
To process the response data, you need to initialize your endpoint at the first run operation. To do that, click on the “Detect Data” on your backend WF.
Copy your endpoint url.
Open a new tab on your browser (Otherwise the “Detect Data” window will be closed) and go to the “Workflow” tab of your app editor. Enter your “endpoint url” into the response_web
field property in the action that you’d like to run a model.
Preview your app and run the workflow event. Once you do that, your Backend API WF automatically detect to request data. Click on the “Save” button
After the initiliazition, you should delete the initialize from the query.
Get more response value
The webhook we set up will run every time the status of the prediction model is updated. When we get the parameters with "Detect Data" in the previous steps, we get the prediction status when it is "starting". However, when the status returns to "succeeded", we can get different data from the model and use it. The easiest way to do this is to manually manipulate the JSON with "Modify types" after completing the "Detect Data" steps.
Let’s do it!
Click on the “Modify types” button
Then, show the raw data and click to the “Edit raw data” text
In this field, we will paste the response JSON that the "Auto Remove Anything" endpoint in our documentation should return at status code "200".
Only copy highlighted text (between response brackets) on the below image:
Find the prediction process in your database filtering by run_id
Modify data by using the “Aicado AI - AI Art QR Code” data call
No matter which model you are building, the pattern you will follow will be the same. JSON responses of all endpoints can be found here.
Return to your "Design" tab and add a Repeating Group that retrieves results from your app’s database.
Add image and text elements to the Repeating Group’s cell to display the output and status. These values will be updated as your webhook is triggered.
Preview it and run
And, here is the result!