Vela Developer Documents

SDK setup, Hosted Connect, and relay integration notes for the OpenRouter-backed MVP.

1. Register an app

Create an app in the Developer Console and keep the issued App ID and App token on your server.

VELA_BASE_URL=http://localhost:8787
VELA_APP_ID=app_example
VELA_APP_TOKEN=vela_sk_example

2. Start Hosted Connect

Use the SDK to create a Hosted Connect session, then redirect the customer to the returned URL.

const session = await vela.createConnectSession({
  appId: process.env.VELA_APP_ID,
  returnUrl: "https://your-app.example.com/settings"
});

3. Authorize before execution

Call Vela before model execution. When allowed, use the short-lived relay credential for OpenAI-compatible clients.

const decision = await vela.authorizeExecution({
  appId,
  customerTenantId,
  delegationId,
  requestedModel: "openai/gpt-4o-mini",
  estimatedCostUsd: 0.01,
  zeroDataRetentionCapable: true
});