Overview

Twynvex generates synthetic training data that fills distribution tails. It takes your data schema — either inferred from a real sample or defined manually — and produces schema-matched synthetic rows with configurable class ratios and tail weighting.

Nothing in this flow requires sending real records to Twynvex servers. When you provide a sample, Twynvex fits a statistical model (marginal distributions + pairwise correlation matrix) and discards the raw rows after fitting. Schema-defined generation never touches real data at all.

Twynvex is a tabular and text data generation tool. It is not an image augmentation library, a feature engineering platform, or a model training framework. If you are augmenting images or audio, this is not the right tool.

Installation

Install the Python SDK via pip:

pip install twynvex

Requires Python 3.9+. The SDK depends on pandas, numpy, and scipy — all standard in ML environments. No GPU required.

Authenticate with your API key (find it in your dashboard after signing up):

import twynvex as twx
twx.configure(api_key="twx_sk_live_...")

Input Formats

Twynvex accepts three ways to define a schema:

  • CSV sample: twx.from_csv("data.csv") — auto-detects column types, distributions, and cardinality from a real sample. The raw rows are used only for fitting; they are not retained.
  • Parquet sample: twx.from_parquet("data.parquet") — same as CSV but for Parquet format. Preferred for large samples.
  • Manual schema definition: twx.Schema() with explicit column definitions. No real data required at any point.
  • JSONL: twx.from_jsonl("intents.jsonl") — for text classification datasets with label columns.

Output Formats

Every generation job produces output in one or more of these formats:

Format Method Notes
pandas DataFrame job.to_dataframe() In-memory. Best for datasets under 10M rows.
CSV job.to_csv("output.csv") Schema-matched column order. All plans.
Parquet job.to_parquet("output.parquet") Preferred for large output. Build+ plans.
JSON Lines job.to_jsonl("output.jsonl") For NLP fine-tuning workflows. All plans.
S3 job.to_s3("s3://...") Direct push. Build+ plans. IAM role required.
REST download URL job.output_url Pre-signed URL, expires after 24h.

Next Steps

If you're ready to generate your first dataset, the Quickstart guide walks you through the complete flow in 5 minutes. If you're integrating Twynvex into an existing pipeline, the REST API reference has all endpoints, request parameters, and response schemas.

Questions? Reach us at [email protected].