Skip to main content
We recommend using the TypeScript SDK for the best developer experience. The SDK is fully type-safe and exports all up-to-date types automatically.
If you’re using fetch directly and need type definitions, you can import them from the SDK or copy the definitions below.

Importing from the SDK

The @usemarble/sdk package exports all TypeScript types:

Type Definitions

If you prefer to copy the types directly into your project, here are the complete type definitions:
Copy these type definitions into a types/marble.ts file in your project. If you prefer a published package, use the official SDK that exports these types.

NPM package

The official @usemarble/sdk package exports all TypeScript types shown on this page. Installing the package avoids copying the type definitions into multiple projects. To install the package run:
You can import the types like this:
The package will be kept up-to-date with the API types.

Zod Schemas

For runtime validation, you can also create Zod schemas for your data: