API Getting Started
Access Synthesize Bio's generative models directly from your code using our Python 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
pip install pysynthbio
3. Authenticate
import pysynthbio
# Interactive — prompts for your key and stores it securely
pysynthbio.set_synthesize_token(use_keyring=True)
# Or set via environment variable
# export SYNTHESIZE_API_KEY=your_api_key_here
4. Generate Your First Dataset
import pysynthbio
# Get an example query structure
query = pysynthbio.get_example_query(model_id="gem-1-bulk")["example_query"]
# Generate the dataset
result = pysynthbio.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.