Prerequisites
Before You Begin
To use the Patient Analog API, you'll need an API key. Contact us to request access for your organization. Once approved, you'll receive credentials via secure email.
API Key
Python 3.8+ / Node.js 16+
Terminal / IDE
Steps
Quick Start Guide
1
Install the SDK
Choose your preferred language and install the official SDK.
Python
JavaScript
cURL
# Install Python SDK
pip install patientanalog
2
Configure Your API Key
Set your API key as an environment variable or pass it directly to the client.
# Set environment variable
export PATIENTANALOG_API_KEY="your-api-key-here"
3
Make Your First API Call
Initialize the client and fetch your account information to verify everything works.
from patientanalog import Client # Initialize the client client = Client() # Get account info account = client.account.get() print(f"Connected as: {account.name}") # List available experiments experiments = client.experiments.list() for exp in experiments: print(f"- {exp.name}: {exp.status}")
4
Run a Simulation
Create a simple drug response simulation using a digital twin model.
# Create a liver model simulation simulation = client.models.simulate( model_type="liver", compound="acetaminophen", concentration_um=[1, 10, 100, 1000], duration_hours=24 ) # Get results results = simulation.wait_for_completion() print(f"Viability at 1000 uM: {results.viability[-1]:.1%}")
Next Steps