Cell perturbations¶
POST /v1/perturbations (or POST /v1/jobs with "model": "cellgemma") runs CellGemma (google/cellgemma-e4b, Apache-2.0, Google DeepMind) to predict single-cell gene expression shifts (+GENE / -GENE ranked residual shifts and optional continuous expression profiles via an assay-specific ExpressionDecoder). It returns a job to poll (see Jobs). Every example sends your key from $JAPANFOLD_API_KEY (see Authentication).
Research use only. Predictions are computational hypotheses and not clinical or therapeutic advice.
Intervention types¶
CellGemma supports four perturbation types:
- Small-molecule drugs:
drug_name,smiles, andconcentration(e.g."0.05 uM"). All three are required for drug perturbations. - CRISPR knockdowns:
gene_knockdown(single gene like"TP53"or combinatorial like"TP53+KRAS"). - Cytokines:
cytokine(e.g."IFNG"). - Clinical tumor treatments:
treatment(e.g."Pembrolizumab").
Provide either a bundled control_dataset (tahoe, k562) + cell_idx, or inline cell_input (.json, .csv, or .h5ad).
Submit a perturbation¶
Single request (POST /v1/perturbations)¶
curl -s -X POST https://api.japanfold.aiand.com/v1/perturbations \
-H "Authorization: Bearer $JAPANFOLD_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "cellgemma",
"name": "trametinib-tahoe",
"drug_name": "Trametinib",
"smiles": "CC1=C2C(=C(N(C1=O)C)NC3=C(C=C(C=C3)I)F)C(=O)N(C(=O)N2C4=CC(=CC=C4)NC(=O)C)C5CC5",
"concentration": "0.05 uM",
"control_dataset": "tahoe",
"cell_idx": 0,
"decoder": "tahoe",
"params": {"temperature": 0.7, "max_new_tokens": 4096, "seed": 42}
}'
Batch requests (POST /v1/jobs)¶
Pass a list of perturbation objects in input (up to 64 per job):
curl -s -X POST https://api.japanfold.aiand.com/v1/jobs \
-H "Authorization: Bearer $JAPANFOLD_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "cellgemma",
"name": "screen-batch",
"input": [
{"id": "tram_50nm", "drug_name": "Trametinib", "smiles": "CC1=C2C(=C(N(C1=O)C)NC3=C(C=C(C=C3)I)F)C(=O)N(C(=O)N2C4=CC(=CC=C4)NC(=O)C)C5CC5", "concentration": "0.05 uM", "control_dataset": "tahoe", "cell_idx": 0},
{"id": "tp53_kd", "gene_knockdown": "TP53", "control_dataset": "k562", "cell_idx": 0}
],
"params": {"temperature": 0.7, "seed": 42}
}'
Parameters¶
| Parameter | Type | Default | Range | Description |
|---|---|---|---|---|
temperature |
float | 0.7 |
0.0 – 2.0 |
Sampling diversity (0.0 for greedy decoding). |
max_new_tokens |
int | 4096 |
64 – 8192 |
Maximum gene-shift tokens generated per perturbation. |
seed |
int | null |
0 – 2147483647 |
Optional random seed for reproducibility. |
use_decoder |
bool | true |
— | Run the selected ExpressionDecoder when decoder is set. |
Available decoders: tahoe, k562_essential, rpe1_essential, jurkat, hepg2, pbmc_cytokine, parse_10m, norman_2019, replogle_k562_gwps, adamson_2016, dixit_2016, sciplex3, tumor_treatment.
Results¶
When status == "succeeded", GET /v1/jobs/{id}/results returns results (per-perturbation +GENE / -GENE shifts and optional decoded expression) plus downloadable summary.csv and results.json artifacts.