Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.strandai.com/llms.txt

Use this file to discover all available pages before exploring further.

By the end of this guide you’ll have signed in, minted an API key, installed the Python SDK, and submitted a prediction against a slide.
For research use only. Strand AI predictions are model outputs intended for research and hypothesis generation. They are not validated for, and must not be used in, clinical diagnosis, treatment selection, or patient care decisions.

1. Sign in

The Strand AI platform is currently invite-only. If you have access, sign in at app.strandai.com. Otherwise email support@strandai.com and we’ll get you onboarded.

2. Mint an API key

Go to app.strandai.com/settings/api-keys and click Create key. Copy the value. It starts with sk-strand- and is shown only once. Set it in your environment:
export STRAND_API_KEY=sk-strand-XXXXXXXXXXXXXXXXXXXXXXXX
Treat the API key like a password. It’s scoped to your org and inherits your credit balance.

3. Install the SDK

pip install strand-sdk
# with bioinformatics extras (AnnData / zarr):
pip install "strand-sdk[anndata]"

4. Run your first prediction

from strand import Client

client = Client()  # reads STRAND_API_KEY from env

# Upload the slide, submit a prediction, and download results.
upload = client.uploads.upload_file("biopsy.svs")
job = client.predict.submit(upload.id, markers=["CD8", "PanCK", "Ki67"])
job.wait()                                # blocks until terminal status
adata = job.download_results()            # AnnData with one channel per marker
That’s it. adata (Python) / spe (R) holds one channel per requested marker, aligned to the slide’s pixel grid.

5. Inspect outputs

adata
# AnnData object with n_obs × n_vars = <patches> × 3
#   obs:    'x', 'y'      (patch centroid in slide coordinates)
#   var:    'marker'
#   layers: 'predicted'   (per-patch marker intensity)

# Quick sanity check:
adata.var_names.tolist()
# ['CD8', 'PanCK', 'Ki67']

6. Estimate cost before submitting

Predictions are billed in credits (1 credit per 224×224-px patch per marker). Estimate first if you want to know the price up front:
estimate = client.predict.estimate(upload.id, markers=["CD8", "PanCK", "Ki67"])
print(f"will cost ~{estimate.estimated_credits} credits; "
      f"balance: {estimate.org_balance}")
See Pricing for the credits model.

Where to go next

Python SDK reference

Lower-level methods, chunked uploads, streaming events.

R SDK reference

strand_* functions and typed error conditions.

Supported markers

The 19 markers we predict today.

REST API

Use the HTTP API directly from any language.