Direct access from Russia — no VPN·USDT / USDC in 5 minutes·Original models, no downgrade

AI assistant and chatbot for a website: how to build one and what it costs

An AI assistant for your business answers website visitors around the clock — about prices, delivery, lead times and terms — from your knowledge base rather than “off the top of its head”. If the answer is not in the base, it suggests contacting a manager. Such a bot has three parts: a language model, a knowledge base and a chat window on the website or in Telegram. Ready-made builders provide the chat window and the knowledge base, and the model is paid for as you use it. RuAPI takes care of the model: one key opens GPT, Claude, DeepSeek and Gemini with no VPN. Pay in USDT and only for the tokens you use — no foreign card needed.

no VPN answers from your knowledge base GPT, Claude, DeepSeek pay in USDT

Updated:

from openai import OpenAI

client = OpenAI(base_url="https://www.ruapi.ai/v1", api_key="sk-...")

# data from your knowledge base
knowledge = """Delivery — 1–2 days, 300 ₽, free from 5,000 ₽.
Returns — within 14 days if the item has not been used."""

resp = client.chat.completions.create(
    model="claude-haiku-5-5",
    messages=[
        {"role": "system", "content": "You are a consultant for an online store. "
            "Answer briefly and only from the data below. If there is no answer, "
            "suggest contacting a manager.\n\n" + knowledge},
        {"role": "user", "content": "How much is delivery, and can I return an item?"},
    ],
)
print(resp.choices[0].message.content)

The core of an AI assistant: the system message holds the answering rules and data from the knowledge base, the user message holds the visitor’s question, and the model is told to answer only from that data. In a real bot the builder or your code fills in the matching pieces of the base. Before running, install the openai package (pip install openai) and replace sk-… with your RuAPI key.

What an AI assistant for a website is made of

The model answers, the knowledge base supplies the facts.

The model itself does not know your prices and terms. Before each answer the bot finds the matching pieces in the knowledge base — the price list, the FAQ, delivery rules — and passes them to the model together with the question. This technique is called RAG. So the quality of the answers depends not only on the model but also on how complete and up to date the base is.

The chat window lives on the website, in Telegram or in both.

A visitor writes in a widget on the website or to a Telegram bot, and then the question goes through the same chain: search the base → request to the model → answer. Dify and Flowise, for example, have a ready-made widget for embedding; you can also write your own: the page sends the question to your server, and the server sends the request to the model API.

Every visitor message is a paid request.

A bot on a website answers everyone, including spammers and people trying to coax its instructions out of it. Anything in the instructions and the knowledge base can end up retold to a visitor — so do not put purchase prices, internal discounts or personal data there. Keep the model key on the server only, give it a budget and limit the number of messages from one IP address — then even if someone attacks the bot, spending will not go over the amount you set.

# how to start

