<!-- Source: https://docs.biosimulant.com/developer-api/data-contract -->

# Refs, inputs, outputs, and provenance

## Capability discovery

`GET /capabilities` lists runnable lab versions. `GET /capabilities/{namespace}/{name}` returns the latest accessible version plus declared input and output schemas. `GET /compute-profiles` lists available CPU/GPU resources, limits, and credit rates.

Only accessible lab packages in an executable registry state are returned. Private packages are isolated to their owner.

## References

Use either:

```text
namespace/name
namespace/name@version
```

The service resolves an unpinned reference once, before execution, and persists the exact version and package digest. Pinned references are recommended for production.

## Inputs and units

Input keys use the lab's declared public names, not internal module aliases. Values can be raw JSON:

```python
inputs={"initial_cells": 10}
```

Or carry an explicit unit:

```python
inputs={"temperature": {"value": 37, "unit": "degC"}}
```

Unknown inputs, missing required values, incompatible types, and unsupported units return structured `422` errors before credits are reserved.

## Outputs

The result flattens declared lab outputs back to their public names:

```python
result.outputs["population"]
```

Internal module aliases and wiring paths are not part of the public result contract.

## Provenance

Run provenance includes the requested and resolved package refs, package SHA-256 digest, lab commit, scientific runtime version, compute profile, and execution provider. Runtime/solver configuration, model resolutions, and a random seed are retained when present in the submitted lab configuration.
