> ## Documentation Index
> Fetch the complete documentation index at: https://docs.makeswift.com/llms.txt
> Use this file to discover all available pages before exploring further.

# constructor

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

## Arguments

1. <ParamField query="apiKey" type="string" required>
     The API key for the Makeswift site.
   </ParamField>
2. <ParamField query="options" type="object">
     Options for a [runtime instance](/developer/reference/runtime/constructor).

     <Expandable>
       <ParamField query="runtime" type="ReactRuntime">
         A [runtime instance](/developer/reference/runtime/constructor). Required for
         custom breakpoints.
       </ParamField>
     </Expandable>
   </ParamField>

## Example

The following example instantiates a new `Makeswift` client.

```ts src/makeswift/client.ts theme={null}
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,
});
```