How to build an AI assistant for a website: 5 steps

  1. Build the knowledge base

    • Gather what people ask about most: the price list, delivery and return terms, opening hours, answers to typical questions from email and chats.
    • Write briefly, one document per topic. Outdated prices in the base are a common cause of wrong answers.
    • Spell out in the instructions what the bot must not do: promise discounts, name lead times that are not in the base, discuss unrelated topics.
  2. Choose what to build the bot with

    • Dify is a platform where a chatbot with a knowledge base is built visually, without code, and published as a web chat or a widget. How to connect RuAPI models to it: www.ruapi.ai/dify-v-rossii.
    • Flowise gives you a flow built from blocks and widget code to paste into your site: www.ruapi.ai/flowise-v-rossii.
    • n8n is for when the bot also has to create leads in a CRM, write to a spreadsheet or call a manager in Telegram: www.ruapi.ai/n8n-v-rossii.
    • To install Dify, Flowise or n8n on your own server you need someone familiar with Docker; after that the bot is configured visually.
    • Your own code gives full control over the knowledge-base search and the interface. Start from the example above and docs.ruapi.ai/en/quickstart.
    • There are also ready-made cloud services with AI bots, but there the model and the price are set by the service’s plan, and the conversations are stored on its side.
  3. Sign up for RuAPI and create a key with a budget

    Create an account at www.ruapi.ai with email, Google, Yandex or Telegram. Right after sign-up the account usually gets $0.05 for the deepseek-flash, claude-haiku-5-5 and gpt-6-luna models: enough for a few dozen test questions if you put the base straight into the instructions, as in the example above. Embeddings and the other models unlock after a top-up of 5 USDT or more.

    Make a separate key for the bot: Console → “API Keys” → “Create API key”. In the “Credit limit” block turn off “Unlimited” and enter an amount — for example, what you are ready to spend in a month. The limit does not renew by itself: once it runs out, the key stops working and the bot goes silent, while the rest of your balance stays untouched. Watch spending in the usage logs and raise the limit in time.

    RuAPI Console, “API Keys” section: the “Create API key” button for a website AI assistantRuAPI Console, “API Keys” section: the “Create API key” button for a website AI assistant
  4. Connect the model

    • In the builder, connect the model as OpenAI-compatible: in Dify, the OpenAI-API-compatible plugin; in Flowise, the OpenAI Custom Model node; in n8n, the OpenAI credential (in the OpenAI Chat Model node turn off Use Responses API, otherwise Claude and DeepSeek return a 400 error). The address is https://www.ruapi.ai/v1, always with /v1 at the end (the Console shows the address without /v1), the key is your RuAPI key, and the model is, for example, claude-haiku-5-5 or gpt-6-luna.
    • Searching the knowledge base also needs an embedding model — it turns the texts of the base into vectors for search: text-embedding-3-small works through RuAPI with the same key but unlocks after the first top-up. If the base is small — a few pages — you can put all of it into the instructions, as in the example above, and do without embeddings.
    • In the instructions (the system prompt) set the tone, the answer language and the rule: “if the answer is not in the data, say so honestly and give the manager’s contact”.
  5. Test and launch

    • Ask the bot 20–30 real customer questions, including awkward ones: about discounts, competitors, lead times that are not in the base.
    • Make sure the bot admits when it does not know and gives the manager’s contact instead of making things up.
    • Limit how often and how long one visitor can write: in Flowise a chatflow has a request rate limit for this; if your builder has no such setting, the key’s budget remains the main protection. Keep the key on the server only, not in the page code.
    • In the RuAPI Console usage logs, check how much one answer costs and multiply by the number of visitor messages you expect per month.

A ready-made service, a builder or your own code

A ready-made service

quick start without your own server

model and price follow the service’s plan

conversations are stored by the service

A builder on your own server

Dify, Flowise — knowledge base and widget

n8n — leads, CRM, notifications

models via RuAPI on one key

Your own code

OpenAI SDK + knowledge-base search

any interface and logic

base_url: https://www.ruapi.ai/v1

What an AI assistant costs: model prices

Prices in the table are in US dollars per 1M tokens, as on the RuAPI pricing page; only the tokens you use are deducted. The price on your account may turn out lower.

modelinput $/Moutput $/M
claude-haiku-5-5
$0.12
cache read $0.0120
>100K: $0.60
$0.60
>100K: $3.00
gpt-6-luna
$0.12
cache read $0.0120
>272K: $0.24
$0.60
>272K: $0.90
deepseek-flash
$0.17
cache read $0.0120
$1.44
qwen3.8-flash
$0.14
cache read $0.0288
$0.49
claude-sonnet-5-5
$2.40
cache read $0.12
$12.00
gpt-6.1-sol
$2.40
cache read $0.12
>272K: $4.80
$12.00
>272K: $18.00

An example at prices as of 22 Nov 2026: a conversation has 5 visitor questions, and each answer takes about 2,500 input tokens (instructions, the pieces of the base that were found, history) and 200 tokens of reply — 12,500 input and 1,000 output tokens per conversation. By our estimate, 1,000 such conversations cost about $2.1 on claude-haiku-5-5 or gpt-6-luna, about $3.5 on deepseek-flash and about $42 on claude-sonnet-5-5, not counting the cache. Models that reason before answering spend more output tokens: deepseek-flash reasons by default, so its real cost can be noticeably higher than the estimate — check it in the log on your own questions. An inexpensive model is usually enough; a stronger one is worth it if the bot gets confused by long terms or has to call tools.

The grey “>100K” row is the vendor’s long-prompt rate: if the prompt is over the threshold, the whole request is billed at that rate.

All models and prices →

# faq

Frequently asked questions

An ordinary chatbot follows a pre-written script: buttons and canned answers. An AI assistant understands a question asked in any words and answers in its own words, but relies on your knowledge base. It copes with questions that are not in the script, and difficult cases can be set up to go to a human.

Get a key and launch an AI assistant on your website

Create account