> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://imo.ferndocs.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://imo.ferndocs.com/_mcp/server.

# SDKs

All three SDKs are generated from the same OpenAPI specification that powers this
API Reference, so they never drift from the API.

#### [TypeScript](https://github.com/fern-demo/imo-ts-sdk)

`@imo-demo/precision-normalize`

#### [Python](https://github.com/fern-demo/imo-python-sdk)

`imo-precision-normalize`

#### [Java](https://github.com/fern-demo/imo-java-sdk)

`com.imohealth:precision-normalize`

## Install

**`npm`**

```bash title="npm"
npm install @imo-demo/precision-normalize
```

**`pip`**

```bash title="pip"
pip install imo-precision-normalize
```

**`Maven`**

```xml title="Maven"
<dependency>
  <groupId>com.imohealth</groupId>
  <artifactId>precision-normalize</artifactId>
  <version>0.1.0</version>
</dependency>
```

## What you get

#### Automatic token management

The client performs the OAuth client-credentials exchange and refreshes the
JWT before expiry. You never touch `/oauth/token`.

#### Fully typed

Every request and response is typed, including the enums for `domain`,
`input_code_system`, `match_field_pref`, `severity`, and `sex`.

#### Typed errors

Distinct error classes per status code carrying the parsed error envelope.

#### Retries and timeouts

Configurable per-request timeouts, retry counts, and idempotent retry on
transient failures.

## Namespaces

The client mirrors the API's resources:

| Namespace   | Methods                                               |
| ----------- | ----------------------------------------------------- |
| `normalize` | `normalize()`, `enrich()`                             |
| `sessions`  | `create()`                                            |
| `events`    | `logSelection()`                                      |
| `auth`      | `getToken()` — called for you; rarely needed directly |

**`TypeScript`**

```typescript title="TypeScript"
import { ImoHealthClient } from "@imo-demo/precision-normalize";

const client = new ImoHealthClient({
  clientId: process.env.IMO_CLIENT_ID!,
  clientSecret: process.env.IMO_CLIENT_SECRET!,
});

await client.normalize.normalize({ /* ... */ });
await client.normalize.enrich({ /* ... */ });
await client.sessions.create();
await client.events.logSelection({ /* ... */ });
```

**`Python`**

```python title="Python"
from imo_precision_normalize import ImoHealth

client = ImoHealth(
    client_id=os.environ["IMO_CLIENT_ID"],
    client_secret=os.environ["IMO_CLIENT_SECRET"],
)

client.normalize.normalize(...)
client.normalize.enrich(...)
client.sessions.create()
client.events.log_selection(...)
```

**`Java`**

```java title="Java"
ImoHealth client = ImoHealth.builder()
    .clientId(System.getenv("IMO_CLIENT_ID"))
    .clientSecret(System.getenv("IMO_CLIENT_SECRET"))
    .build();

client.normalize().normalize(...);
client.normalize().enrich(...);
client.sessions().create();
client.events().logSelection(...);
```

## Async support

**`Python — asyncio`**

```python title="Python — asyncio"
from imo_precision_normalize import AsyncImoHealth, NormalizeRequestRequestsItem

client = AsyncImoHealth(
    client_id=os.environ["IMO_CLIENT_ID"],
    client_secret=os.environ["IMO_CLIENT_SECRET"],
)

result = await client.normalize.normalize(
    client_request_id="async-001",
    requests=[
        NormalizeRequestRequestsItem(
            record_id="1", domain="Problem", input_term="chest pain"
        )
    ],
)
```

**`TypeScript`**

```typescript title="TypeScript"
// The TypeScript client is promise-based throughout.
const result = await client.normalize.normalize({
  clientRequestId: "async-001",
  requests: [{ recordId: "1", domain: "Problem", inputTerm: "chest pain" }],
});
```

## Environments

The sandbox is the default base URL. Override it to point at production:

**`TypeScript`**

```typescript title="TypeScript"
const client = new ImoHealthClient({
  environment: "https://api.imohealth.com",
  clientId: process.env.IMO_CLIENT_ID!,
  clientSecret: process.env.IMO_CLIENT_SECRET!,
});
```

**`Python`**

```python title="Python"
client = ImoHealth(
    base_url="https://api.imohealth.com",
    client_id=os.environ["IMO_CLIENT_ID"],
    client_secret=os.environ["IMO_CLIENT_SECRET"],
)
```

> **Note**
>
> The published spec declares only the sandbox host
> (`https://api-sandbox.imohealth.com`). Confirm your production host with IMO
> Health before switching.