Skip to content

Installation

Terminal window
npm install rozod
  • TypeScript 5.0+ — RoZod relies on modern TypeScript features for type inference
  • Node.js 18+, Bun, or Deno — any runtime with a global fetch implementation
  • Also works in browsers and browser extensions (Chrome, Firefox, etc.)

RoZod has three runtime dependencies:

  • zod — Schema definitions that power type inference (not used for runtime validation)
  • roblox-bat — Hardware-backed authentication (HBA) header generation
  • parse-roblox-errors — Structured error parsing for Roblox API responses

All endpoint type definitions are included in the package at zero runtime cost.

After installing, you import endpoints from their respective modules:

// Core functions
import { fetchApi, configureServer } from 'rozod';
// Classic API endpoints (one file per Roblox service)
import { getUsersUserid } from 'rozod/lib/endpoints/usersv1';
import { getGroupsGroupid } from 'rozod/lib/endpoints/groupsv1';
// OpenCloud endpoints
import { v1, v2 } from 'rozod/lib/opencloud';

Each endpoint file maps to a Roblox API service (e.g., usersv1, groupsv1, catalogv1). See the API Reference for a full list.