In 2027 it is ordinary for a company website or online store to include an AI feature: a chat assistant that answers customer questions, a tool that drafts product descriptions, or smarter search across your content. Yet many people get AI hosting in 2027 wrong from the start by assuming the site needs a huge server. In most cases the "thinking" does not happen on your server at all; it happens on the model provider's servers, which you reach through an API. This guide explains what your site really consumes, when shared hosting is enough and when you need a VPS or a dedicated server, and how to protect your API keys and keep costs under control.

Where does the AI actually run?

There are two very different patterns, with very different hosting needs:

  • Calling a model through an API: your site sends text to an external provider and receives the answer. Your server is a middleman: it takes the visitor's request, adds your instructions and context, forwards it, and returns the reply. The CPU and memory load on your side is relatively light.
  • Running the model on your own server: the model itself lives in your server's memory and runs on its processor. The maths changes completely, and we cover it in our guide to running open-source AI models on a VPS.

The rest of this article is about the first pattern, which is what most business websites and apps use.

What resources does an API-powered AI site need?

The real pressure comes not from computation but from how long each request lasts. A normal page is built in a fraction of a second; a language model's answer can take several seconds, especially when it is long or streamed word by word. For those seconds a connection and a process stay busy on your server. Watch these points:

  • Concurrent processes: ten visitors chatting with the assistant at once means ten open processes waiting for answers. Shared hosting limits the number of processes per account; on a VPS you set the number of PHP-FPM or Node.js workers yourself.
  • Timeouts: settings such as PHP's max_execution_time and Nginx proxy timeouts can cut a long answer off before it finishes.
  • Background jobs: bulk work, such as writing descriptions for a thousand products, belongs in a job queue outside the visitor's request. That usually needs a process running permanently, which is easier on a VPS.
  • A database for context: if the assistant answers from your own content (often called RAG), you need to store text chunks and their numeric representations (embeddings) and search them, which takes memory and disk in proportion to your content.

Shared hosting, VPS or dedicated server?

Hosting typeGood forNot good for
Shared hostingAn occasional, simple feature, such as a WordPress plugin that drafts a summary or suggests headlines when an editor asksA chat assistant open to all visitors, always-running processes, or job queues
Linux VPSNode.js, Python or Laravel apps that call an API, chat assistants, job queues, and databases for semantic searchRunning large models that need a GPU
Dedicated serverHigh-usage platforms, very large databases, or when you need full isolation and fixed resourcesA project still being tested; start on a VPS and measure first

One point about shared hosting: EngHosting's acceptable use policy lists "chat scripts" among prohibited content and forbids abusing server resources. If you are thinking of running a chat assistant from a shared hosting account, ask support about your specific case first. The same policy says that when usage exceeds a plan's resources, the customer is asked to upgrade to a VPS or a dedicated server.

For most new projects an entry-level Linux VPS is a sensible start. Linux VPS 2, for example, gives you 4 GB of RAM, two CPU cores and NVMe storage, which is enough for a web app that calls an API and keeps a small database. Add resources when monitoring shows you need them, not before. Dedicated servers make sense once usage has really grown and you want fixed, unshared resources.

Protecting API keys: the most important item on the list

An API key is effectively a payment card linked to your account with the model provider. Whoever holds it can spend your balance. These rules are not optional:

  1. Never put the key in front-end code: any key inside JavaScript that runs in the browser, or inside a mobile app, can be extracted. Every request must go through your server.
  2. Keep it in environment variables or a config file outside the public web folder, such as a .env file outside public_html, and never commit it to Git. Add the file to .gitignore on day one.
  3. Use a separate key per environment and per project: one for development and one for production, so you can revoke one without stopping everything.
  4. Turn on spending limits and alerts in the provider's dashboard, where available.
  5. Rotate the key immediately if it appears in a log, a screenshot or a message, or when someone who has seen it leaves the team.
  6. Protect the provider account itself with two-factor authentication; a hijacked account is worse than a leaked key.

Application security and server security go together. Work through our website security checklist, because an attacker who reaches your site's files will reach the key too.

Controlling cost before the bill surprises you

Most language model APIs charge by the number of tokens in the request and in the response, and output tokens usually cost more than input. Your hosting bill is fixed; your API bill moves with usage and can climb fast if someone abuses the assistant or a bot hammers it. Practical steps:

  • Cap response length with a maximum-tokens setting on every request.
  • Trim the context: do not send the whole chat history or entire pages every time; send only the parts relevant to the question.
  • Match the model to the task: classification and short summaries rarely need the largest, most expensive model.
  • Cache repeated answers: questions like opening hours or shipping options do not need a model call every time.
  • Rate-limit per user or IP address, and require sign-in or verification before heavy use.
  • Log usage per feature and per day so you know which feature costs the most.

Privacy and customer data

Everything a visitor types is sent to the model provider. Read the provider's terms on data retention and use, and do not send sensitive data the answer does not need, such as phone numbers or payment details. Egypt has a Personal Data Protection Law (Law No. 151 of 2020); if your site processes personal data, get legal advice on your obligations. If the nature of the data means it must not leave your server, running a small model locally may be the answer, provided its quality is good enough for the task.

Pre-launch checklist for an AI feature

  • The key lives only on the server, outside the public folder and outside Git.
  • Spending limits and alerts are on at the provider.
  • Per-user request limits and a cap on response length are in place.
  • Server timeouts are set to allow for long answers.
  • Bulk jobs run in a queue, not inside the visitor's request.
  • Users see a clear message, not an error page, if the provider is slow or down.
  • Your hosting type permits the kind of application you are running under the acceptable use policy.

Quick questions

Do I need a GPU for a site that uses ChatGPT or a similar model through an API?

No. You only need a GPU if you run a large model on your own server. With an API, the model runs on the provider's hardware.

Is a small Linux VPS enough for a chat assistant?

Usually, at the start, yes, because most of the load is waiting for answers rather than computing. Watch concurrent processes and memory use, and upgrade when the numbers say so.

Should I rely on a single provider?

You can, but keep the model call in one place in your code so it is easy to switch, because prices and models change constantly.

Need help choosing the right plan?

Message EngHosting with your website type, expected traffic and budget, and the team will recommend a suitable option.

Ask on WhatsApp