When you decide to use any model of Aicado AI, you can start the prediction for the relevant model with the actions provided by the plugin, and get the results with data calls. However, to use the actions and data calls, you need an access_token
. Therefore, th e first step is to obtain the Access Token, the second step is to run the model, and the third step is to return the result.
As we mentioned above, you will need an access_token
for every run. You can create a field in the database for the access token and update this field every 24 hours (since the access token expires 24 hours after being obtained) with a recursive backend workflow. Alternatively, you can regenerate the Access Token each time before you run a model with an action.
<aside> đź“Ť You only need to do the access token acquisition step you see below once for each template.
</aside>
Aicado AI offers more than 10 models. Each of these models has its own actions and data calls. Therefore, you can use the actions of the model you want at any time.
<aside>
đź’ˇ Each model can be used with actions. And all the actions have 3 common properties. These are:
base_url
→ The base URL to send all API requests is https://run.aicado.ai/api/1.1/wf
. HTTPS is required for all API requests. This field already has a default value and you don’t have to change it.
prompt
→ Enter your prompt here.
response_web
→ Set a webhook to get notification while your run process status is updated. Enter your endpoint here. On the next step called “Get result” we dig down here.
</aside>
To use a model, add the relevant action to an event as an action like the screenshot below:
When you add a new action, you will see different properties in addition to the above common properties. These are the settings of the model. And all of them has their own documentation. You can see them by clicking “show documentation” text. And, you are able to customize them as best fits for you.
<aside> ⚠️ IMPORTANT: Make sure that the URLs you define to the properties have the "https" protocol. Otherwise you will get an error. For example, when you use the expression "PictureUploader's Value", you must add the static text "https:" as a prefix to this expression
</aside>
<aside>
đź“Ś RECOMMENDATION: 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.
</aside>
Aicado AI provides results by the run_id
. So, when you run a model, you need to store the run_id
of the model to track its result. To do that, you should consider creating a new data field to store it, like the screenshot below:
To store it, after you run the action, you can add a new step that creates a new data entry to store the run_id
<aside> đź’ˇ You can see the all responses of endpoints by clicking here.
</aside>