---
title: watsonx.ai
slug: watson-ai
image: https://make-cxp-documentation.ams3.digitaloceanspaces.com/apps-center-icons/PREVIEW_watsonx-ai.png
docTags: 
createdAt: 2025-02-03T13:28:13.883Z
---

With the watsonx.ai app in Make, you can infer the next tokens using a selected model and set of parameters in your watsonx.ai account.

:::hint{type="info"}
The watsonx.ai app is available on the [Make Enterprise plan](https://www.make.com/en/enterprise).
:::

# Requirements

To use the watsonx.ai app in Make, you must have an [IBM watsonx.ai account](https://www.ibm.com/products/watsonx-ai).

# Connect watsonx.ai and Make

To get started, you must first create a connection between watsonx.ai and Make, allowing the two services to communicate.

To create the connection, you need to:

1. [Obtain an API key from your watsonx.ai account.](docId\:jdkzJwwoSUPf4myYsJEfJ)
2. [Create the connection in Make.](docId\:jdkzJwwoSUPf4myYsJEfJ)

## Obtain your API key in watsonx.ai

Before you create the connection in Make, you should first obtain an API key in your watsonx.ai account.

To obtain the API key:

1. Log in to your watsonx.ai account using [cloud.ibm.com](http://cloud.ibm.com).
2. Click **Manage** > **Access (IAM)** > **API keys**.
   ![](https://api.archbee.com/api/optimize/oAyFj2GHlBeBVWF5OAir2/syzlkejjY2uEd04RAQhuU_uuid-45184360-b7a8-ca35-27f4-28d9735ef543.png)
3. Enter a **Name** and **Description** for your API key and click **Create**.
   ![](https://api.archbee.com/api/optimize/oAyFj2GHlBeBVWF5OAir2/VL8zSM-ZIc4QK_ooKvgTR_uuid-15b4c65e-af4d-ab0d-eed5-809c0c628c9d.png)
4. Copy the **API key** value shown and store it in a safe place.

You will use this value in the **API Key** field in Make.

## Create the connection in Make

Once you have your watsonx.ai API key, you're ready to create the connection in Make.&#x20;

To create the connection:

1. Log in to your.Make account, add a watsonx.ai module to your scenario, and click **Create a connection**.
2. Optional: In the **Connection name** field, enter a name for the connection.
3. In the **IBM Cloud Region** field, select a region.
4. In the **Connection Level** field, select **Space** or **Project**.
5. If you selected **Space** for your **Connection Level**, enter your **Space ID**. If you selected **Project** for your **Connection Level**, enter your **Project ID**. Your Project ID and Space ID can be found in your [watsonx.ai account](https://dataplatform.cloud.ibm.com/).
   - **Project ID&#x20;**- Select the 4-bar menu in the upper-left corner, click **Projects**, and then click **View all projects**. Select your project and click the **Manage** tab. Your Project ID is listed in your project details.
   - **Space ID&#x20;**- The Space ID is shown in the model's URL in your browser’s address bar. Copy the part of the URL that follows `&space_id=`.
6. In the **API Key** field, enter the API key copied from your watsonx.ai account.
7. Click **Save**.
8. If prompted, authenticate your account and confirm access.

You've successfully created the connection and can now use the watsonx.ai app in your scenarios. If you want to make changes to your connection in the future, follow the steps [here](docId\:SO88FM6pkT0G-adKDDfzZ).

# watsonx.ai modules

After connecting to the watsonx.ai app, you can use the following types of modules to build your scenarios.

## Text Generation

:::ExpandableHeading
### Infer Text

Infer the text with a selected model and a set of parameters.

| **Connection**            | [Establish a connection to your watsonx.ai account.](docId\:jdkzJwwoSUPf4myYsJEfJ)                                                                                                                                                                                                                                                                                                                                                                                            |
| ------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Model ID**              | Select the model you want to use.                                                                                                                                                                                                                                                                                                                                                                                                                                             |
| **Input**                 | Enter the prompt to generate completions.                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| **Maximum New Tokens**    | Enter the maximum number of new tokens to be generated. The maximum supported value for this field depends on the model being used.<br />How the token is defined depends on the tokenizer and vocabulary size, which in turn depends on the model. Often the tokens are a mix of full words and sub-words. To learn more about tokenization, see here.<br />Depending on the users plan, and on the model being used, there may be an enforced maximum number of new tokens. |
| **Minimum New Tokens**    | Enter the minimum number of new tokens to be generated. If stop sequences are given, they are ignored until minimum tokens are generated.                                                                                                                                                                                                                                                                                                                                     |
| **Temperature**           | Enter a a value lower than or equal to 2. This value is used to modify the next-token probabilities in sampling mode. Values less than 1.0 sharpen the probability distribution, resulting in less variability in output. Values greater than 1.0 flatten the probability distribution, resulting in greater variability in output.                                                                                                                                           |
| **Decoding Method**       | Select the decoding method you wish to use. **Greedy decoding** selects the token with the highest probability at each step of the decoding process. **Sample decoding** offers more variability in how tokens are selected.                                                                                                                                                                                                                                                  |
| **Length Penalty**        | This setting can help to shorten the answers provided.<br />* **Decay Factor&#x20;**- Represents the factor of exponential decay. Larger values correspond to more aggressive decay. Value must be higher than or equal to 1.
* **Start Index&#x20;**- A number of generated tokens after which this should take effect. Value must be higher than or equal to 0.                                                                                                             |
| **Random Seed**           | Enter a value higher than or equal to 1. The random number generator seed is used in sampling mode for experimental repeatability. To produce repeatable results, set the same random seed value every time.                                                                                                                                                                                                                                                                  |
| **Time Limit**            | Enter the time limit in milliseconds. If not completed within this time, the generation will stop.<br />Depending on your plan and on the model being used, there may be an enforced maximum time limit.                                                                                                                                                                                                                                                                      |
| **Top-K**                 | Enter how many tokens to sample. Must be a number between 1 and 100.                                                                                                                                                                                                                                                                                                                                                                                                          |
| **Top-P**                 | Enter a value lower than or equal to 1. The Top-P value specifies the cumulative probability score threshold the tokens must read. This is also known as nucleus sampling.                                                                                                                                                                                                                                                                                                    |
| **Repetition Penalty**    | Enter a value between 1 and 2. A higher value leads to more diverse and varied output. A lower value will increase the probability of repeated text.                                                                                                                                                                                                                                                                                                                          |
| **Truncate Input Tokens** | Enter a value to specify the maximum number of tokens accepted in the input. A value of 0 means the input will not be truncated.                                                                                                                                                                                                                                                                                                                                              |
| **Include Stop Sequence** | Select **Yes** or **No**.<br />Stop sequences are one or more strings which will cause the text generation to stop if/when they are produced as part of the output. Stop sequences encountered prior to the minimum number of tokens being generated will be ignored.                                                                                                                                                                                                         |
| **Return Options**        | - **Input Text** - Select **Yes**, **No**, or **Empty**.
- **Generated Tokens&#x20;**- Select **Yes**, **No**, or **Empty**.
- **Input Tokens** - Select **Yes**, **No**, or **Empty**.
- **Token Logprobs** - Select **Yes**, **No**, or **Empty**.
- **Token Ranks** - Select **Yes**, **No**, or **Empty**.
- **Top n Tokens** - A higher value allows for more options to be considered, while a lower value creates more focused responses.                              |


:::

## Other

:::ExpandableHeading
### Make an API Call

| **Connection**   | [Establish a connection to your watsonx.ai account.](docId\:jdkzJwwoSUPf4myYsJEfJ)                                                                                                                                                               |
| ---------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| **URL**          | Enter a path relative to `https://www.example.com/api`, e.g. `/v2/users`                                                                                                                                                                         |
| **Method**       | Select the method type.<br />* **GET** - to retrieve information for an entry
* **POST** - to create a new entry
* **PUT** - to update/replace an existing entry
* **PATCH** - to make a partial entry update
* **DELETE** - to delete an entry. |
| **Headers**      | Enter the desired request headers.                                                                                                                                                                                                               |
| **Query String** | Enter the request query string.                                                                                                                                                                                                                  |
| **Body**         | Enter the body content for your API call.                                                                                                                                                                                                        |


:::

# Templates

You can look for watsonx.ai templates in [Make's template gallery](https://www.make.com/en/templates), where you'll find thousands of pre-created scenarios.

# watsonx.ai resources

- [IBM watson.ai API documentation](https://cloud.ibm.com/apidocs/watsonx-ai)

