> ## 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.

# get_example_query

> Get Example Query for Model.

Retrieves an example query structure for a specific model.
This provides a template that can be modified for your specific needs.

## Usage

```r theme={null}
get_example_query(model_id, api_base_url = NULL, self_hosted = NULL)
```

## Arguments

* **`model_id`**: Character string specifying the model ID (e.g., "gem-1-bulk", "gem-1-sc").
* **`api_base_url`**: The base URL for the API server. When NULL (default), it
  is resolved from the `SYNTHESIZE_API_BASE_URL` environment variable,
  falling back to the production default (API\_BASE\_URL). Point this at a
  self-hosted model container to fetch its example query.
* **`self_hosted`**: Logical; when TRUE, the request targets a self-hosted
  container and does not require an API key (one is only sent if set).
  When NULL (default), it is resolved from the `SYNTHESIZE_SELF_HOSTED`
  environment variable (truthy for 1/true/yes/on), defaulting to FALSE.

## Returns

A list representing a valid query structure for the specified model.

## Examples

```r theme={null}
# Get example query for bulk RNA-seq model
query <- get_example_query(model_id = "gem-1-bulk")$example_query

# Get example query for single-cell model
query_sc <- get_example_query(model_id = "gem-1-sc")$example_query

# Modify the query structure
query$inputs[[1]]$num_samples <- 10

# Fetch from a self-hosted container (no API key required)
query <- get_example_query(
  model_id = "gem-1-bulk",
  api_base_url = "https://gem-1-bulk.internal.partner.example",
  self_hosted = TRUE
)$example_query
```

## Source

Generated from [`R/call_model_api.R`](https://github.com/synthesizebio/rsynthbio/blob/main/R/call_model_api.R) and the package help files in `man/`.
