Edit on GitHub
Getting Started5 min read

Introduction

Vault is a type-safe inference SDK for JavaScript and TypeScript. It gives your application a single, consistent interface to foundation models -- handling authentication, retries, streaming, and schema validation so you can focus on what you are building.

What is Vault

The Vault SDK wraps the Vault inference API with a strongly-typed client. Every request is validated at the call site -- wrong model names, missing parameters, and type mismatches are caught before they hit the network.

Under the hood, Vault manages connection pooling, exponential backoff on transient errors, and request deduplication. You get reliable inference without writing retry logic yourself.

Vault is not a model. It is a client library that routes requests to the model endpoints you configure in your workspace.

Key Features

Type-safe clientFull TypeScript types for every model, parameter, and response field.
StreamingFirst-class async generator API for token-by-token streaming.
Zod validationSchema validation on inputs and outputs. Catch errors at the boundary.
Retry logicConfigurable exponential backoff on 429, 500, and 503 responses.
Workspace isolationRoute requests to separate workspaces by environment or team.
Edge-compatibleWorks in Node.js, Deno, Bun, and V8-based edge runtimes.

Architecture

Requests flow from your application through the Vault client to the inference API. The client handles serialization, auth headers, and response parsing. Your code only sees typed inputs and outputs.

text
Your App
    │
    ▼
VaultClient (SDK)
    │  type-check · validate · retry
    ▼
Vault Inference API
    │
    ▼
Model Endpoint (vault-3-turbo, vault-3-pro, …)
    │
    ▼
Response → parsed, typed, returned to your app

Next Steps

Quick StartInstall the SDK and send your first request in under five minutes.
Core ConceptsUnderstand workspaces, models, and how the inference pipeline works.
Installationnpm, pnpm, yarn, Docker, and self-hosted setup options.