Generate Mock Data
Describe what you need in plain English. RadMah AI generates production-realistic data with a cryptographic evidence bundle — in seconds, not hours.
✦What you'll build
By the end of this guide you will have generated 1,000 realistic restaurant order records complete with customer names, menu items, prices, and payment methods — plus a signed evidence bundle proving the data's integrity.
Prerequisites
| Requirement | Details |
|---|---|
| RadMah AI account | Free tier is sufficient. Sign up here. |
| API key | Create one in Settings → API Keys. See Authentication guide. |
| Language runtime | Python 3.10+ (or any HTTP client for the REST API) |
Install the SDK
Choose your language and install the RadMah AI SDK.
pip install radmah-sdkAuthenticate
Initialize the client with your API key. All requests are authenticated via the X-API-Key header.
from radmah_sdk import RadMahClient
client = RadMahClient(
api_key="sl_live_your_key_here",
base_url="https://api.radmah.ai" # optional
)⚠Keep your API key secret
Never commit API keys to source control. Use environment variables or a secrets manager in production.
Create a session and describe your data
Open a chat session and describe the data you need in plain English. The AI orchestrator translates your description into a typed sealed contract specification automatically.
# Create a chat session
session = client.create_chat_session()
# Describe what you need — the AI handles the rest
response = client.send_chat_message(
session.id,
"Generate 1000 records of restaurant orders with "
"customer names, menu items, prices, quantities, "
"payment methods, and order dates"
)
# The orchestrator creates an agent project
project_id = response["results"][0]["data"]["project_id"]
print(f"Project created: {project_id}")Review and approve the execution plan
Before generating data, RadMah AI shows you exactly what it will do and the estimated cost. You review the plan and approve or reject it. Nothing runs without your explicit consent.
import time, json
# Wait for the plan to be ready
while True:
project = client.get_agent_project(project_id)
if project.status != "planning":
break
time.sleep(2)
# Inspect the plan
plan = json.loads(project.plan) if isinstance(project.plan, str) else project.plan
for step in plan:
print(f" Step {step['step_index']}: {step['tool_name']}")
# Review cost estimate
print(f"Estimated cost: {project.cost_summary}")
# Approve — this starts execution
if project.status == "awaiting_approval":
client.approve_agent_project(project_id)
print("Plan approved — generation starting")Execution Pipeline
The orchestrator runs this pipeline automatically. Each step produces artifacts that feed into the next.
Wait for generation to complete
Poll the project status until it reaches complete. Typical mock generation finishes in 5-30 seconds depending on row count.
# Poll until complete
for i in range(120):
project = client.get_agent_project(project_id)
steps = " | ".join(
f"{s.tool_name}={s.status}" for s in (project.steps or [])
)
if i % 4 == 0:
print(f" [{project.status}] {steps}")
if project.status in ("complete", "failed", "blocked"):
break
time.sleep(3)
print(f"Final status: {project.status}")Download your data
Once complete, download the generated CSV files and evidence bundle. Each generation produces a signed, cryptographically-chained evidence bundle — this is unconditional and cannot be disabled.
import os
os.makedirs("output", exist_ok=True)
for step in project.steps or []:
job_id = getattr(step, "job_run_id", None)
if not job_id:
continue
# List artifacts for this step
artifacts = client.list_artifacts(str(job_id))
for artifact in artifacts:
data = client.download_artifact(str(job_id), str(artifact.id))
filename = f"output/{step.tool_name}_{artifact.name}"
with open(filename, "wb" if isinstance(data, bytes) else "w") as f:
f.write(data)
print(f"Saved: {filename}")
# Download evidence bundle
evidence = client.get_evidence_data(str(job_id))
print(f"Evidence: {evidence.get('seal_status')}")
print(f"Artifacts: {len(evidence.get('artifact_index', {}).get('artifacts', []))}")Evidence Bundle
Every generation job produces a signed evidence bundle. A cryptographic seal binds every artefact together — tampering with any one invalidates the entire bundle.
| # | Artifact | Purpose |
|---|---|---|
| 1 | sealed contract | Machine-readable generation specification |
| 2 | Run Manifest | Execution telemetry — rows, timing, entity counts |
| 3 | Constraint Report | Hard/soft violation counts and details |
| 4 | Determinism Proof | Cryptographic hash proving reproducibility (same seed = same output) |
| 5 | Privacy Report | Differential privacy and re-identification risk analysis |
| 6 | Utility Metrics | Statistical fidelity — distribution accuracy, correlation preservation |
| 7 | Artifact Manifest | Index of every artefact with cryptographic hashes |
| 8 | Timing Telemetry | Per-step execution timing and resource usage |
| 9 | Evidence Seal | Cryptographic seal binding every artefact |
What you get
CSV Data Files
Production-realistic records with domain-appropriate names, values, and relationships. Ready for testing, demos, or development.
Evidence Bundle
Signed evidence bundle proving integrity, determinism, privacy, and constraint compliance. Audit-ready.
REST API (cURL)
Prefer raw HTTP? Every SDK method maps directly to a REST endpoint.
# 1. Create a chat session
curl -X POST https://api.radmah.ai/v1/client/chat/sessions \
-H "X-API-Key: sl_live_your_key_here" \
-H "Content-Type: application/json"
# 2. Send your request
curl -X POST https://api.radmah.ai/v1/client/chat/sessions/{session_id}/messages \
-H "X-API-Key: sl_live_your_key_here" \
-H "Content-Type: application/json" \
-d '{"content": "Generate 1000 records of restaurant orders"}'
# 3. Approve the plan
curl -X POST https://api.radmah.ai/v1/client/agent/projects/{project_id}/approve \
-H "X-API-Key: sl_live_your_key_here"
# 4. Poll status
curl https://api.radmah.ai/v1/client/agent/projects/{project_id} \
-H "X-API-Key: sl_live_your_key_here"
# 5. Download artifacts
curl https://api.radmah.ai/v1/client/jobs/{job_id}/artifacts \
-H "X-API-Key: sl_live_your_key_here"