# How To Connect Artificial Intelligence (A.I) With Wasapmatic

{% hint style="danger" %}
**READ THIS:** This Artificial Intelligence (A.I) feature is only available in **Advance Plan** and **Lifetime Plan** only. Please check [pricing ](https://wasapmatic.com/)[plan](https://wasapmatic.com/) in our website for more info.&#x20;
{% endhint %}

Before using the A.I feature, you need to have the API keys from the A.I providers. In **Wasapmatic**, you can choose up to 5 A.I providers which is:

* **OpenAi**
* **Claude Ai**
* **Gemini Ai**
* **Deepseek Ai**
* **Grok Ai**

You have the flexibility to choose from these 5 AI options, each offering different pricing plans and features. For more info about these 5 AI providers, you need to check each provider's website.

To add the API keys, go to the **Artificial Intelligence** section and click the API Keys menu.&#x20;

<figure><img src="/files/H6D1bTS5MOvTuB3f7yQR" alt=""><figcaption></figcaption></figure>

Then, click the **ADD API KEY** to add a new A.I API key

<figure><img src="/files/NPtelQHCoHsYU3cMiAqt" alt=""><figcaption></figcaption></figure>

Then, you will see a popup form like this:

<figure><img src="/files/3rBMOVToX9cea50oIo3w" alt=""><figcaption></figcaption></figure>

Fill in all the required fields;

* **Name:** Create a name for your API Key. This is for your reference for the campaign that you will use.
* **Provider:** Choose A.I provider that you want to use. (OpenAI, Gemini AI, Claude AI, Deepseek AI, or Grok AI).
* **Initial Prompt:** Create an initial prompt for your AI. This is the main instruction for your AI.
* **Post Prompt:** Create the post prompt for your AI. This is specific and detailed instruction to your AI.
* **Group Reply:** Enable this if you want the AI am to respond to all messages in all of your WhatsApp groups.&#x20;
* **Vision:** Enable this if you want the AI to capture and understand the image received in chat. This feature works depending on the AI model that you use.&#x20;
* **Transcription:** Enable this if you want AI to transcribe the audio/video file received. This feature is only available with OpenAI.
* **Model:** Choose a model for your AI Provider. Each model has pros and cons. Each model also has a different pricing structure. Choose wisely based on your needs.&#x20;
* **Max Token**: Enter the value of the maximum token that an AI is allowed to use. You can think of tokens as pieces of words, where 1,000 tokens are about 750 words.
* **History Threshold:** Set the limit for how many past interactions the AI retains to help manage processing time and context understanding. The recommended value is 50.
* **API Key:** The most important part. Fill this section with the API key that you got from the AI provider.

**Example of Initial Prompt:**

<mark style="background-color:yellow;">**These are the instructions the AI should follow before starting the conversation.**</mark>

<figure><img src="/files/JcdBxAHhG6acTui2Hd6L" alt="" width="563"><figcaption></figcaption></figure>

**Example of Post Prompt:**

<mark style="background-color:yellow;">**These are the instructions to ensure the AI response remain strictly aligned (focus) with the specified context or topic. To maintain a consistent and focused dialogue**</mark>

<figure><img src="/files/r8sE0XgAcCFeczpYkmeG" alt="" width="563"><figcaption></figcaption></figure>

Link:

* [How to get OpenAI API Key](/whatsapp-artificial-intelligence-a.i/how-to-get-openai-api-key.md)
* [How to get Claude AI API Key](/whatsapp-artificial-intelligence-a.i/how-to-get-claude-ai-api-key.md)
* [How to get Gemini AI API Key](/whatsapp-artificial-intelligence-a.i/how-to-get-gemini-ai-api-key.md)
* [How to get Deepseek AI API Key](/whatsapp-artificial-intelligence-a.i/how-to-get-deepseek-ai-api-key.md)
* [How to get Grok AI API Key](/whatsapp-artificial-intelligence-a.i/how-to-get-grok-ai-api-key.md)

After you fill in all the information, then click the submit button to complete.&#x20;

{% hint style="warning" %}
You can create several API options by using the same API Key from the same provider. You can differentiate it by using different prompts for each API. Depends on your task.&#x20;
{% endhint %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://help.wasapmatic.com/whatsapp-artificial-intelligence-a.i/how-to-connect-artificial-intelligence-a.i-with-wasapmatic.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
