Synthetic data
Describe the data you need in plain English. Autessa generates realistic, varied rows that match your columns, with invalid and duplicate rows removed.
When to use it
- You need test data for an app, a demo, or a load test, without real customer data.
- You need many example conversations or records to test an agent or a classifier.
- You want a dataset file (JSONL or CSV) to train or evaluate a model.
Quickstart
- Get a free API key. New accounts get $100 of free credits for your first month, no card needed.
- Optional: send a description to
POST /clients/synthetic-data/schema/proposeto get suggested columns. - Send the description, columns, and a row count to
POST /clients/synthetic-data/generate.
- curl
- Python
- TypeScript
- Java
curl -X POST https://api.autessa.com/clients/synthetic-data/generate \
-H "Authorization: $AUTESSA_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"description": "Support tickets for an online shoe store. Mix of returns, sizing, and late deliveries.",
"rowCount": 10,
"columnDefinitions": [
{"columnName": "subject", "columnType": "SHORT_TEXT"},
{"columnName": "body", "columnType": "LONG_TEXT"},
{"columnName": "priority", "columnType": "SINGLE_SELECT", "allowedValues": ["low", "normal", "urgent"]}
]
}'
import os
import requests
res = requests.post(
"https://api.autessa.com/clients/synthetic-data/generate",
headers={"Authorization": os.environ["AUTESSA_API_KEY"]},
json={
"description": "Support tickets for an online shoe store.",
"rowCount": 10,
"columnDefinitions": [
{"columnName": "subject", "columnType": "SHORT_TEXT"},
{"columnName": "body", "columnType": "LONG_TEXT"},
],
},
timeout=300,
)
for row in res.json()["rows"]:
print(row["subject"])
const res = await fetch("https://api.autessa.com/clients/synthetic-data/generate", {
method: "POST",
headers: { Authorization: process.env.AUTESSA_API_KEY!, "Content-Type": "application/json" },
body: JSON.stringify({
description: "Support tickets for an online shoe store.",
rowCount: 10,
columnDefinitions: [
{ columnName: "subject", columnType: "SHORT_TEXT" },
{ columnName: "body", columnType: "LONG_TEXT" },
],
}),
});
const { rows, rejectedRowCount } = await res.json();
console.log(rows.length, "rows,", rejectedRowCount, "rejected");
var body = """
{"description": "Support tickets for an online shoe store.", "rowCount": 10,
"columnDefinitions": [{"columnName": "subject", "columnType": "SHORT_TEXT"},
{"columnName": "body", "columnType": "LONG_TEXT"}]}
""";
var req = java.net.http.HttpRequest.newBuilder(java.net.URI.create("https://api.autessa.com/clients/synthetic-data/generate"))
.header("Authorization", System.getenv("AUTESSA_API_KEY"))
.header("Content-Type", "application/json")
.POST(java.net.http.HttpRequest.BodyPublishers.ofString(body))
.build();
System.out.println(java.net.http.HttpClient.newHttpClient()
.send(req, java.net.http.HttpResponse.BodyHandlers.ofString()).body());
The response has rows (each maps column name to value), rowCount, and rejectedRowCount. Nothing is stored.
Larger sets: background jobs
POST /clients/synthetic-data/jobswithname,description,rowCount,columnDefinitions,targetType: "DATASET_FILE", andfileFormat(JSONLorCSV). You get ajobId.- Poll
GET /clients/synthetic-data/jobs/{jobId}forstatusandprogressPct. GET /clients/synthetic-data/jobs/{jobId}/exportreturns adownloadUrlfor the file.
Set writeMode: "REVIEW" to look at staged rows first (/preview), then /approve or /discard.
How it works
- It writes rows in batches and checks each row against your column types and allowed values.
- It tracks what it has already written, so later batches stay varied instead of repeating.
- It drops invalid and duplicate rows and tries again to reach your count.
sampleRowsJson(a JSON array as a string) gives it example rows to match in style.
Column types: SHORT_TEXT, LONG_TEXT, INTEGER, FLOAT, BOOLEAN, SINGLE_SELECT, MULTI_SELECT, DATETIME. Add a columnComment to say what a column holds.
The synth package
The synth package wraps this API in TypeScript (@autessa/synth), Python (autessa-synth) and Java (com.autessa:autessa-synth). It needs only the core package, and reads AUTESSA_API_KEY.
- Python:
pip install "autessa-synth @ git+https://github.com/Autessa-Inc/autessa-python#subdirectory=packages/autessa-synth"(installautessa-corethe same way first). After release:pip install autessa-synth. - TypeScript: after release,
npm install @autessa/synth. During the preview, build it from theautessa-jsrepository as its README describes. - Java: the
com.autessa:autessa-synthartifact, plusautessa-spring-boot-starterfor Spring Boot. During the preview, buildautessa-javafrom source first.
Propose a schema, then generate rows
- TypeScript
- Python
- Java
import { Synth } from "@autessa/synth";
const synth = new Synth();
const { schema } = await synth.proposeSchema({ description: "support tickets for a bike shop" });
const { rows } = await synth.generate({
description: "support tickets for a bike shop",
columns: schema.columnDefinitions,
rowCount: 20,
});
console.log(rows[0]);
from autessa.synth import Synth
synth = Synth()
proposal = synth.propose_schema("support tickets for a bike shop")
rows = synth.generate(description="support tickets for a bike shop",
columns=proposal.schema_.column_definitions, row_count=20).rows
print(rows[0])
import com.autessa.synth.Synth;
Synth synth = Synth.fromEnv();
List<Map<String, Object>> rows = synth.generate("Support tickets for a bike shop", 20);
rows.forEach(System.out::println);
synth.proposeSchema(description) returns suggested columns.
Many rows: jobs, review and export
A job runs in the background and writes a dataset file (JSONL or CSV). With an API key, jobs always write files. With writeMode: "REVIEW", it stops at AWAITING_REVIEW so you can look at a batch, drop rows, and approve.
- TypeScript
- Python
- Java
const jobId = await synth.createJob({
name: "tickets", description: "support tickets", rowCount: 5000,
fileFormat: "JSONL", writeMode: "REVIEW",
});
await synth.waitForJob(jobId); // stops at AWAITING_REVIEW, or when finished
const { rows, batchId } = await synth.preview(jobId);
await synth.excludeRows(jobId, batchId!, [3, 7]);
await synth.approve(jobId);
await synth.waitForJob(jobId);
const { downloadUrl } = await synth.export(jobId);
job_id = synth.create_job(row_count=5000, name="tickets", description="support tickets",
file_format="JSONL", write_mode="REVIEW")
synth.wait_for_job(job_id) # stops at AWAITING_REVIEW, or when finished
batch = synth.preview(job_id)
synth.approve(job_id)
synth.wait_for_job(job_id)
print(synth.export(job_id).download_url)
String jobId = synth.createJob(new CreateSyntheticDataJobRequest()
.description("Member intake calls for a health plan").rowCount(2000).fileFormat("CSV"));
SyntheticDataJobSummaryDto job = synth.waitForJob(jobId); // stops at AWAITING_REVIEW, or when finished
if ("AWAITING_REVIEW".equals(job.getStatus())) {
synth.preview(jobId);
synth.approve(jobId);
}
System.out.println(synth.export(jobId).downloadUrl());
| Call | What it does |
|---|---|
proposeSchema | Suggested columns for a description. |
generate | A small set of rows right away. |
createJob, getJob, listJobs, waitForJob | Many rows in the background. |
preview, approve, discard, cancel | Review a staged batch, then keep it, throw it away, or stop the job. |
append, excludeRows, regenerateBatch | Add rows, drop rows, or redo a batch before approving. |
export | A download link for the job's file. |
Python uses snake_case (propose_schema, wait_for_job, ...) and has AsyncSynth.
Use the rows in evals and tests
Two helpers turn rows into plain data, so the synth package doesn't depend on any other Autessa package:
toEvalCases(rows, mapping)makes one grading case per row, in the shape Evaluationsgradetakes.toSeed(rows)makes rows for a local test'sseed:block, or fortable(x).seed(...)in the CDK's offline tests.
- TypeScript
- Python
- Java
import { toEvalCases, toSeed } from "@autessa/synth";
const cases = toEvalCases(rows, { user: "question", expectedOutcome: "expected", agentInstructions: "You help with orders." });
const seed = toSeed(rows, ["orderId", "status"]);
from autessa.synth import to_eval_cases, to_seed
cases = to_eval_cases(rows, {"user": "question", "expected_outcome": "expected"},
agent_instructions="You help with orders.")
seed = to_seed(rows, table="Orders")
# each case goes straight to Evals().grade(**case)
List<EvalGradeRequest> cases = Synth.toEvalCases(rows, EvalCaseMapping.builder()
.agentInstructions("You help with orders.")
.userMessage("question")
.expectedOutcome("expected")
.build());
List<Map<String, Object>> seed = Synth.toSeed(rows);
Limits
/generateis for small sets. Use a job for more rows.- Each job has a maximum row count. The API tells you if a request is over it.
- With an API key, jobs write files. To fill an AutessaDB table, use the Builder.
- Usage is billed to your company. See Billing.
API reference
Benchmarks
None for synthetic data. See Benchmarks for what we publish.