Skip to content

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

  1. Resources → Create new → OpenAI.
  2. Fill in:
  3. Name: vidai-control-plane
  4. API Key: your VIDAI API key
  5. Custom API URL: https://your-vidai-server.example.com/v1
  6. 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:

  1. Drop an AI action block onto the canvas.
  2. Resource: pick your vidai-control-plane resource.
  3. Model: type the model name (e.g. gpt-4o-mini) or bind it to a select component's value.
  4. Prompt / Messages: compose from your app's state.
  5. 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.

Where to go next