rsynthbio
client against a self-hosted model container instead of the hosted API at
app.synthesize.bio.
Self-hosted deployment is a model deployment option available within a
Synthesize Bio partnership. To learn more or request access, contact
partnerships@synthesize.bio.
How it differs from the hosted path
The hosted path is asynchronous: it starts a query, polls for completion, and downloads results. A self-hosted container instead returns predictions synchronously as an Apache Arrow IPC stream.rsynthbio decodes that stream into exactly the same data frames you get from
the hosted path (expression, metadata, and latents), so downstream code
does not change.
Key differences:
- No polling and no download URL — a single request returns the data.
- Requires the optional
arrowpackage — install it withinstall.packages("arrow"). - No API key required — a key is only sent when
SYNTHESIZE_API_KEYis set (use this if your container runs with authentication enabled).
Enabling self-hosted mode
Setself_hosted = TRUE on a call, or enable it for the whole session with the
SYNTHESIZE_SELF_HOSTED environment variable (truthy values: 1, true,
yes, on).
Pointing each model at its container
Self-hosted deployments typically run one container per model. Set a per-model base URL once and you never have to passapi_base_url on individual calls.
The variable name is SYNTHESIZE_API_BASE_URL__<MODEL>, where <MODEL> is the
upper-cased model id with non-alphanumeric characters replaced by underscores
(for example, gem-1-bulk becomes SYNTHESIZE_API_BASE_URL__GEM_1_BULK).
gem-1-bulk_reference-conditioning and gem-1-bulk_predict-metadata) resolve
to the same per-model variable as their base model.
Resolution precedence
Whenapi_base_url is NULL, the base URL is resolved in this order:
- An explicit
api_base_urlargument passed to the call. - The per-model variable
SYNTHESIZE_API_BASE_URL__<MODEL>. - The global
SYNTHESIZE_API_BASE_URL. - The production default (
https://app.synthesize.bio).
api_base_url directly:
Authentication (optional)
Self-hosted containers may run without authentication. If yours requires a key, setSYNTHESIZE_API_KEY and the client attaches it as a bearer token:
Raw responses
Passraw_response = TRUE to receive the parsed Arrow Table and its schema
metadata (including model_version, request_type, and gene_order) instead
of the transformed data frames: