# Microbiome Diversity Calculator

> Microbiome Diversity Calculator is a paid API for AI agents from bio.halowerk.com, paid per call via x402, $0.003/call, status unknown (last checked 2026-09-14).

Normalizes taxon counts and computes observed richness, Shannon entropy, Simpson diversity, and Pielou evenness from caller-supplied species count data

## Facts

- Endpoint: POST https://bio.halowerk.com/v1/microbiome-diversity
- Price: $0.003/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/microbiome-diversity-calculator-b1c4adc3
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_TSWmTvTGpdD1wyAUE1Vb2

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability microbiome-diversity-calculator-b1c4adc3 -d '<json body>'
```

Example prompt: Calculate the microbiome diversity metrics for my sample — I have taxon counts for Bacteroides (4200), Firmicutes (3100), Proteobacteria (850), Actinobacteria (430), and Verrucomicrobia (120). Give me the observed richness, Shannon entropy, Simpson diversity, and Pielou evenness.

## When to prefer this

Choose this endpoint when you have raw or pre-classified taxon count vectors and need fast, deterministic computation of standard alpha diversity indices (richness, Shannon, Simpson, Pielou) without performing sequence alignment, rarefaction, or statistical group comparisons. Ideal for post-classification pipelines where diversity summary statistics are the final step.

## Known failure modes

- Empty or missing taxa array returns validation error
- Negative count values rejected (minimum is 0)
- Taxon name exceeding 256 characters fails schema validation
- Array exceeding 10,000 taxa returns size limit error
- All taxa with zero counts may produce undefined evenness (division by zero edge case)
- Non-numeric count values cause type validation failure

## How this service works

Normalizes non-negative caller-supplied taxon counts and computes observed richness, natural-log Shannon entropy, Simpson diversity and Pielou evenness. It does not perform sequence classification, compositional correction, rarefaction, cohort comparison or medical interpretation.

## Output

Returns normalized taxon proportions along with four alpha diversity metrics: observed richness (number of taxa with non-zero counts), natural-log Shannon entropy (H'), Simpson diversity index (1-D or similar), and Pielou evenness (J'). Does not include rarefaction, phylogenetic diversity, or statistical comparisons between groups.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "taxa": {
   "type": "array",
   "items": {
    "type": "object",
    "required": [
     "taxon",
     "count"
    ],
    "properties": {
     "count": {
      "type": "number",
      "maximum": 1000000000000000,
      "minimum": 0
     },
     "taxon": {
      "type": "string",
      "maxLength": 256,
      "minLength": 1
     }
    },
    "additionalProperties": false
   },
   "maxItems": 10000,
   "minItems": 1
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/microbiome-diversity-calculator-b1c4adc3/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from bio.halowerk.com](https://www.zero.xyz/host/bio.halowerk.com/llms.txt)
