Open Source & Free Usage
Use Symulate SDK completely free with three flexible modes
Symulate SDK is Open Source (MIT License)
Full SDK functionality available completely free. Choose the mode that fits your needs.
Three Usage Modes
Faker Mode
100% free, no API key needed
BYOK Mode
Bring your own OpenAI key
Platform Mode
Full enterprise features
Mode 1: Faker Mode
Perfect for CI/CD pipelines, testing, and basic prototyping. No API keys required!
Installation
npm install @symulate/sdkConfiguration
import { configureSymulate, defineEndpoint, m } from '@symulate/sdk';
// That's it! No API key needed
configureSymulate({
generateMode: 'faker', // Uses Faker.js for deterministic data
});
// Define schema and endpoint
const UserSchema = m.object({
id: m.uuid(),
name: m.person.fullName(),
email: m.email(),
avatar: m.internet.avatar(),
});
export const getUsers = defineEndpoint({
path: '/api/users',
method: 'GET',
schema: UserSchema,
mock: { count: 10 },
});
// Use it - completely free!
const users = await getUsers();π‘ Perfect for:
- β’ CI/CD pipelines (deterministic, reproducible data)
- β’ Unit and integration tests
- β’ Quick prototyping without any setup
- β’ Learning and experimentation
Mode 2: BYOK (Bring Your Own Key)
Get AI-powered realistic data with your own OpenAI API key. No Symulate account needed!
Setup
- Get an OpenAI API key at platform.openai.com/api-keys
- Install Symulate SDK:
npm install @symulate/sdk - Add your key to
.env.local
# .env.local
OPENAI_API_KEY=sk-your-key-hereConfiguration
import { configureSymulate, defineCollection, m, type Infer } from '@symulate/sdk';
// Configure with your OpenAI API key
configureSymulate({
openaiApiKey: process.env.OPENAI_API_KEY, // Your OpenAI key
generateMode: 'ai', // Use AI generation
// persistence defaults to "local" automatically!
});
// Define a collection with full CRUD operations
const ProductSchema = m.object({
id: m.uuid(),
name: m.string(),
price: m.number({ min: 10, max: 1000 }),
category: m.string(),
brand: m.string(),
inStock: m.boolean(),
});
export type Product = Infer<typeof ProductSchema>;
export const products = defineCollection<Product>({
name: 'products',
basePath: '/api/products',
schema: ProductSchema,
seedCount: 20,
seedInstruction: 'Generate realistic e-commerce products',
});
// Use it - full CRUD with AI-generated data
const { data } = await products.list();
await products.create({
name: 'New Item',
price: 29.99,
category: 'Electronics',
brand: 'TechCo',
inStock: true
});
await products.update('id', { price: 24.99 });
await products.delete('id');β¨ What you get:
- β’ AI-realistic, contextual data generation
- β’ Full CRUD operations with stateful collections
- β’ Local persistence (localStorage in browser, filesystem in Node.js)
- β’ Delay and error simulation
- β’ Flexible response schemas with meta fields
- β’ No vendor lock-in - it's your data, your infrastructure
π° Cost: OpenAI API charges (~$0.001 per generation with gpt-4o-mini). Essentially free for most use cases - expect $0.01-0.05 per development session.
Feature Comparison
| Feature | Faker Mode | BYOK | Platform |
|---|---|---|---|
| Cost | 100% Free | ~$0.001/gen | From $49/mo |
| API Key Required | β None | Your OpenAI key | Platform key |
| Data Quality | Basic (valid) | β¨ AI-realistic | β¨ AI-realistic |
| CRUD Collections | β | β | β |
| Endpoints | β | β | β |
| Persistence | Memory/Local | β Local (auto) | β Cloud + Local |
| Delay Simulation | β | β | β |
| Error Simulation | β | β | β |
| Isolated Demos | β | β | β |
| Team Collaboration | β | β | β |
| Custom Domains | β | β | β |
| Support | Community | Community | Priority |
Quick Start Guide
π― Option 1: Faker Mode (Zero Setup)
npm install @symulate/sdkimport { configureSymulate } from '@symulate/sdk';
configureSymulate({
generateMode: 'faker', // That's it!
});π Option 2: BYOK with OpenAI
- 1. Get OpenAI API key
- 2.
npm install @symulate/sdk - 3. Configure:
configureSymulate({
openaiApiKey: process.env.OPENAI_API_KEY,
generateMode: 'ai',
// Persistence auto-defaults to "local"!
});Available Features
π¦ Collections
Full CRUD operations with stateful data, pagination, filtering, and sorting
π Endpoints
REST API mocking with GET, POST, PUT, PATCH, DELETE support
πΎ Persistence
localStorage (browser) and filesystem (Node.js) with automatic fallback
β±οΈ Delay Simulation
Simulate network latency to test loading states
β οΈ Error Simulation
Test error handling with conditional failures and AI-generated error responses
π Meta Fields
Flexible response schemas with pagination and aggregates (avg, sum, min, max, count)
Complete Examples
Check out the examples directory in the SDK repository:
- byok-example.ts - Complete BYOK setup with collections
- flexible-response-schema-example.ts - Custom response formats with meta fields
- delay-simulation-example.ts - Network latency simulation
- error-simulation-example.ts - Error handling patterns
When to Upgrade to Platform
Consider upgrading to Symulate Platform when you need:
π’ Agency & Client Work
Branch isolation lets you create client-specific demos (e.g., demo.clientname.com) with separate data per branch
π₯ Team Collaboration
Share mock data across your team with cloud-hosted persistence and collaborative workspaces
βοΈ Zero Infrastructure
No need to set up local persistence or manage OpenAI keys - it just works
π― Priority Support
Get help from our team when you need it, with dedicated support channels
Ready to upgrade?
Start with our free Platform tier (20K one-time AI tokens) or check out our pricing plans.
