Documentation

Everything you need to run Benachat

A practical guide to installing the plugin, getting an API key from any supported AI provider, training the bot on your content and shaping the widget exactly the way your brand looks.

1. Requirements

  • WordPress 5.6 or newer, PHP 7.4 or newer.
  • An administrator account on the site (Manage options capability).
  • An API key from any supported provider — see the full step-by-step guides below.

2. Install the plugin

  • Download benachat.zip from the home page.
  • In WordPress go to Plugins → Add New → Upload Plugin and choose the file.
  • Click Install Now, then Activate. An Benachat item appears in the admin sidebar.

The dashboard opens with a 4-step setup guide and a master switch, so you can pause the chatbot on your whole site at any time without deactivating the plugin.

3. How the API key system works

Benachat never stores or proxies your key. You create a key on the provider’s own console, paste it into Benachat → Connection, and every chat request then travels straight from your WordPress server to that provider. Nothing passes through benachat.avapole.com.

  • Key: the secret token that authenticates your site. Stored encrypted-at-rest in your own wp_options table.
  • Model slug: the exact model identifier, for example llama-3.3-70b-versatile. Benachat lists the popular slugs for each provider, and you can type any other slug the provider supports.
  • Endpoint: the URL requests go to. Filled in automatically — only the Custom provider asks you for one.
  • Temperature: 0 keeps answers factual and on-script, 1 makes them creative. Support bots work best at 0.2–0.5.

Nine hosted providers plus any OpenAI-compatible endpoint are supported. Pick a card below and follow the steps.

4. Get an API key — provider by provider

01

Groq

Fastest free option — recommended for most sites

Free tier
  1. 1Open console.groq.com and sign up with Google, GitHub or email. No credit card is asked for.
  2. 2In the left sidebar click “API Keys”.
  3. 3Click “Create API Key”, give it a name such as “Benachat – mysite.com” and submit.
  4. 4The key is shown only once — copy it immediately and paste it into Benachat → Connection.
  5. 5Back in Benachat pick a model (llama-3.3-70b-versatile is the best default) and click Save.
Key format
gsk_… (56 characters, starts with gsk_)
API endpoint
https://api.groq.com/openai/v1/chat/completions
Model slugs available in Benachat
llama-3.3-70b-versatilellama-3.1-8b-instantmixtral-8x7b-32768

Good to know: Free tier limits are per-minute (roughly 30 requests / 6,000 tokens). Enough for a normal support chat widget.

Open console.groq.com/keys
02

Cerebras

Extremely fast inference, generous free tier

Free tier
  1. 1Go to cloud.cerebras.ai and create a free account (email or Google).
  2. 2Confirm the email link, then open the dashboard.
  3. 3Choose “API Keys” from the top-right account menu.
  4. 4Click “Generate API Key”, name it and copy the value.
  5. 5Paste it in Benachat → Connection → Cerebras and pick llama-3.3-70b.
Key format
csk-… (starts with csk-)
API endpoint
https://api.cerebras.ai/v1/chat/completions
Model slugs available in Benachat
llama-3.3-70bllama3.1-8bqwen-3-32b

Good to know: Daily token quota resets every 24 hours. Watch the usage bar in the Cerebras dashboard.

Open cloud.cerebras.ai
03

OpenAI

Highest quality answers, pay-as-you-go

Paid
  1. 1Sign in at platform.openai.com (a ChatGPT account works).
  2. 2Open Settings → Billing and add at least $5 of credit — new keys fail without balance.
  3. 3Go to “API keys” in the left menu and click “Create new secret key”.
  4. 4Set Permissions to “Restricted” and allow only /v1/chat/completions if you want tighter security.
  5. 5Copy the key (shown once) into Benachat → Connection → OpenAI and select gpt-4o-mini for the best price/quality.
Key format
sk-proj-… or sk-…
API endpoint
https://api.openai.com/v1/chat/completions
Model slugs available in Benachat
gpt-4o-minigpt-4ogpt-4.1-minigpt-4.1

Good to know: Set a monthly usage limit under Settings → Limits so a traffic spike can never surprise you.

