> This page is for Developer.

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

# constructor

> The `Makeswift` client is used to fetch data from the Makeswift API.

The `Makeswift` client is used to fetch data from the Makeswift API.

## Arguments

**`apiKey`** `string` — required

The API key for the Makeswift site.

---

**`options`** `object`

Options for a [runtime instance](/developer/docs/reference/reactruntime/constructor).

#### properties

**`runtime`** `ReactRuntime`

A [runtime instance](/developer/docs/reference/reactruntime/constructor). Required for
custom breakpoints.

---

---

## Example

The following example instantiates a new `Makeswift` client.

**`src/makeswift/client.ts`**

```ts src/makeswift/client.ts
import { Makeswift } from "@makeswift/runtime/next";
import { strict } from "assert";

import { runtime } from "./runtime";

strict(
  process.env.MAKESWIFT_SITE_API_KEY,
  "MAKESWIFT_SITE_API_KEY is required"
);

export const client = new Makeswift(process.env.MAKESWIFT_SITE_API_KEY, {
  runtime,
});
```