Sign In

SDK Installation

Install the RadMah AI SDK for your language, authenticate with your API key, and verify the connection in under five minutes.

Requirements

LanguageMinimum VersionPackage Manager
Python3.10+pip
REST APIAnycURL / any HTTP client

You also need a RadMah AI API key (prefixed sl_live_). Create one from Settings → API Keys in the dashboard.

1

Install the SDK

Install
pip install radmah-sdk

✦Python extras

For Jupyter notebook workflows, install with the optional pandas dependency: pip install radmah-sdk pandas. The SDK works without pandas, but to_dataframe() requires it and raises a clear error if missing.

2

Configure Environment Variables

The Python SDK reads these environment variables automatically. Set them in your shell profile, CI secrets, or container environment.

VariableRequiredDescription
RADMAH_API_KEYYesYour API key. Prefixed sl_live_. The rady CLI reads it; in Python, pass it as api_key= (the SDK does not read it on its own).
RADMAH_API_URLNoThe API endpoint, when base_url= is not passed. Defaults to https://api.radmah.ai
RADMAH_ALLOW_PRIVATE_BASE_URLNo1 lets an endpoint on your private network or this machine receive the key, when allow_private_base_url= is not passed. See On-Prem & Custom CA.
RADMAH_CA_BUNDLENoPEM file of the CA that signed your deployment's certificate, when ca_bundle_path= is not passed.
RADMAH_UPLOAD_TIMEOUTNoSeconds a dataset upload waits for the server's answer, when upload_dataset(timeout=) is not passed. Defaults to 3600
.env / shell
export RADMAH_API_KEY="sl_live_your_key_here"

# Optional overrides
export RADMAH_API_URL="https://api.radmah.ai"
export RADMAH_UPLOAD_TIMEOUT="3600"

⚠Never hardcode API keys

Do not commit API keys to source control. Use environment variables, a secrets manager, or your CI/CD platform's secret storage, and read the key from there in your code: api_key=os.environ["RADMAH_API_KEY"]. The rady CLI reads RADMAH_API_KEY on its own.

3

Initialize the Client

Create a client with your API key. The endpoint is base_url=, else RADMAH_API_URL, else the hosted API. You can also pass configuration explicitly.

Client initialization
import os

from radmah_sdk import RadMahClient

# The key from the environment; the endpoint from RADMAH_API_URL, else the hosted API
client = RadMahClient(api_key=os.environ["RADMAH_API_KEY"])

# Or pass configuration explicitly
client = RadMahClient(
    api_key="sl_live_your_key_here",
    base_url="https://api.radmah.ai",
    timeout=120,
)

✦Enterprise deployments

For on-premise or VPC deployments, set RADMAH_API_URL to your private API endpoint. The Python SDK reads this automatically. An endpoint on your private network (an RFC 1918 address or a name under .internal) also needs RADMAH_ALLOW_PRIVATE_BASE_URL=1; give it an https:// URL. Plain http:// to any host but this machine is refused, because the key would cross your network unencrypted, unless you opt in by name with RADMAH_ALLOW_INSECURE_HTTP=1 (the SDK then still warns) — see On-Prem & Custom CA. For REST API usage, replace the base URL in your requests.

4

Verify Connection

Run this quick verification to confirm your SDK is installed, your API key is valid, and the client can reach the RadMah AI API.

Verify connection
import os

from radmah_sdk import RadMahClient

client = RadMahClient(api_key=os.environ["RADMAH_API_KEY"])

# An authenticated call: a wrong key raises radmah_sdk.AuthError
health = client.health()
print(f"Account status: {health.status}")   # "active" for a usable account
print(f"Tenant:         {health.tenant_slug}")

If the connection succeeds, you will see your account status (active) and tenant printed to the console. If the key is wrong, the SDK raises radmah_sdk.AuthError with a descriptive message.

Configuration Reference

The arguments of the RadMahClient and AsyncRadMah constructors. Three have an environment variable (shown under the argument) that the SDK reads when the argument is not passed; an argument you pass always wins.

ArgumentDefaultDescription
api_key—Your API key (sl_live_…). Required; the SDK does not read it from the environment.
base_url
RADMAH_API_URL
https://api.radmah.aiAPI base URL: your deployment's API URL for on-prem.
allow_private_base_url
RADMAH_ALLOW_PRIVATE_BASE_URL
offOpt in to a base URL on your private network or this machine. False refuses whatever the environment says. Cloud metadata endpoints are always refused. See On-Prem & Custom CA.
allow_insecure_http
RADMAH_ALLOW_INSECURE_HTTP
offOpt in to sending the key over plain http:// to a host that is not this machine. Without it such a URL is refused (BaseURLError, reason cleartext); with it the SDK still issues InsecureBaseURLWarning. Prefer https:// with ca_bundle_path. False refuses whatever the environment says.
ca_bundle_path
RADMAH_CA_BUNDLE
system trust storePEM file of your private CA. Certificate verification cannot be turned off.
timeout60Request timeout in seconds.
max_retries3Retry attempts for transient failures. A 429 or 503 that says when to come back (Retry-After) is waited out as asked instead, without spending these (at most 60 waits, 15 minutes in all, per call; past that the error is raised).
refresh_token—Session refresh token: on a 401 the SDK refreshes the access token once.
on_wait—Called as on_wait(seconds, error) before each wait the server asked for (a key's per-minute limit, a busy service); the call then goes on by itself.

SDK Resource Namespaces

The Python SDK client exposes resource namespaces for each area of the platform. The same resources are available via REST endpoints.

NamespaceDescription
client.accountAccount info, usage, and plan details
client.jobsCreate, list, get, cancel, and rerun generation jobs
client.datasetsUpload, list, get, and delete datasets
client.artifactsList, download, and verify job artifacts and evidence bundles
client.sealsList, get, and download provenance seals
client.connectorsCRUD, test, import from, and deliver to external sources
client.agentAgentic Data Scientist project lifecycle

Next Steps