Configuring ChatGPT in Merlin Backoffice ® Flex
The aim of this article is to explain to everyone, whether or not they already use ChatGPT and its API, how to create an OpenAI account and obtain a secret key, then how to correctly configure Merlin Backoffice ® Flex so that it is able to dialogue with the robot in an optimized way.
Access to ChatGPT in the Merlin Backoffice ® Flex module for PrestaShop
The ChatGPT dialogue interface has been integrated into MagicEdit, a widely used tool that is undoubtedly one of your favourites. There are several reasons for this choice:
- A tool that many are already familiar with, making it easy to learn.
- Memorisation for reuse of settings by column.
- Preview function and undo option.
- Quick and easy to use. No programming skills or technical knowledge required.
- Can now be automated before import to modify the contents of CSV or Excel files automatically.
Open MagicEdit:
- In any table, whether it be products, categories, translations, images (captions), or even the one displaying the contents of a file before import, select the rows to be modified and then right-click in the column to be filled in.
- Click to launch MagicEdit, either limited to the selected rows or applying to all rows displayed.

Expand the Artificial Intelligence block:
MagicEdit consists of a series of blocks. Each block represents a feature, such as ‘Search/Replace,’ ‘Add Text,’ etc.
The AI block is at the very bottom:
Obtain an API key
Regardless of which AI engine you wish to use (ChatGPT, Mistral, Gemini, Perplexity, etc.), you must request an API key.
OpenAI AI key for ChatGPT
It couldn't be simpler: go to the OpenAI Platform website and click on the Log in button at the top right.
Be careful not to confuse the ChatGPT website with the API website, OpenAI Platform.
You can then create a new account using an email address and password, or using your Google account.

Request an API key for ChatGPT
Once you have created your account and logged in, you need to request a secret key, or API key. To do this:
- Click on your account name in the top right corner.
- Then, in the menu that opens, click on ‘View API keys’.
- Or click directly on ‘API Keys’ in the menu on the left side of the page.
- Once you are on the key administration page, click on ‘Create new secret key’.

Copy the key value and keep it safe (it cannot be retrieved again, it is permanently hidden).
Purchase credits to use the OpenAI API
Yes, requesting a key is free. However, using it is subject to a pay-as-you-go charge (based on tokens).
In order to interact with the API, you must also purchase at least a few pounds worth of credits from OpenAI.
Credits (minimum €5) can be purchased from the same page on the OpenAI platform.
NOTE: a ChatGTP Pro subscription is not required and serves no purpose. It is not related to the use of the API.
API keys from other providers
You are free to use a provider other than OpenAI, provided you choose one that offers one or more APIs that are 100% compatible with the OpenAI API.
Many claim to be compatible, but this compatibility is often only partial. It may be complete one day and no longer the next, as OpenAI's API is constantly and rapidly evolving.
However, to date, we have successfully tested the compatibility of Mistral AI, a 100% French solution that deserves to be better known (Le chat), and to a lesser extent, Google's Gemini solution. We have not tested Microsoft's Perplexity API.
Billing models may vary. For example, with Mistral AI, the key is also free and you do not need to purchase credits in advance. However, you must provide a payment method and you are billed retrospectively according to your consumption.
The Gemini API allows initial use free of charge.
Enter at least one key in MagicEdit
The only truly mandatory configuration step is to enter at least one API key from a provider:
- Click on the banner to expand the AI block.
- Fields for entering the API key required to use openAI engines (ChatGTP).
- Fields for entering the API key required to use Mistral AI engines (a credible French competitor).
- Input fields for the API key required to use other compatible engines (e.g. Google Gemini, Microsoft Perplexity, or others). Compatibility not guaranteed.

Choosing the model and end point
Each supplier offers a varied list of models, which is constantly evolving. Each has different characteristics, power, cost, speed and capacity. It is up to you to choose the one that best suits your needs.
Since version 4.0.0 of Merlin Backoffice Flex, the list is automatically updated each time MagicEdit is opened.
- Choose the engine to use from the list provided. Please note that the list is built dynamically and requires one or more valid API keys (obtained by querying the APIs, which consumes usage but does not consume tokens).
- Notice you can manually add a model not listed. Or delete any.
- Depending on the choice of provider and engine, the second list for choosing the endpoint (or engine URL) is updated automatically. Choose an ‘Endpoint’ from the list that suits your needs (they also have different specifications and capabilities, so check with the API provider). The first one in the list is the default recommendation.

AI memory management
Recent AI engines, such as ChatGPT5 and 5.1, have memory, allowing them to continue a previous conversation by accessing its content.
When using AI on several columns in succession, this memory offers many advantages:
- Common instructions can be communicated only once at the beginning, for all columns.
- It can be asked to reuse the results obtained when processing previous columns.
For example, when filling in long descriptions, ask it to extract and memorise the words that are most important for SEO. Then, when filling in meta descriptions, ask it to reuse the memorised keywords for each line if possible. You just need to give it an index in both prompts, such as the product ID, so that it can synchronise the lines correctly.
MagicEdit allows you to enable or disable this storage of conversation content in memory and reset it as you see fit (new prompt unrelated to previous ones):

