Volt
Cookbook

TypeScript quickstart

Using Volt from TypeScript / Node.

The TypeScript SDK (@thevoltcloud/sdk) is rolling out. The shape below is stable; until it ships you can call the REST API directly.

import { Volt } from "@thevoltcloud/sdk";

const client = new Volt({
  apiKey: process.env.VOLT_API_KEY!,
  sovereign: true,
  pinnedMetro: "us-east-iad",
});

const resp = await client.chat.completions.create({
  model: "llama-3.3-70b-instruct",
  messages: [{ role: "user", content: "Summarize" }],
  podAffinity: "session-42",
});
console.log(resp.volt.podId, resp.volt.ttftMs);