API documentation

Introduction

The SynGen API lets you generate synthetic data programmatically — to create test data, seed databases, or produce sample datasets from any language.

Base URL http://localhost:8000 (self-hosted FastAPI — no public hosted API)

Quick start

$ curl -X POST http://localhost:8000/generate \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "rows": 10, "format": "json", "fields": [ {"name": "id", "type": "integer", "constraints": {"min": 1, "max": 1000}}, {"name": "email", "type": "email"}, {"name": "name", "type": "name"} ] }'

Supported data types

Type Description Constraints
integer Random integer value min, max
float Random decimal value min, max, precision
string Random string min_length, max_length
name Realistic person name -
email Valid email address -
phone Phone number -
company Company name -
address Street address -
city City name -
country Country name -
date Date (YYYY-MM-DD) start, end
datetime Date and time start, end
boolean True/False value -
uuid UUID v4 -
url Website URL -
category Custom category from a weighted list choices, weights
Call Center Types
TypeDescriptionConstraints
call_durationHandle time in secondsmin, max, mean
wait_timeQueue wait timemin, max, mean
csat_scoreCustomer satisfaction scorescale, choices, weights
sentimentPositive/Neutral/Negativechoices, weights
agent_idAgent identifierprefix, num_agents
call_outcomeHow the call endedchoices, weights
Demographic Types
TypeDescriptionConstraints
ageAge in yearsmin, max, mode
genderGender identitychoices, weights
income_bracketHousehold income rangechoices, weights
education_levelHighest education attainedchoices, weights
generationGenerational cohortchoices, weights

See GET /field-types for the complete list of 35+ types.

Rate limits

When you self-host, configure limits via env vars (or leave them open). There is no public hosted API to call — run uvicorn api.app:app locally or deploy your own instance on Railway or Vercel.