← Back to Home
API Reference
Programmatically generate synthetic datasets using the Syntherx API.
Endpoint
POST /datasets/generateHeaders
x-api-key(string, required) — Your API key for authenticationContent-Type: application/json
Request Body
{
"blueprint": "string",
"n_patients": number
}blueprint— Dataset type (e.g.,diabetes_hba1c_trial)n_patients— Number of synthetic records to generate
Example Request
curl -X POST https://api.syntherx.com/datasets/generate \
-H "x-api-key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"blueprint":"diabetes_hba1c_trial","n_patients":100}'Response
{
"download_url": "string",
"rows": number,
"blueprint": "string"
}download_url— Signed S3 URL for secure downloadrows— Number of generated recordsblueprint— Dataset type used
Example Response
{
"download_url": "https://syntherx-datasets.s3.amazonaws.com/...",
"rows": 100,
"blueprint": "diabetes_hba1c_trial"
}Error Handling
401 Unauthorized— Invalid or missing API key400 Bad Request— Invalid blueprint or input500 Internal Server Error— Generation failure