---
title: "Initialize the ai package"
slug: "initialize-the-ai-package"
abstract: "How to initialize the optional Marketplace SDK ai package so your app can interact with AI skills APIs."
---
# Initialize the ai package

> [!note]
> **Before you begin**
> -   Complete the [SDK quick start](https://doc.sitecore.com/mp/en/developers/sdk/0/sitecore-marketplace-sdk/quick-start--manual-.html "Quick start (manual)"). In the quick start, you initialize the Marketplace SDK `client` package, which is required for every Marketplace app.

The Marketplace SDK `ai` package is optional by default, but you must initialize it if your app needs to interact with AI skills APIs. AI skills APIs provide LLM-powered capabilities grounded in SitecoreAI data.

To initialize the `ai` package:

1. If you haven't installed the package yet, install it by running the following command in your terminal:

    ```bash
    npm install @sitecore-marketplace-sdk/ai
    ```

2. In the `useMarketplaceClient.ts` hook, import `AI` from the package:

    ```typescript
    import { AI } from "@sitecore-marketplace-sdk/ai";
    ```

3. In the same file, in the `getMarketplaceClient` function, in the `config` variable, add `AI` to the list of modules, then save your changes:

    ```typescript
    const config = {
      target: window.parent,
      modules: [AI], // add the module
    };
    ```

You can now start making queries and mutations that require access to AI skills APIs, for example, [make a Brand Review API request](https://doc.sitecore.com/mp/en/developers/sdk/0/sitecore-marketplace-sdk/make-a-brand-review-rest-api-request.html "Make a Brand Review REST API request"). For a full list of operations, refer to the [reference documentation](https://doc.sitecore.com/mp/en/developers/sdk/0/sitecore-marketplace-sdk/sitecore-marketplace-sdk-reference.html "Sitecore Marketplace SDK reference").