Running Jobs
Submit generation jobs, monitor progress, download results, and manage the job lifecycle.
Job Lifecycle
Every generation job progresses through these states:
created -> queued -> running -> succeeded | failed | canceled- Credits are deducted only on
succeeded, never at submission time - A signed evidence bundle is written to storage on success
- A provenance seal is committed to the seal registry on success
Creating a Job
Create a job
from radmah_sdk import RadMahClient
client = RadMahClient(api_key="sl_live_...")
# Generate synthetic data from a description
job = client.jobs.create(
rows=100_000,
description="customer transaction records"
)
# Wait for completion (polls every 2s)
job.wait()
print(f"Status: {job.status}")
print(f"Job ID: {job.id}")Job Kinds
The platform automatically selects the appropriate generation pipeline for each job kind.
| Kind | Description |
|---|---|
| mock | Seed-reproducible row generation from a natural-language description |
| synthesize | Trained generative model synthesis from uploaded data |
| simulate | Physics-based SCADA/ICS simulation |
| analyze | Column profiling and schema inference on uploaded data |
| train | Train a generative model on uploaded data |
| fit | Compute summary statistics for a seal |
| verify | Verify artifact integrity |
| fabricate | LLM-generated sealed contract from natural language |
| scenario_fabricate | LLM-generated SCADA/ICS scenario packs |
| lift | Transform raw data into typed WorldState |
Monitoring Jobs
Monitor jobs
# Check status
job = client.jobs.get(job_id="...")
print(job.status) # "running", "succeeded", etc.
# List recent jobs
jobs = client.jobs.list(limit=10)
for j in jobs:
print(f"{j.id}: {j.status}")
# Wait with timeout
job.wait(timeout_seconds=300) # raises TimeoutError after 5 minDownloading Results
Download results
# As a pandas DataFrame
df = job.to_dataframe()
# Download to a file
job.download("output.csv")
# List all artifacts for a job
artifacts = client.artifacts.list(job_id=job.id)
for a in artifacts:
print(f"{a.artifact_type}: {a.content_hash}")
# Download a specific artifact
client.artifacts.download(artifact_id=artifacts[0].id, path="artifact.bin")Canceling and Rerunning
Cancel / rerun
# Cancel a running job
client.jobs.cancel(job_id="...")
# Rerun a completed job (same sealed contract, same seed = identical output)
rerun = client.jobs.rerun(job_id=job.id)
rerun.wait()Queue Routing
Jobs are automatically routed to the appropriate Celery queue based on job kind and plan tier:
| Queue | Purpose |
|---|---|
| radmah-default | Standard synthesize, analyze, and verify jobs |
| radmah-gpu | GPU-accelerated training jobs |
| radmah-free | Free-tier jobs (lower priority) |
| radmah-interactive | Chat-triggered quick jobs (low latency) |
Credit Estimation
Before submitting a job, you can estimate the credit cost:
Estimate credits
curl https://api.radmah.ai/v1/client/estimate \
-H "X-API-Key: sl_live_..." \
-H "Content-Type: application/json" \
-d '{
"rows": 1000000,
"kind": "synthesize"
}'
# Response: { "estimated_credits": 1, "training_tier": "GPU-S" }ℹCredit Rate
Generation credit rate: 1 credit = 1,000,000 rows across all job types. Training jobs use tiered pricing based on compute requirements. The platform always shows the estimated cost before you confirm.