Installation
Install
Section titled “Install”npm install rozodbun add rozodpnpm add rozodyarn add rozodRequirements
Section titled “Requirements”- TypeScript 5.0+ — RoZod relies on modern TypeScript features for type inference
- Node.js 18+, Bun, or Deno — any runtime with a global
fetchimplementation - Also works in browsers and browser extensions (Chrome, Firefox, etc.)
What’s Included
Section titled “What’s Included”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.
Project Structure
Section titled “Project Structure”After installing, you import endpoints from their respective modules:
// Core functionsimport { 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 endpointsimport { 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.