Open platform.openai.com/api-keys
04

OpenRouter

One key, hundreds of models — including free ones

Free + Paid
  1. 1Sign in at openrouter.ai with Google, GitHub or email.
  2. 2Click your avatar → “Keys” → “Create Key”.
  3. 3Optionally set a credit limit for the key, then create and copy it.
  4. 4Paste it in Benachat → Connection → OpenRouter.
  5. 5Pick a model slug ending in “:free” (for example meta-llama/llama-3.3-70b-instruct:free) to run at no cost.
Key format
sk-or-v1-…
API endpoint
https://openrouter.ai/api/v1/chat/completions
Model slugs available in Benachat
meta-llama/llama-3.3-70b-instruct:freegoogle/gemma-2-9b-it:freedeepseek/deepseek-chat-v3:freeopenai/gpt-4o-mini

Good to know: Model slugs are always vendor/model. Browse the full list at openrouter.ai/models and copy the slug shown under the model title.

Open openrouter.ai/keys
05

Anthropic (Claude)

Excellent at long, policy-heavy knowledge bases

Paid
  1. 1Create an account at console.anthropic.com and verify your phone number.
  2. 2Open Plans & Billing and purchase credit (minimum $5).
  3. 3Go to Settings → API Keys → “Create Key”, choose the default workspace.
  4. 4Copy the key and paste it into Benachat → Connection → Anthropic.
  5. 5Select claude-3-5-haiku-latest for cheap fast replies, or claude-3-5-sonnet-latest for the best writing.
Key format
sk-ant-api03-…
API endpoint
https://api.anthropic.com/v1/messages
Model slugs available in Benachat
claude-3-5-haiku-latestclaude-3-5-sonnet-latest

Good to know: Anthropic uses its own Messages API. Benachat handles that difference for you — no extra configuration needed.

Open console.anthropic.com
06

Google Gemini

Free API key from Google AI Studio

Free tier
  1. 1Open aistudio.google.com and sign in with your Google account.
  2. 2Click “Get API key” in the left sidebar.
  3. 3Choose “Create API key in new project” (or select an existing Google Cloud project).
  4. 4Copy the generated key.
  5. 5In Benachat → Connection → Google Gemini paste the key and choose gemini-2.0-flash.
Key format
AIza… (39 characters)
API endpoint
https://generativelanguage.googleapis.com/v1beta/openai/chat/completions
Model slugs available in Benachat
gemini-2.0-flashgemini-1.5-flashgemini-1.5-pro

Good to know: Benachat uses Google’s OpenAI-compatible endpoint, so the same key works without any Google Cloud setup.

Open aistudio.google.com/app/apikey
07

Mistral AI

European provider with a free experiment tier

Free tier
  1. 1Register at console.mistral.ai and verify your phone number (required for the free tier).
  2. 2Accept the “Experiment” plan on the Billing page — it costs nothing.
  3. 3Open API Keys → “Create new key”, set an optional expiry date.
  4. 4Copy the key into Benachat → Connection → Mistral AI.
  5. 5Select mistral-small-latest or open-mistral-nemo for free usage.
Key format
32-character alphanumeric string (no prefix)
API endpoint
https://api.mistral.ai/v1/chat/completions
Model slugs available in Benachat
mistral-small-latestopen-mistral-nemomistral-large-latest
Open console.mistral.ai/api-keys
08

DeepSeek

Very low cost per million tokens

Paid
  1. 1Sign up at platform.deepseek.com with email or Google.
  2. 2Open “Top up” and add credit (a few dollars lasts a long time).
  3. 3Go to “API keys” → “Create new API key”, name it and copy it.
  4. 4Paste it in Benachat → Connection → DeepSeek.
  5. 5Use deepseek-chat for support answers; deepseek-reasoner only for complex logic questions.
Key format
sk-… (32 hex characters after the prefix)
API endpoint
https://api.deepseek.com/chat/completions
Model slugs available in Benachat
deepseek-chatdeepseek-reasoner
Open platform.deepseek.com/api_keys
09

Together AI

Open models with a free Llama endpoint

