Quickstart
Install the SDK, generate your first synthetic dataset, and download an evidence bundle in under 5 minutes.
Prerequisites
- A RadMah AI account (free tier works for this guide)
- An API key from Settings → API Keys in the dashboard
ℹAPI key prefix
Live keys use the sl_live_ prefix. Test keys use sl_test_. Both work for this guide.
Install the SDK
pip install radmah-sdkAuthenticate
Create a client instance with your API key. The SDK sends it via the X-API-Key header automatically.
from radmah_sdk import RadMahClient
client = RadMahClient(api_key="sl_live_your_key_here")⚠Keep your key secret
Never commit API keys to source control. Use environment variables or a secrets manager in production.
Create a reviewed preview
Describe the data you need in plain English. Fabricate compiles your description into a sealed, deterministic contract and renders a reviewed draft — sample rows plus the contract's disclosed assumptions — before anything is generated at scale.
preview = client.create_fabricate_preview(
"customer orders for an e-commerce platform"
)
# Block until the preview draft is ready
state = client.wait_fabricate_preview(preview["preview_id"])
print(f"Preview {preview['preview_id']} — status: {state['status']}")✦No engine tuning needed
You never need to pick generation parameters by hand. The platform compiles your description into a typed contract, discloses every assumption it makes, and shows you the draft before you commit credits.
Review, refine, approve
Inspect the previewed contract, refine it in plain English if needed, then approve it. Approval is what enqueues the final generation job.
# Inspect the preview state: contract versions, quality findings
state = client.get_fabricate_preview_state(preview["preview_id"])
print(state["quality_issues"])
# Optional: refine the draft in plain English
r = client.refine_fabricate_preview(
preview["preview_id"],
"Add an order_status column with values placed, shipped, delivered.",
)
client.wait_fabricate_preview(r["preview_id"])
# Approve to enqueue the final generation job
final = client.approve_fabricate_preview(
r["preview_id"], requested_records=100_000
)
print(f"Generation job: {final['job_id']}")ℹApproval has no bypass
Every generation runs against a contract you approved. If the contract still has unresolved requirements or a failed safety gate, approval returns a typed 422 — refine the draft and approve again.
Wait for completion
Poll until the job finishes. The SDK handles polling automatically.
# Fetch the generation job and block until it finishes
job = client.jobs.get(job_id=final["job_id"])
job = job.wait()
print(f"Final status: {job.status}") # "succeeded"Download results and evidence
Every job produces a CSV dataset and a cryptographically hash-chained evidence bundle. Download both.
# Load the generated rows directly into pandas
df = job.to_dataframe()
print(df.head())
# Or download the primary artifact to a file
artifacts = client.list_job_artifacts(job.id)
primary = next(a for a in artifacts if a.artifact_type == "primary")
with open("output.csv", "w") as fh:
fh.write(client.download_artifact(job.id, primary.id))
# Download the sealed evidence bundle (raw JSON bytes)
with open("evidence_bundle.json", "wb") as fh:
fh.write(client.download_evidence_bundle(job.id))The evidence bundle
Core evidence sections shown below. Generated data artifacts are additional — the exact file count varies by generation and output shape.
| # | Artifact | Purpose |
|---|---|---|
| 1 | Contract K | Machine-readable record of the approved job — schema, engine, seed |
| 2 | Run Manifest | Immutable execution record — job, tenant, engine, timestamps |
| 3 | Constraint Report | Per-column pass/fail for every declared constraint |
| 4 | Determinism Proof | Cryptographic hash proving reproducibility |
| 5 | Privacy Report | Empirical re-identification indicators (membership, linkage, attribute) with their measurement basis and scope |
| 6 | Utility Metrics | Statistical fidelity metrics and ML utility score |
| 7 | Artifact Manifest | Index + hashes of the preceding artifacts — the tamper chain |
| 8 | Timing Telemetry | Stage-level wall-clock durations for the run |
| 9 | Cryptographic Seal | Binding hash over every prior artifact in the bundle |
✦Evidence is always produced
Every job produces the full hash-chained evidence bundle unconditionally, regardless of plan tier or dataset size — this cannot be disabled. Tenant-signed notarization is additionally recorded for each sealed bundle once your workspace has an evidence signing key.
Next steps
- Read Core Concepts to understand sealed job specifications, cryptographic seals, and hash-chained evidence bundles
- Set up Virtual SCADA for industrial simulation
- Review the REST API Reference for direct HTTP integration