Skip to main content
The Verial SDK (@verial-ai/sdk) is the recommended way to integrate Verial into TypeScript and Node.js applications. It wraps every REST endpoint with typed methods, handles authentication, retries, and pagination, and ships with a CLI for common workflows.

Installation

Install the package, configure the client, and verify setup.

Usage

End-to-end examples: create environments, run benchmarks, read results.

Errors

Typed error hierarchy, retry behavior, and status code mapping.

Pagination

Cursor-based iteration across list endpoints.

What the Client Exposes

import { Verial } from '@verial-ai/sdk'

const verial = new Verial({ apiKey: process.env.VERIAL_API_KEY! })

verial.environments // Environments resource
verial.simulators   // Simulators resource
verial.datasets     // Datasets resource
verial.benchmarks   // Benchmarks resource
verial.tasks        // Tasks resource
verial.evals        // Evals (criteria) resource
verial.playgrounds  // Playgrounds resource
verial.sandboxes    // Sandboxes resource
verial.runs         // Benchmark runs resource
verial.taskRuns     // Task runs resource
verial.evalRuns     // Eval (criterion) runs resource
Each resource mirrors the corresponding REST endpoint group. See the Resources section of the sidebar for per-resource reference.

Design Principles

  • Typed everywhere. Every argument and return value is typed against the Prisma schema, including enums like SimulatorType and Verdict.
  • Snake to camel at the boundary. The wire is snake_case; the SDK surface is camelCase. You never see snake_case in your code.
  • Retries on transient failures. 408/429/500/502/503/504 are retried with exponential backoff and jitter; retry-after on 429 is honored.
  • No hidden state. The client is a thin wrapper around fetch. Hooks let you observe every request, response, and error without patching.

Requirements

  • Node.js 18+
  • ESM project ("type": "module" in package.json, .mts extensions, or a bundler that resolves ESM)

Install

npm install @verial-ai/sdk