# @scramjet/api-client

> This package is part of Scramjet Transform Hub. The package provides the API Client for use with Scramjet Transform Hub.

Latest version **2.3.2** (published 2026-10-14) · MIT license · 0 weekly downloads

## Install

```sh
npm install @scramjet/api-client
pnpm add @scramjet/api-client
yarn add @scramjet/api-client
bun add @scramjet/api-client
```

## Health

**Score 65/100 (B)** — status: active.

Positive: has types; no vulnerabilities; has provenance; recently updated; high maintenance score.

Warnings: low downloads; no esm support.

## Facts

| | |
|---|---|
| Version | 2.3.2 |
| Published | 2026-10-14 |
| First published | 2021-07-26 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 5 |
| Unpacked size | 36.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Provenance | attested (GitHub Actions) |
| GitHub stars | 71 |
| Author | Scramjet |
| Maintainers | scramjetorg, michalcz, stoq, patu, budleigh_salterton |

## Links

- npm: https://www.npmjs.com/package/@scramjet/api-client
- Repository: https://github.com/scramjetorg/transform-hub
- Homepage: https://github.com/scramjetorg/transform-hub#readme
- Issues: https://github.com/scramjetorg/transform-hub/issues
- npm.io page: https://npm.io/package/@scramjet/api-client

## Dependencies (5)

- [scramjet](https://npm.io/package/scramjet.md) ^4.37.0
- [@scramjet/symbols](https://npm.io/package/@scramjet/symbols.md) ^2.3.2
- [@scramjet/api-types](https://npm.io/package/@scramjet/api-types.md) ^2.3.2
- [@scramjet/client-utils](https://npm.io/package/@scramjet/client-utils.md) ^2.3.2
- [@scramjet/runtime-types](https://npm.io/package/@scramjet/runtime-types.md) ^2.3.2

## Recent versions

- 2.3.2 (latest) — 2026-10-14
- 2.3.0 — 2026-10-13
- 2.2.1 — 2026-10-02
- 2.2.0 — 2026-09-26
- 2.1.2 — 2026-09-22
- 2.1.0 — 2026-09-09
- 2.0.0 — 2026-08-09
- 1.0.1 — 2024-03-13
- 1.0.0 — 2024-03-08
- 0.39.3 — 2024-02-15
- 0.39.2 — 2024-02-13
- 0.39.1 — 2024-02-12
- 0.38.0 — 2024-01-10
- 0.37.0 — 2023-11-27
- 0.36.1 — 2023-10-02
- … 72 more at https://npm.io/package/@scramjet/api-client/versions

## README

# @scramjet/api-client

Legacy v1 API client for Scramjet Transform Hub. Provides typed clients for interacting with Hub/STH, Manager, Instance, and Sequence APIs using the `/api/v1` route tree.

## When to use

Use `@scramjet/api-client` when maintaining existing integrations that target the v1 API. The v1 API remains supported for backwards compatibility.

For new integrations, prefer [@scramjet/rest-api2](../rest-api2/README.md) which provides the current v2 API contract with typed route definitions, fluent clients, and transport-agnostic usage.

## Quick start

```typescript
import { HostClient } from "@scramjet/api-client";
import { ManagerClient } from "@scramjet/api-client";

// Host client — connect directly to an STH instance
const host = new HostClient("http://localhost:8000/api/v1");

// Manager client — connect to a Manager
const manager = new ManagerClient("http://manager-host:8200/api/v1");
```

## Stability

This package is **stable** and maintained for backwards compatibility. The v1 API route tree is not being extended with new features.

## Legacy status

The v1 API client targets the `/api/v1` route tree on STH and Manager. The `HostClient`, `InstanceClient`, and `SequenceClient` provide methods for lifecycle management, input/output streaming, and monitoring using the v1 API contract.

See the [legacy v1 API client documentation](../../docs-source/api/legacy/v1-api-client.md) for detailed v1 usage patterns.

## See also

- [API client usage](../../docs-source/api/client-usage.md) for the current v2 API surface.
- [Legacy v1 API client docs](../../docs-source/api/legacy/v1-api-client.md) for v1-only features.

## Install

```bash
npm install @scramjet/api-client
```

## Import

```typescript
import { /* ... */ } from "@scramjet/api-client";
```

## Documentation

See the [package docs](../../dist-docs/reference/typescript/api-client/README.md) for full documentation.

---

<!-- Generated by scripts/docs.js from docs-source/readmes/packages/api-client.md. Do not edit this file directly. -->

---
_Source: https://npm.io/package/@scramjet/api-client · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