Free + Paid
  1. 1Create an account at together.ai — new accounts receive starter credit.
  2. 2Open Settings → API Keys.
  3. 3Copy the default key, or click “Add Key” to create a dedicated one for Benachat.
  4. 4Paste it in Benachat → Connection → Together AI.
  5. 5Choose the model slug ending in “-Free” to stay on the free endpoint.
Key format
64-character hex string (no prefix)
API endpoint
https://api.together.xyz/v1/chat/completions
Model slugs available in Benachat
meta-llama/Llama-3.3-70B-Instruct-Turbo-Freemeta-llama/Llama-3.3-70B-Instruct-Turbo

Good to know: Copy model slugs exactly from together.ai/models — they are case sensitive.

Open api.together.ai/settings/api-keys
10

Custom endpoint

Any OpenAI-compatible server: Ollama, LM Studio, vLLM, Azure, self-hosted

Free + Paid
  1. 1Choose “Custom endpoint” in Benachat → Connection.
  2. 2Paste the full chat completions URL, including /v1/chat/completions.
  3. 3Enter the API key your server expects — use any placeholder text if it needs none.
  4. 4Type the model name exactly as your server reports it (for example llama3.2 for Ollama).
  5. 5Save, then use the built-in test message on the dashboard to confirm the connection.
Key format
Whatever your server requires (often a bearer token you define yourself)
API endpoint
Your own URL, e.g. http://localhost:11434/v1/chat/completions
Model slugs available in Benachat
Any model your endpoint exposes

Good to know: A local endpoint only works if your WordPress server can reach it. Localhost URLs will not work on shared hosting.

5. Which provider should you choose?

  • Just want it working for free: Groq → llama-3.3-70b-versatile.
  • Highest answer quality: OpenAI gpt-4o or Anthropic claude-3-5-sonnet-latest.
  • Lowest cost per answer: DeepSeek deepseek-chat or Gemini gemini-2.0-flash.
  • Want to test many models with one key: OpenRouter.
  • Data must stay on your own hardware: Custom endpoint with Ollama or vLLM.

6. Keeping your key safe

  • Create a separate key per website so you can revoke one without breaking the others.
  • Set a spending or rate limit on the provider console wherever it is offered.
  • Never paste your key into a page, post, theme file or support ticket — it only belongs in Benachat → Connection.
  • If a key leaks, delete it on the provider console and paste a fresh one; the widget recovers instantly.

7. Train on your content

The Training tab builds a knowledge base the bot answers from:

  • Import posts, pages or any public post type in one click.
  • Crawl a URL to pull in text from a specific page.
  • Upload TXT, MD, CSV, JSON, HTML or XML files.
  • Add free text or FAQ entries manually for policies, pricing and support answers.

Every entry is listed in the knowledge base table where you can preview or delete it, or clear everything and start again.

8. Style the widget

  • Pick a launcher icon from the icon library and set a launcher label (leave empty for icon-only).
  • Set bot name, welcome message, quick replies and an avatar image.
  • Choose primary, gradient, panel, bubble and text colours, plus light or dark theme.
  • Control corner radius, side and bottom spacing, position (left or right) and auto-open delay.
  • Toggle the “Powered by Benachat” branding on or off — the live preview and your site update together.

9. Choose where it appears

  • Everywhere, only on selected pages, or everywhere except selected pages.
  • Hide on mobile devices, or show to logged-in users only.
  • Embed the chat inside any page content with the [benachat] shortcode.

Troubleshooting

  • 401 / invalid API key: the key was copied with a space or has been revoked — create a new one.
  • 429 rate limit: you hit the provider’s free-tier limit; wait a minute or switch to a smaller model.
  • 402 / insufficient balance: paid providers (OpenAI, Anthropic, DeepSeek) need credit on the account.
  • 404 model not found: the model slug is wrong or retired — copy it again from the provider’s model list.
  • Widget not visible: check the master switch is on, an API key is saved, and display rules include the current page.
  • Bot says it does not know: add more knowledge base entries — it answers from your content first.
  • Nothing changes after saving: clear your caching plugin and CDN cache once.