Skip to main content

Package managers

RoZod is available on npm and works with all major JavaScript package managers. Choose your preferred tool below.
npm install rozod

Requirements

RoZod requires the following to run:
  • Node.js 16.x or higher (for NodeJS environments)
  • TypeScript 4.5 or higher (recommended for type safety)
  • Zod 4.x (automatically installed as a dependency)
RoZod works seamlessly in NodeJS, Bun, Deno, and browser environments without any special configuration.

Dependencies

RoZod automatically installs the following dependencies:
  • zod - Schema validation and type inference
  • parse-roblox-errors - Error parsing for Roblox API responses
  • roblox-bat - Hardware-backed authentication support
These are handled automatically during installation - no manual setup required.

Verify installation

After installation, verify RoZod is working correctly:
1

Create a test file

Create a new file called test.ts or test.js in your project:
test.ts
import { fetchApi } from 'rozod';
import { getGamesIcons } from 'rozod/lib/endpoints/gamesv1';

const response = await fetchApi(getGamesIcons, { 
  universeIds: [1534453623] 
});

console.log('RoZod is working!', response.data);
2

Run the test file

Execute the file with your runtime:
node test.js
3

Check the output

You should see game icon data printed to the console. If you see the output, RoZod is installed correctly!

TypeScript configuration

For the best experience with TypeScript, ensure your tsconfig.json includes:
tsconfig.json
{
  "compilerOptions": {
    "strict": true,
    "esModuleInterop": true,
    "moduleResolution": "node",
    "target": "ES2020",
    "module": "ESNext"
  }
}
Enable strict mode in TypeScript to take full advantage of RoZod’s type safety features.

Browser usage

To use RoZod in browser environments, you’ll need a bundler like Vite, Webpack, or Rollup:
import { defineConfig } from 'vite';

export default defineConfig({
  // RoZod works out of the box with Vite
});
In browser environments, RoZod automatically uses cookies from the user’s Roblox session. No authentication setup needed!

Deno usage

For Deno, import RoZod directly from npm:
import { fetchApi } from 'npm:[email protected]';
import { getUsersUserdetails } from 'npm:[email protected]/lib/endpoints/usersv1';

const userInfo = await fetchApi(getUsersUserdetails, { userIds: [1] });
Always specify the version when importing from npm in Deno to ensure consistent behavior.

Next steps

Quickstart

Build your first RoZod application

Authentication

Configure cookies and API keys

Build docs developers (and LLMs) love