Retool: using the VIDAI Control Plane as the backend¶
Retool's OpenAI resource has a Custom API URL field. Point it at the control plane and every AI action, workflow step, and Retool AI block in your apps flows through us.
TL;DR¶
- Resources → Create new → OpenAI.
- Fill in:
- Name:
vidai-control-plane - API Key: your VIDAI API key
- Custom API URL:
https://your-vidai-server.example.com/v1 - Save. In any app, the AI action block can select this resource; the model dropdown accepts any name registered on the control plane.
Prerequisites¶
- A Retool account (Cloud or self-hosted).
- Control plane base URL and an API key from API Keys.
- A model registered on the Models page.
Using the resource¶
In a Retool app:
- Drop an AI action block onto the canvas.
- Resource: pick your
vidai-control-planeresource. - Model: type the model name (e.g.
gpt-4o-mini) or bind it to aselectcomponent's value. - Prompt / Messages: compose from your app's state.
- On the trigger you want (button click, form submit), invoke
aiActionN.trigger().
Every trigger is a control-plane request.
Retool Workflows¶
In a Retool Workflow, the OpenAI block uses the same resource. Every workflow run that hits an OpenAI block is a control-plane request; attribution + cost breakdown works the same as apps.
Attribution¶
One VIDAI API key per Retool team is the tidy default. For per-app attribution, create multiple OpenAI resources with different names + different keys, and pick the appropriate resource per app.
Verify it works¶
A minimal app: a Button that triggers an AI action with the
prompt reply with exactly: ok — bind the result to a Text
component. Click the button; confirm ok in the Text. A row
appears on Request Logs.
If something's off¶
Raise an issue at github.com/vidaiUK/vidai-quickstart/issues with the resource config (masking the key) and the failing action log. We'll get it sorted.