Welcome to LaunchVerseQuickstartDashboard OverviewImporting Projects
Deployment GuideEnvironment VariablesLaunchverse ForgePreview EnvironmentsEnvironment Variable VersioningRollback & PromoteHow Builds Work (Forge)
Helix CopilotEphemeral SandboxesAI Log Explainer
The LaunchVerse EdgeCustom Domains & TLSDomain PurchasingTwo-Factor Authentication (TOTP)IP Allowlists
Managed DatabasesScale to ZeroLog DrainsDatabase Backups & Point-in-Time RecoveryObservabilityWeb Analytics & Traffic Tracking
Project GroupsRole-Based Access Control (RBAC)
Student ProgramDeveloper Streaks
API Reference
Changelog
SDKsHelix Gateway SDK
Web Shell
API Reference (Redoc)

Helix Gateway SDK

@launchverse/helix-gateway is the official TypeScript client for the Helix OpenAI-compatible gateway. It works with any environment that supports the global fetch API.

Install

npm install @launchverse/helix-gateway

Quick start

import { HelixGatewayClient } from "@launchverse/helix-gateway";

const helix = new HelixGatewayClient({
  apiKey: process.env.HELIX_API_KEY!,
  baseURL: "https://api.launchverse.app/api/v1",
  projectId: process.env.HELIX_PROJECT_ID,
});

const response = await helix.chat({
  model: "helix-operator",
  messages: [
    { role: "user", content: "Deploy the Next.js app from my repository and verify /api/health." },
  ],
});

console.log(response.choices[0].message.content);

Streaming

const stream = await helix.streamChat({
  model: "helix-operator",
  messages: [
    { role: "user", content: "Fix the Prisma relation and redeploy." },
  ],
});

for await (const chunk of stream) {
  process.stdout.write(chunk.choices[0]?.delta?.content || "");
}

List models

const models = await helix.listModels();
console.log(models.data.map((m) => m.id));
// ["helix-advisor", "helix-operator", "helix-autopilot"]

Usage report

const usage = await helix.getUsage({
  start: new Date(Date.now() - 7 * 24 * 60 * 60 * 1000).toISOString(),
  end: new Date().toISOString(),
});

Constructor options

OptionTypeRequiredDescription
apiKeystringyesHelix API key
baseURLstringnoDefaults to https://api.launchverse.app/api/v1
projectIdstringno*Required for helix-operator / helix-autopilot
autonomyLevel0-4noOverride default autonomy
threadIdstringnoContinue an existing thread

Errors

All methods throw HelixGatewayError on non-2xx responses:

try {
  await helix.chat({ model: "helix-operator", messages: [] });
} catch (error) {
  if (error instanceof HelixGatewayError) {
    console.error(error.status, error.code, error.message);
  }
}
Edit this page on GitHub↗