Platform services
AI
The AI service connects your project to an LLM provider — OpenAI or Anthropic (Claude) — with a shared, Dreambase-managed key or a dedicated key you provide. You choose the models to work with, and the connection details are exposed as outputs for other services.
What it does
Dreambase POSTs webhook events to the AI service; the service verifies the provider credentials, resolves the chosen model list, runs health checks, reports metrics, and executes function calls — then calls back into the Dreambase API to report status, logs, and outputs (the API key, models, and API URL).
Deployments connect, they don’t provision
The AI integrations deploy like any other service, but there is no infrastructure to stand up — a deployment validates the key, resolves the chosen models, and publishes the connection details as outputs. They run on Vercel without limitation, since every handler only makes outbound API calls.Integrations
Each integration has its own dedicated reference page:
OpenAI
Connect to the OpenAI API. Chat completions, embeddings, and model listing via function calls.
Anthropic
Connect to the Anthropic (Claude) API. Messages, token counting, and model listing via function calls.
Each integration is its own webhook route:
/openai/webhook/anthropic/webhookShared vs dedicated
Both integrations are switched by the serverType input:
- shared (default) — use a Dreambase-managed key (
OPENAI_SHARED_API_KEY/ANTHROPIC_SHARED_API_KEY). Ideal for MVPs and development, with no setup required. - dedicated — bring your own API key. A
{{env.KEY}}reference is resolved from a stored secret so keys stay out of the canvas.
Every instance lets you choose the modelsyou want to work with (a comma-separated list); the first one is the default when a function call doesn't name a model.
Events they handle
Both routes understand the same event names:
WEBHOOK_CHALLENGE— verify the webhook endpoint.HEALTH_CHECK— confirm the provider API is reachable with the configured key.METRIC_UPDATE— report the number of available and configured models.DEPLOYMENT_CREATED— verify the key and publish the connection details (API key, models, API URL) as outputs.DEPLOYMENT_DELETED— stop tracking the connection.FUNCTION_CALL— run a named function (chat, embeddings, token counting, model listing).
Configuration
The service is configured through environment variables:
| Variable | Required | Description |
|---|---|---|
DREAMBASE_API_URL | yes | Base URL of the Dreambase API the service calls back into. |
CORS_ORIGINS | prod | Comma-separated allowed origins. |
OPENAI_SHARED_API_KEY | optional | Shared OpenAI key used for serverType=shared. |
OPENAI_BASE_URL | optional | Default OpenAI base URL (default https://api.openai.com/v1). |
ANTHROPIC_SHARED_API_KEY | optional | Shared Anthropic key used for serverType=shared. |
ANTHROPIC_BASE_URL | optional | Default Anthropic base URL (default https://api.anthropic.com). |
PORT | optional | Local server port (default 3010; unused on Vercel). |