> ## Documentation Index
> Fetch the complete documentation index at: https://docs.strandai.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Quickstart

> Sign in, mint an API key, install the Python or R SDK, and submit your first H&E whole-slide prediction on the Strand AI platform in five minutes.

This guide walks you through signing in, minting an API key, installing the
Python SDK, and submitting a prediction against a slide.

<Warning>
  **For research use only.** Strand AI predictions are model outputs intended
  for research and hypothesis generation. They are not validated for, and must
  not be used in, clinical diagnosis, treatment selection, or patient care
  decisions.
</Warning>

## 1. Sign in

The Strand AI platform is currently **invite-only**. If you have access, sign
in at [app.strandai.com](https://app.strandai.com). Otherwise email
[support@strandai.com](mailto:support@strandai.com) and we'll get you
onboarded.

## 2. Mint an API key

Go to [app.strandai.com/settings/api-keys](https://app.strandai.com/settings/api-keys)
and click **Create key**. Copy the value. It starts with `sk-strand-` and
is shown **only once**.

Set it in your environment:

```bash theme={null}
export STRAND_API_KEY=sk-strand-XXXXXXXXXXXXXXXXXXXXXXXX
```

<Tip>
  Treat the API key like a password. It's scoped to your org and inherits
  your credit balance.
</Tip>

## 3. Install the SDK

<CodeGroup>
  ```bash Python theme={null}
  pip install strand-sdk
  # with bioinformatics extras (AnnData / zarr):
  pip install "strand-sdk[anndata]"
  ```

  ```r R theme={null}
  # from r-universe (when published)
  install.packages(
    "strandai",
    repos = c("https://strand-ai.r-universe.dev", "https://cloud.r-project.org")
  )
  ```
</CodeGroup>

## 4. Run your first prediction

<CodeGroup>
  ```python Python theme={null}
  from strand import Client

  client = Client()  # reads STRAND_API_KEY from env

  # Upload the slide, submit a prediction, and download results.
  upload = client.uploads.upload_file("biopsy.svs")
  job = client.predict.submit(upload.id, markers=["CD8", "PanCK", "Ki67"])
  job.wait()                                # blocks until terminal status
  adata = job.download_results()            # AnnData with one channel per marker
  ```

  ```r R theme={null}
  library(strandai)
  client <- strand_client()  # reads STRAND_API_KEY

  upload <- strand_upload_file(client, "biopsy.svs", progress = TRUE)
  job <- strand_predict(client, upload$id, c("CD8", "PanCK", "Ki67"))
  strand_job_wait(job, progress = TRUE)
  spe <- strand_download_results(job)       # SpatialExperiment
  ```
</CodeGroup>

That's it. `adata` (Python) / `spe` (R) holds one channel per requested
marker, aligned to the slide's pixel grid.

## 5. Inspect outputs

<CodeGroup>
  ```python Python theme={null}
  adata
  # AnnData object with n_obs × n_vars = <patches> × 3
  #   obs:    'x', 'y'      (patch centroid in slide coordinates)
  #   var:    'marker'
  #   layers: 'predicted'   (per-patch marker intensity)

  # Quick sanity check:
  adata.var_names.tolist()
  # ['CD8', 'PanCK', 'Ki67']
  ```

  ```r R theme={null}
  spe
  # class: SpatialExperiment
  # dim: 3 <patches>
  # assays(1): predicted
  # rowData names(1): marker
  # spatialCoords names(2): x y
  ```
</CodeGroup>

## 6. Estimate cost before submitting

Predictions are billed in **credits** (1 credit per 224×224-px patch per
marker). Estimate first if you want to know the price up front:

<CodeGroup>
  ```python Python theme={null}
  estimate = client.predict.estimate(upload.id, markers=["CD8", "PanCK", "Ki67"])
  print(f"will cost ~{estimate.estimated_credits} credits; "
        f"balance: {estimate.org_balance}")
  ```

  ```r R theme={null}
  est <- strand_estimate(client, upload$id, c("CD8", "PanCK", "Ki67"))
  message("will cost ~", est$estimated_credits, " credits; ",
          "balance: ", est$org_balance)
  ```
</CodeGroup>

See [Pricing](/pricing) for the credits model.

## Where to go next

<CardGroup cols={2}>
  <Card title="Python SDK reference" icon="python" href="/sdks/python">
    Lower-level methods, chunked uploads, streaming events.
  </Card>

  <Card title="R SDK reference" icon="r-project" href="/sdks/r">
    `strand_*` functions and typed error conditions.
  </Card>

  <Card title="Supported markers" icon="dna" href="/markers">
    The 19 markers we predict today.
  </Card>

  <Card title="REST API" icon="rectangle-terminal" href="/api-reference/endpoint/createUpload">
    Use the HTTP API directly from any language.
  </Card>
</CardGroup>
