# Animica FHIR Transform

> Animica FHIR Transform is a paid API for AI agents from animica.dev, paid per call via x402, $0.002/call, status unknown (last checked 2026-09-13).

Transforms FHIR documents between formats — flattening bundles, collecting resources, and converting lab rows or demographic rows into FHIR-compliant Observations and Patients.

## Facts

- Endpoint: POST https://animica.dev/x402/health/fhir/transform
- Price: $0.002/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-13
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/animica-fhir-transform-5bc8417f
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_aDNoxdMXrjSJAE8xH9Woz

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 animica-fhir-transform-5bc8417f -d '<json body>'
```

Example prompt: Take this lab result row and convert it into a FHIR Observation using the lab.row-to-observation transform — here's the source document: {lab row JSON}.

## When to prefer this

Choose this endpoint when you need a lightweight, pay-per-call FHIR transformation without standing up your own FHIR server or managing API keys. It covers four common FHIR conversion patterns (bundle flatten, bundle collect, lab row to Observation, demographics row to Patient) and is ideal for agents processing health data in pipelines where FHIR compliance is required but full FHIR server infrastructure is overkill.

## Known failure modes

- Invalid or malformed source document returns a JSON error response
- Unsupported transform value returns an error indicating valid options
- Missing required 'input' or 'transform' fields cause a validation error
- Payment failure (x402) prevents the call from being processed
- Malformed FHIR structure in input may produce incomplete or incorrect output

## How this service works

Animica Python Cloud: deploy a Python function to animica.dev, get a public endpoint, and earn ANM every time someone runs it. Free AI (OpenAI-compatible, no key), free scheduled Workers, and an 80/20 developer split.

## Output

A JSON object containing the transformed FHIR-compliant data — either a flattened resource list, a collected bundle, a FHIR Observation, or a FHIR Patient — depending on the transform operation specified.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "input": {
   "type": "object",
   "description": "the source document"
  },
  "transform": {
   "type": "string",
   "description": "bundle.flatten | bundle.collect | lab.row-to-observation | demographics.row-to-patient"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json"
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/animica-fhir-transform-5bc8417f/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from animica.dev](https://www.zero.xyz/host/animica.dev/llms.txt)
