REST API · v1 stable

OpenAPI 3.1. Signed. Idempotent. Versioned.

Use the SDK when it fits, the REST surface when it doesn't. Either way you get the same auth, idempotency, signed-webhook and tenant-isolation guarantees — and a machine-readable spec you can vendor into your CI.

api.radmah.ai / v1 / synthesize / jobsopenapi 3.1
POST/v1/synthesize/jobs
X-API-Key:          slt_live_AbCdEfGh…
X-Idempotency-Key:  8e0c…b21
Content-Type:       application/json

{
  "dataset_id": "ds_4a7c81",
  "model":      "synthesize",
  "rows":       10000,
  "seed":       42
}
202Accepted
X-Job-Id:                job_9b3df1
X-Rate-Limit-Remaining:  47
Retry-After:             —

{
  "job_id":     "job_9b3df1",
  "status":     "queued",
  "estimate":   { "credits": 14, "seconds": 38 },
  "evidence":   { "expected_root_pending": true },
  "_links":     {
    "self":     "/v1/synthesize/jobs/job_9b3df1",
    "stream":   "/v1/synthesize/jobs/job_9b3df1/events",
    "cancel":   "/v1/synthesize/jobs/job_9b3df1:cancel"
  }
}
Routes
206
Spec
OAS 3.1
Webhook sig
HMAC-SHA256
Idempotency
24 h
◆ Six guarantees

Six things every endpoint guarantees.

rule · 01

OpenAPI 3.1, machine-readable

The schema that drives the SDK is generator-ready — customers with API access vendor it into their CI to auto-generate clients.

rule · 02

Scoped auth

JWT for end-users, API keys for service-to-service. Read / generate / admin scopes.

rule · 03

Idempotency built in

The Idempotency-Key header is stored 24 h; safe retry on transient 5xx without duplicate work.

rule · 04

Per-tenant + per-route limits

A token bucket per tenant + per route returns 429 with Retry-After and a reset hint.

rule · 05

Signed webhooks

HMAC-SHA256 signature header + a per-tenant rolling key + a 5-minute replay window.

rule · 06

Versioned, deprecation-aware

v1 stable; deprecations announced 90 days in advance with an X-Sunset header on retired routes.

◆ Webhooks

Signed by default. Replay-window enforced.

Every webhook payload is HMAC-SHA256-signed with a rolling per-tenant key and a timestamp. Verify with one helper, ignore the noise of unauthenticated traffic.

job.synthesize.completed
5 min replay window
  1. 01
    SLT signs payload
    cryptographic hash(payload || ts || rolling_key)
  2. 02
    Webhook delivered
    POST your endpoint with headers
  3. 03
    You verify
    verify(payload, sig, key)
  4. 04
    Process if ok, 401 if not
    no signature → reject silently
X-SLT-Signature: cryptographic hash=2d4a8f… ts=1718834012
X-SLT-Event: job.synthesize.completed
◆ Route groups

Nine groups. One contract.

Datasets

POST /v1/datasets/upload

Upload, browse, profile, delete.

Mock

POST /v1/mock/jobs

Schema-from-prompt synthesis.

Synthesize

POST /v1/synthesize/jobs

Training and generation jobs.

Agent

POST /v1/agent/projects

Autonomous agent runs with cost gates.

SCADA

POST /v1/scada/runs

Virtual SCADA telemetry runs.

ICS

POST /v1/ics/scenarios

Attack-mix scenario execution.

Connectors

POST /v1/connectors/{id}/browse

Browse + import from 14 source types.

Evidence

GET  /v1/evidence/{job_id}

Sealed bundle download + offline verify hint.

Webhooks

POST /v1/webhooks

Subscribe to events, signed payloads.

◆ Error envelope

A stable error envelope. No surprises.

400Validation

Body fails JSON-Schema check; a per-field error array is returned.

401Auth missing

No JWT / API key; or token expired.

403Scope denied

Token authenticated but lacks the required scope.

404Not found

Resource not found within the calling tenant.

409Idempotent replay

Same Idempotency-Key seen with a different body.

429Rate-limited

Returns Retry-After + a per-route reset window.

500Internal

Always JSON, never HTML; a correlation ID for support.

503Degraded

Dependency timeout; safe to retry on idempotent verbs.

◆ Posture

Posture & auditability.

TLS 1.2+ only

HSTS on every response; older suites refused at the LB.

Tenant isolation

The JWT carries tenant_id; an ORM filter is applied on every query.

Audit log

Every write recorded with caller, scope, and a SHA-256 of the body.

Stable error envelope

Every error returns {error, code, correlation_id, hint}.

Sign up. Get a key. Hit the API.

Free-tier credits ship with every account. Mint a key in your workspace, drop the contract-test runner into your CI, and wire RadMah AI into a real data plane in an afternoon.