API Getting Started
Access Synthesize Bio's generative models directly from your code using our R package.
1. Get an API Key
Visit your API Keys page to create one. Click + Create API Key, then copy the key — it will only be shown once.
2. Install
install.packages("rsynthbio")
3. Authenticate
library(rsynthbio)
# Interactive — prompts for your key and stores it securely
set_synthesize_token(use_keyring = TRUE)
# In future sessions, load the stored token
load_synthesize_token_from_keyring()
4. Generate Your First Dataset
library(rsynthbio)
# Get an example query structure
query <- get_example_query(model_id = "gem-1-bulk")$example_query
# Generate the dataset
result <- predict_query(query, model_id = "gem-1-bulk")
# Access the results
metadata <- result$metadata
expression <- result$expression
Learn More
Questions? Reach out at support@synthesize.bio.