Zapier: using the VIDAI Control Plane as the backend¶
Zapier's built-in OpenAI integration points at
api.openai.com; it doesn't expose a base URL you can
override. The way to reach the control plane from a Zap is
through Webhooks by Zapier (call our /v1/chat/completions
directly) or Code by Zapier (run a Python snippet that uses
the OpenAI SDK).
TL;DR — Webhooks by Zapier¶
Add a Webhooks by Zapier → POST action:
- URL:
https://your-vidai-server.example.com/v1/chat/completions - Payload Type:
JSON - Data:
- Headers:
Authorization: Bearer your-vidai-keyContent-Type: application/json
The response JSON is parsed into a step-output object; map
choices.0.message.content into your downstream steps.
TL;DR — Code by Zapier (Python)¶
Add a Code by Zapier → Run Python action:
from openai import OpenAI
client = OpenAI(
base_url="https://your-vidai-server.example.com/v1",
api_key="your-vidai-key",
)
resp = client.chat.completions.create(
model="gpt-4o-mini",
messages=[{"role": "user", "content": input_data["prompt"]}],
)
return {"reply": resp.choices[0].message.content}
Input variables (like prompt) come from the trigger step.
Prerequisites¶
- A Zapier account (any tier — Webhooks by Zapier is available on the free plan).
- Control plane base URL and an API key from API Keys.
- A model registered on the Models page.
Storing the API key¶
Zapier doesn't have first-class secret management on Webhooks/Code actions. Two safe options:
- Store the key in a Zapier Storage app and read it at step time.
- Use Zapier Team accounts' shared credentials if your plan supports them.
Don't paste the key into a Zap you're going to share as a template.
Attribution¶
One VIDAI API key per Zap (or per team of Zaps) — the API key determines the Chargeback line.
Verify it works¶
Build a two-step Zap: Manual Trigger → Webhooks by
Zapier POST using the payload above with the message
reply with exactly: ok. Run once. Inspect the response body
— should contain "content": "ok" (or similar). A row appears
on Request Logs.
If something's off¶
Raise an issue at github.com/vidaiUK/vidai-quickstart/issues with the failing step's request body + response (mask keys). We'll get it sorted.