DocsGet startedInstall the SDK
Get started

Install the SDK

Install resontech, mint a platform API key, and verify your bucket — five minutes from a blank shell to a working SDK session.

30-second tour

The fastest path from zero to a working SDK session:

No login() call — every request signs itself with Authorization: Bearer <platform_api_key>. If worker_stats() prints, you're done. The rest of this page walks through each step — mint a key, provision a bucket if you don't have one, and verify your install.

Mint a platform API key

The SDK auths every control-plane call with a platform API key (prefix rsk_live_ or rsk_dev_). Mint one from the dashboard before you start.

  • Sign in to the web dashboard.
  • Open Profile → Developer.
  • Click Create API key, give it a name (e.g. "laptop") and optional expiration.
  • Copy the returned rsk_… string.
!
The plaintext key is shown once — the modal forces you to download a .txt before it closes. If you lose it later, revoke it and mint a fresh one from the same panel; you can't retrieve an existing plaintext.
i
Don't confuse the platform API key with the predict API key returned by rt_submit_inference(). The platform key auths every control-plane call (submit, list, revoke). The predict key auths one deployment's POST /predict and rides in X-API-Key, not Authorization. Don't cross them.

Provision a storage bucket

Every user gets one S3-compatible bucket in the platform's Garage cluster. You must provision it once before the SDK can upload anything — job submissions go straight from your local Python process into your bucket.

  • Sign in to the web dashboard.
  • Open Profile → Storage.
  • Click Provision Bucket, pick an alias (lowercase + hyphens, 3–30 chars), and a quota in GB.
  • Copy the accessKeyId and secretAccessKey shown.
!
The secret key is shown once. If you lose it, come back to Profile → Storage and click Rotate Key to mint a fresh pair — the old key stops working the moment the new one appears.

Install the SDK package

The Python SDK runs on Python 3.11+. Its only client-side dependencies are httpx and boto3 — PyTorch is required on the worker side, not on your laptop.

i
The package is currently distributed privately to ResonTech customers. Your account contact provides the install instructions if your environment can't reach the public index — the API surface is identical either way.

Configure the client

ResonTechConfig takes 4 required fields: the API + S3 endpoints, your platform API key, and your bucket credentials.

setup.py

No login() step. Every request signs itself with Authorization: Bearer <platform_api_key>. The client raises ResonAuthError if the key is missing, malformed (wrong prefix), revoked, or expired — mint a fresh one from the dashboard.

See the SDK client config reference for every field on ResonTechConfig.

Verify everything is wired

One call that exercises auth + the API in one go:

If you see at least one worker (and at least one in the ready state on the public pool), your install is good. If worker_stats() returns empty, the cluster has no public workers right now — your account is still fine, you just won't be able to submit until workers come back.

Advanced — env vars, self-hosted, key rotation

Reading credentials from the environment

Hard-coding credentials is fine for a notebook, less fine for a repo. The SDK reads RESON_API_KEY automatically when platform_api_key= is omitted:

Self-hosted / staging

Override base_url, s3_endpoint, and dashboard_url with your internal hostnames. The dashboard URL only affects the link printed in job.dashboard_url — operational calls go through base_url.

Rotating a leaked API key

Profile → Developer. Rotate the compromised key (or revoke + mint a fresh one) — revocation propagates in under ~5 s. Copy the new plaintext into your config or RESON_API_KEY.

Rotating an S3 secret is separate: Profile → Storage → Rotate Key for the bucket credentials.

What's next

  • Submit a training job: read Submit via Python SDK — five lines of Python ship your model to FL.
  • Deploy an inference runtime: read Submit an inference runtime — point the SDK at inference.yaml + a scripts folder and your model is hosted.
  • Try a runnable example: clone job_training_sdk (tiny CNN on MNIST) for a clone-and-edit base.