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
| Type | Description | Constraints |
|---|---|---|
call_duration | Handle time in seconds | min, max, mean |
wait_time | Queue wait time | min, max, mean |
csat_score | Customer satisfaction score | scale, choices, weights |
sentiment | Positive/Neutral/Negative | choices, weights |
agent_id | Agent identifier | prefix, num_agents |
call_outcome | How the call ended | choices, weights |
Demographic Types
| Type | Description | Constraints |
|---|---|---|
age | Age in years | min, max, mode |
gender | Gender identity | choices, weights |
income_bracket | Household income range | choices, weights |
education_level | Highest education attained | choices, weights |
generation | Generational cohort | choices, 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.