/docs with a valid API key.| Base URL | https://datamerase.io |
|---|---|
| Auth header | X-API-Key: <your key> |
| Content type | application/json for JSON bodies, multipart/form-data for file upload |
Every endpoint requires the X-API-Key header except GET /, GET /api-docs, GET /mcp, GET /mcp/download, and static assets. Requests to a protected endpoint with a missing or incorrect key get back 401 unauthorized.
Don't have a key yet? Contact us at admin@datamerase.io for API access.
Every JSON endpoint (all of them except GET /download/<job_id>, which streams a CSV file) returns the same shape:
Server status, GPU availability, and current job counts. Good for checking capacity before starting a job.
Upload a CSV/Excel file (.csv, .xlsx, .xls, max 50MB). Returns a job_id plus auto-detected column types and data-quality warnings.
| file | the CSV/Excel file |
|---|
Detect the statistical distribution family of a target column — useful if you want to see what family: "auto" would pick before starting generation.
| job_id | required — from /upload |
|---|---|
| target_col | required — column name |
Start an asynchronous generation job for an uploaded dataset. Returns immediately with status: "started" — poll GET /status/<job_id> for progress.
| job_id | required |
|---|---|
| target_col | optional — numeric column to model (Bambi). Omit for text-only generation. |
| continuous_cols | optional array, default [] — other numeric columns (Vine copula) |
| categorical_cols | optional array, default [] |
| text_cols | optional array, default [] — free-text columns (GPT-2) |
| n_samples | optional int, default 3000 |
| draws / tune | optional int, default 1000 / 1000 — PyMC sampler settings |
| family | optional, default "auto" |
| text_epochs | optional int, default 3 |
Poll the status of a generation job.
Download the generated synthetic_data.csv for a completed job. Unlike every other endpoint, a successful response is the raw CSV file (Content-Type: text/csv), not a JSON envelope — request errors (e.g. job not found or not finished yet) still come back as the usual JSON error envelope.
Every column in your uploaded file should map to exactly one role. The first four are explicit request fields on /generate; ignore isn't a field at all — a column is excluded from the synthetic output simply by leaving it out of target_col and every one of the three arrays below.
| Limit | Behavior |
|---|---|
| 3 concurrent jobs | the server runs at most 3 /generate jobs at once. A 4th concurrent request gets 429 capacity_exceeded — retry shortly. |
One job per job_id | calling /generate again on a job_id that's already running or finished returns 409 job_conflict. Upload the file again to get a fresh job_id if you need to re-run. |
| HTTP | code | meaning |
|---|---|---|
| 401 | unauthorized | missing or incorrect X-API-Key |
| 400 | missing_file / unsupported_file_type / empty_file / no_data_rows / encoding_error / parse_error | problem with the uploaded file |
| 400 | column_not_found | a referenced column name doesn't exist in the uploaded file (message lists the available columns) |
| 400 | invalid_job / missing_target | bad or missing job_id, or neither target_col nor text_cols given |
| 409 | job_conflict | job_id already running or done |
| 429 | capacity_exceeded | 3 jobs already running |
| 404 | not_found / no_result | unknown route, or job not finished yet |