Skip to main content
Lattice predicts spatially resolved protein-marker maps from routine H&E, delivered as virtual mIF channels. This guide covers the programmatic workflow: upload, side-effect-free pricing, job submission, waiting, and result download. For the standard browser workflow, start with the Platform quickstart.
For research use only. Strand AI predictions are model outputs intended for research and hypothesis generation. They are not validated for clinical use. Do not use them for diagnosis, treatment selection, or patient care decisions.

1. Create an API key

Sign in to app.strandai.com, select the organization your integration should use, and open Settings → API keys. Choose “Create key” and copy the sk-strand-… value when it appears. The full value is shown only once.
Treat the API key like a password. It is scoped to the selected organization and uses that organization’s sample access and credit balance.

2. Install a client

3. Upload and price the run

Slides must be de-identified before upload. Automated slide de-identification is off by default and runs only when enabled for the organization. It does not determine whether a slide satisfies HIPAA or any other legal de-identification standard, and it does not inspect or remove identifiers in tissue pixels or filenames. See Security and data handling.
strand_upload_file() returns after the storage event starts ingest. Sample metadata and tissue-tile pricing become ready asynchronously, so both bounded checks are required before an immediate prediction. Omit mpp when the slide’s embedded calibration is authoritative. The dry run reports the exact price without creating a job or reserving credits.

4. Submit and wait

Submission reserves credits atomically. The job continues server-side if the client disconnects.

5. Download results

The in-memory Python result is an AnnData. The R result is a SpatialExperiment. Both contain the requested marker channels aligned to the slide coordinate system.

Next steps

Python SDK

Typed samples, jobs, events, exports, and selective result reads.

R SDK

strand_* functions and Bioconductor result handling.

Command line

Run the workflow from a shell without writing a script.

REST API

Use the canonical HTTP contract directly.