Single-cell RNA sequencing has gone from a niche technique to the default lens for studying tissue biology, immune dynamics, and developmental trajectories. But the tooling has not kept up with the science. A typical scRNA-seq pipeline today touches half a dozen libraries, several reference datasets, and at least one GPU-hungry foundation model. Standing that up locally is a project in itself.
SciRouter's single-cell API collapses that stack into a single endpoint. You send a count matrix or an AnnData object; you get back cell type labels, embeddings, trajectories, and differential expression results. No CUDA versions to pin, no 64 GB workstation, no weekend lost to environment conflicts.
Why single-cell tooling is fragmented
The scRNA-seq ecosystem grew in waves. First came the preprocessing libraries: Seurat in R and Scanpy in Python, each with its own data structures and conventions. Then came the batch-correction era: BBKNN, Harmony, scVI, and a dozen others. Then foundation models: scGPT, Geneformer, Universal Cell Embedding (UCE), and a growing list of domain-specific variants. Then spatial methods: cell2location, Tangram, CARD, Stereoscope.
Each tool has its own installation pattern, its own input format, and its own expectation of what runs on GPU versus CPU. The result is that a typical paper figure might touch five different conda environments. Researchers spend more time configuring software than doing biology.
The unified API pattern solves this the same way OpenRouter solved LLM fragmentation: one authentication, one input schema, one billing relationship, and a router underneath that sends each call to the right tool running on the right hardware.
scGPT: a foundation model for transcriptomes
scGPT is the closest thing single-cell biology has to a GPT moment. It was trained on over 33 million cells from public atlases and uses a masked language model objective where gene expression tokens play the role of words. The result is a transformer that understands cell state at a level that generalizes across tissues and species.
In practical terms, scGPT does four things unusually well:
- Zero-shot annotation. Embed a new dataset, match to reference cell types, and get labels without training a classifier.
- Batch integration. The embedding space is robust to donor and technology differences, so cells from different studies align naturally.
- Perturbation prediction. Given a baseline cell and a perturbation (gene knockout, drug), predict the resulting expression profile.
- Gene regulatory network inference. Attention patterns between gene tokens yield interpretable co-expression graphs that rediscover known pathways.
The drawback is infrastructure. scGPT weights are several gigabytes, inference wants an A100-class GPU, and preprocessing your data into the token format expected by the model is a non-trivial step. An API hides all of this.
A complete pipeline in one call
Here is what a zero-shot annotation call looks like. You pass a count matrix or a URL to an H5AD file, pick the reference atlas, and specify scGPT as the embedding model.
import httpx
API_KEY = "sk-sci-..."
BASE = "https://scirouter.ai/v1"
response = httpx.post(
f"{BASE}/singlecell/annotate",
headers={"Authorization": f"Bearer {API_KEY}"},
json={
"model": "scgpt",
"reference_atlas": "human-cell-atlas-v2",
"data_url": "s3://my-bucket/pbmc-10k.h5ad",
"layer": "counts",
"return_embedding": True,
"return_umap": True,
},
timeout=600,
)
result = response.json()
print(f"Annotated {result['n_cells']} cells in {result['runtime_s']:.1f}s")
print(f"Top cell types: {result['cell_type_counts']}")
# Download results as an AnnData object
import anndata
adata = anndata.read_h5ad(result["output_url"])The response includes cell type labels, confidence scores, a 256-d scGPT embedding per cell, and a UMAP projection ready to plot. What would take a day of setup locally runs in about four minutes for a 10,000-cell dataset.
Scanpy without the install
Not every analysis needs a foundation model. Classical Scanpy pipelines are fast, well understood, and often the right tool. The API exposes the full Scanpy preprocessing stack as composable steps you can chain in a single request.
- Normalize total counts per cell
- Log transform
- Select highly variable genes
- Scale and run PCA
- Build a k-nearest-neighbor graph
- Run Leiden clustering at multiple resolutions
- Compute differential expression per cluster
Each step runs on a CPU worker and results stream back as a single AnnData object. Because the schemas match Scanpy exactly, any downstream code you already have (Seurat conversions, custom plotting, CellRank analyses) keeps working without change.
Trajectory inference and pseudotime
Trajectory inference takes an embedded dataset and orders cells along a developmental axis. It is one of the most valuable things you can do with scRNA-seq data, and one of the most fiddly to set up. The API wraps the three workhorses of the field:
- PAGA for coarse-grained connectivity between clusters.
- Diffusion pseudotime (DPT) for continuous ordering from a root cell.
- Monocle3 for branching trajectories with learned principal graphs.
You pick the method, pass an embedding, and point at a root cell. Results come back as per-cell pseudotime values and an edge list that you can feed into any visualization library. For teams building developmental atlases, this turns what used to be a multi-day R pipeline into a two-minute call.
Spatial deconvolution for Visium and Stereo-seq
Spatial transcriptomics platforms like 10x Visium and BGI Stereo-seq capture expression per tissue spot, not per cell. Each spot contains a mixture of cell types, and the job of deconvolution is to estimate the proportions. This is where tools like cell2location, Tangram, and Stereoscope come in.
The API exposes all three behind a common interface. You upload a spatial dataset and a single-cell reference; the service runs the chosen method on a GPU worker and returns per-spot cell type proportions. The result is a matrix you can overlay directly on the histology image to build cell-type maps of tissue.
How this fits the broader SciRouter stack
Single-cell analysis rarely stands alone. A typical project combines transcriptomics with protein structure prediction (to model the receptors that define a cell state), small molecule screening (to find drugs that revert a disease state to healthy), and sometimes genetic perturbation design. Having all of those under one API key removes the friction of moving data between services.
For example, a drug repurposing workflow might look like:
- Annotate a disease dataset with scGPT to identify the affected cell type.
- Run differential expression between disease and control cells of that type.
- Use the Connectivity Map service to find small molecules that reverse the signature.
- Score the top candidates through the ADMET API for drug-likeness.
Every step above is one call to scirouter.ai. You never leave the API surface.
Performance and cost
Two numbers people usually want to know before adopting a hosted pipeline: how fast and how expensive. For the scGPT annotation path, a 10,000-cell PBMC dataset takes about 3 to 5 minutes end-to-end, including preprocessing. A 100,000-cell dataset takes 15 to 25 minutes. Billing is per cell processed, so you pay proportional to dataset size and never for idle GPU time.
Scanpy-only pipelines are much cheaper because they run on CPU workers. A full normalization, HVG selection, PCA, UMAP, and Leiden clustering pass on 50,000 cells takes under two minutes and costs a fraction of a GPU call.
Getting started
The fastest way to try the single-cell API is through Cell Atlas Lab, the web interface that wraps the same endpoints. You can upload a dataset, pick a reference, and explore the annotated UMAP without writing any code. Once you see results you like, the lab exposes the exact API call to reproduce them in a notebook.
For programmatic access, the Python SDK handles authentication, retries, and streaming for large datasets. Install with pip install scirouter and you can replace your local Scanpy + scVI + scGPT stack with one import.