Length settings and expert settings
These other settings can either be configured once and for all, or adjusted each time you use the software, depending on whether you have many different usage scenarios or not. They are stored in the current MagicEdit configuration, along with all the other settings in the window (except for the limit settings described in the previous chapter):
Response length (1)
Defines the maximum size in ‘tokens’ of the response requested from GPT. A value of 1000 tokens gives approximately 700 words.
500 tokens is a value that requires a short response and therefore consumes less credit.
Depending on your budget and the target field (e.g. long description), you can significantly increase this parameter.
Remember that you can also specify the desired response length in the prompt itself, even though ChatGPT tends to give longer responses than requested.
Note: in the free version, the maximum number of tokens for a discussion is 4096, but this includes questions (your instructions and prompts, bearing in mind that prompts 2 to 4 themselves contain the previous prompts and responses, so the number quickly adds up).
So if you choose a value of 3000 for the response, this limits you to 1096 tokens for the entire instruction and prompts.
This means that in the free version, you will often have to settle for a single prompt (see the following tutorial, which explains this concept).
Temperature (3)
The sampling temperature, between 0 and 1, defines how random the response provided is.
Higher values such as 0.8 will make the output more random, while lower values such as 0.2 will make it more targeted and deterministic.
The API help indicates that if set to 0, the model will use logarithmic probability to automatically increase the temperature until certain thresholds are reached.
With the maximum value of 1, you are almost certain to always get a different answer each time the same question is asked to ChatGPT.
Reasoning effort (7)
Controls the depth of the model's thinking. The quality of the response, as well as the processing time and cost, increase with the complexity of the thinking required.
For other parameters, please refer to the API documentation.
Please note that most of these parameters are not compatible with all providers, or even with all engines. Disable those that generate failures depending on the engine used.
- Length of the response.
- Top_p
- Temperature
- Presence penalty
- Frequency penalty
- Seed (random)
- Reasoning effort

The configuration is now complete. All that remains is to learn how to interact with the AI. To do so, proceed to the second tutorial in this section.
OBSOLETE: Configuring ChatGPT limits
SINCE VERSION 4.0.0 of Merlin Backoffice Flex, it is no longer necessary to configure limits. This chapter is kept here only for those who have not yet updated the application.
Whether you have a free OpenAI account for ChatGPT 3.5 or a paid account giving access to GPT-4, usage is restricted by certain limits that you should be aware of.
This concerns the number of interactions per minute and per day, the volume of words exchanged per question and per day, etc.
These limits have a generic value that you can find in the official API documentation and on your OpenAI account, but it is possible to purchase additional rights from OpenAI.
Merlin Backoffice automatically manages your rights in exchanges with ChatGPT, so that you never exceed any of the limits. For example, if you are allowed 3 requests per minute and you have just sent 3 in 20 seconds, it will wait 40 seconds before sending the fourth on its list.
To do this, it needs to know the limits associated with your account. By default, it is configured with the standard values for ChatGPT 3.5 in the free version . You can modify them if they do not correspond to your account. The help bubbles in the configuration fields assist you by also indicating the standard values for ChatGPT4. As this data is subject to change, please consult the official source: https://platform.openai.com/docs/guides/rate-limits/overview
These values are then stored in Merlin Backoffice Flex, but are not specific to each MagicEdit configuration. These settings therefore only need to be made once when first used, and not each time.
Throughput limit
This is the maximum number of requests per minute allowed by ChatGTP.
For MagicEdit, this corresponds to the maximum number of prompts it must process per unit of time.
The limit therefore forces it to slow down so as not to generate processing refusals by the robot.
In the free version, the default value is only 3 requests per minute.
In the paid version, the limit is 60 requests per minute for the first 48 hours, then 3,500 requests per minute, which is more than enough given the engine's response speed.
Note that with GPT4 there is also an additional limit, which is currently 50 requests every 3 hours.
Set to 0 or leave blank to set no limit.
Additional throughput limit
This is a second limit on the maximum number of requests set when GTP-4 was launched. It is currently set at 50 requests per 3-hour period (180 minutes).
Does not apply to GPT-3. If you are not using GTP-4, enter 0 in this field or leave it blank so that this limit is not imposed on Merlin Backoffice Flex.
Daily limit
This is the maximum number of requests per day allowed by ChatGTP.
For MagicEdit, this corresponds to the maximum number of prompts it must process per calendar day. The counter is reset at midnight.
The limit therefore forces it to slow down so as not to generate processing refusals by the robot.
In the free version, the default value is only 200 requests per day.
In the paid version, the limit is 2,000 exchanges per minute for the first 48 hours, then unlimited.
Set to 0 or leave blank to set no limit.
Size limit
This is the maximum number of tokens per day allowed by ChatGTP.
As a reminder, a value of 1000 tokens gives approximately 700 words.
For MagicEdit, this corresponds to the maximum number of tokens it must process per day.
The limit therefore forces it to slow down so as not to generate a processing refusal by the robot.
In the free version, the default value is only 40,000 tokens per day.
In the paid version, the limit is 120,000 tokens per day for the first 48 hours, then 180,000.
Set to 0 or leave blank to not set a limit.
- Rate limit
- Additional rate limit
- Daily limit
- Size limit

Category's other articles ChatGPT and PrestaShop
-
Using ChatGPT in Merlin Backoffice Flex for PrestaShop
Tuto
ChatGPT tutorial for PrestaShop mass product catalog management with Merlin Backoffice Flex
-
How to write a prompt
Guide
Tips and tricks for writing efficient prompts in Merlin Backoffice for PrestaShop
-
Optimisation SEO H2 des fiches produit avec Tchat GPT