> ## Documentation Index
> Fetch the complete documentation index at: https://docs.synthesize.bio/llms.txt
> Use this file to discover all available pages before exploring further.

# R SDK

> rsynthbio — the official R client for the Synthesize Bio platform.

`rsynthbio` is an R package that provides a convenient interface to the [Synthesize Bio](https://www.synthesize.bio/) API. It lets you generate realistic gene expression data for specified biological conditions, work with reference samples, and predict metadata from observed expression, all from R.

If you'd prefer 1-click dataset generation and analysis, try the [web platform](https://app.synthesize.bio/datasets/).

<CardGroup cols={2}>
  <Card title="Installation" icon="download" href="/rsynthbio/installation">
    Install from CRAN, GitHub, or a local source build.
  </Card>

  <Card title="Getting started" icon="rocket" href="/rsynthbio/getting-started">
    Authenticate, list models, and make your first prediction.
  </Card>

  <Card title="Baseline models" icon="dna" href="/rsynthbio/models/baseline">
    Generate synthetic expression from metadata alone.
  </Card>

  <Card title="Reference conditioning" icon="microscope" href="/rsynthbio/models/reference-conditioning">
    Anchor generation to a real reference sample.
  </Card>

  <Card title="Metadata prediction" icon="magnifying-glass" href="/rsynthbio/models/metadata-prediction">
    Infer biological metadata from observed expression.
  </Card>

  <Card title="Function reference" icon="code" href="/rsynthbio/reference">
    Generated from the package help pages in this repo.
  </Card>
</CardGroup>

## Quickstart

```r theme={null}
library(rsynthbio)

set_synthesize_token(use_keyring = TRUE)

query <- get_example_query(model_id = "gem-1-bulk")$example_query
result <- predict_query(query, model_id = "gem-1-bulk")

metadata <- result$metadata
expression <- result$expression
```

## Source and support

* [Source code](https://github.com/synthesizebio/rsynthbio)
* [CRAN package page](https://cran.r-project.org/package=rsynthbio)
* Email [support@synthesize.bio](mailto:support@synthesize.bio)
