Sign In

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.

1

Install the SDK

Install
pip install radmah-sdk
2

Authenticate

Create a client instance with your API key. The SDK sends it via the X-API-Key header automatically.

Create client
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.

3

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.

Create a preview
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.

4

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.

Approve
# 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.

5

Wait for completion

Poll until the job finishes. The SDK handles polling automatically.

Wait
# 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"
6

Download results and evidence

Every job produces a CSV dataset and a cryptographically hash-chained evidence bundle. Download both.

Download
# 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.

#ArtifactPurpose
1Contract KMachine-readable record of the approved job — schema, engine, seed
2Run ManifestImmutable execution record — job, tenant, engine, timestamps
3Constraint ReportPer-column pass/fail for every declared constraint
4Determinism ProofCryptographic hash proving reproducibility
5Privacy ReportEmpirical re-identification indicators (membership, linkage, attribute) with their measurement basis and scope
6Utility MetricsStatistical fidelity metrics and ML utility score
7Artifact ManifestIndex + hashes of the preceding artifacts — the tamper chain
8Timing TelemetryStage-level wall-clock durations for the run
9Cryptographic SealBinding 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