R Rafina Panel guide
Guides / Communication

Artificial Intelligence

From this page, the theme's three smart sections connect to an AI service: answering shoppers' questions on the site, generating images for products and banners, and writing product descriptions and articles. Each section has its own service, key, and spending cap.

Where is it? Rafina Panel → Artificial Intelligence

AI page with remaining credit, master switch, and the three smart sections
Overview. The remaining credit of the service account is shown at the top of the page (if the service provides it).

Setup

  1. Create an account on the AI service's website, buy credit, and get an API key. The "Get API key" link inside each section takes you to that site.
  2. Turn on "AI enabled".
  3. Click one of the smart sections, turn on "This section enabled", choose the service, and enter the key.
  4. Click "Save and test connection"; the message "Connection successful." means it is ready.
  5. Set the daily cap and click "Save settings".
NoteAvalAI is an Iranian service; it needs no sanctions workaround and gives access to every company's models with a single key. For a server inside Iran, it is the simplest choice.

Master switch

OptionWhat it does
AI enabledWhen off, none of the smart sections work.

An "On" or "Off" label appears next to each section's name. Only one section is open at a time.

Connection for each section

These fields exist in all three sections, and each section can use a different service:

OptionWhat it does
This section enabledTurns just this section on or off. Without an API key, the section does nothing on the site.
AI serviceOpenAI (ChatGPT), Anthropic (Claude), Google Gemini, DeepSeek, xAI (Grok), AvalAI (Iranian), or GapGPT (Iranian). GapGPT works for both chat and text writing as well as image generation; get its key from that service's panel. In the "Image generation" section, the dropdown lists only services that generate images: OpenAI (ChatGPT), Google Gemini, xAI (Grok), AvalAI, and GapGPT.
API keyThe key for that service. It is hidden after saving; leaving it empty means unchanged. To clear it, leave it empty and save. The key stays only on your server and is never sent to the visitor's browser.
ModelModel name. Leave empty to use that service's default model.
Service address (optional)Only if you use a proxy or an internal service; it must start with https:// .
Save and test connectionSaves the settings and tests the connection. For "Image generation" the test is free and does not generate an image.
NoteOnly the site administrator can change the service, model, and address. Changing the service address without entering a new key clears the previous key so it is not sent to another host.

Answering users on the site

Answering users on the site section with service settings, internet search, and message cap
The "Answering users on the site" section.

A chat bubble sits in the corner of every page of the site and answers shoppers using the store's own data (products with price and stock, payment and shipping methods, categories, and so on). Color, button position, assistant name, welcome message, and ready-made questions are set in Site content → Smart assistant .

OptionWhat it does
Allow internet searchIf the answer is not in the store's data, it searches on its own. It is slower and more expensive (about ten seconds versus one second); price and stock are still read only from the store.
Let logged-out users ask tooNot recommended: every message costs money, and no exact cap can be set for an anonymous visitor.
Daily message cap per userZero means no cap, meaning the service cost is left to the user.
Number of products in store dataHow many products (best sellers first) are given to the AI. A larger number means more accurate answers and higher cost.
Chat memory lengthHow many recent messages are given to the AI so it does not lose the thread of the conversation.

Image generation

Image generation section with fixed style, quality, and daily cap
The "Image generation" section.

Turns a text description into an image. The "Generate with AI" button appears next to the product image and gallery on the product page, and next to most image fields in the panel and page builder (banners, slider, login page, and so on). The image is generated at the exact size of that slot, and you can also provide an existing image as a base.

OptionWhat it does
Fixed image styleAdded in front of every description so the store's images stay in one family. Without it, each image gets its own style.
Quality"Low — cheap and fast", "Medium", or "High — more expensive and slower".
Generation cap per 24 hoursZero means no cap. Every image costs money.

Writing Text

Writes product descriptions, short descriptions, and articles. Its button appears above the description box on the product page and the post page.

Text writing section opened with service, key, writing style, and daily cap
The "Text writing" section.
OptionWhat it does
Writing styleHere you say "how to write", not "what to write". You provide the topic of each text every time.
Default number of paragraphsThe initial number; it can be changed each time.
Daily text capZero means no cap.

Frequently Asked Questions

"Connection failed."

Check the key and the account credit. Foreign services may not be reachable from a server inside Iran; in that case choose AvalAI.

I see the message "Credit is running low".

When the credit runs out, the smart sections stop working. Top up the service account.