01Services02AI03Sectors04Servers05AI API06Contact
Discuss your project

Or on WhatsApp: +216 54 166 821

Guide

Running an AI model: on your VPS or through an API?

Ollama lets you install a model like Qwen or Llama on your own server. It is tempting, but a VPS without a graphics card does not have the strengths of an API. Here is how to choose.

By , senior full-stack developer, XAB Solutions · Updated November 3, 2026

In short

An AI model installed on a VPS without a graphics card, with Ollama for example, only runs small models, slowly, and takes the memory and processor of your application. An API like XAB AI gives access to much larger, faster models with no load on your server, paid per token in dinars. The most common setup is to host the application on a VPS and call the AI through an API.

What can a VPS without a graphics card do?

Without a graphics card the model runs on the processor and in memory.

  • A compressed 7 to 8 billion parameter model needs about 5 to 6 GB of memory
  • It answers slowly, a few words per second, and one request at a time keeps the server busy
  • Large models (30 billion and more) do not fit in a common VPS

On a 12 GB VPS that also runs your site and database, little room is left.

When is the API the better choice?

As soon as you want quality, speed or several users at once.

  • Access to much larger models (Qwen3 235B, DeepSeek, Claude, GPT-5)
  • Fast streamed answers, several requests in parallel
  • No memory or processor taken on your server
  • You pay only for what you use

A question about your case? We answer on WhatsApp, with no commitment.

Request a quote

When to keep a model on your server?

For small, regular tasks, tests, or when data must never leave your server.

Then take enough memory (24 GB with XAB Business) and a small specialized model, and keep the API for heavy tasks.

The most common combination

The application runs on a managed VPS and the AI is called through an API. Your code stays the same: with an OpenAI-compatible API, moving from Ollama to XAB AI means changing the address and the key.

Every XAB Cloud Pro or Business server includes 5 TND of free XAB AI credit to test.

Frequently asked questions

Your other questions.

Can I install ChatGPT on my own server?

No, ChatGPT models cannot be installed. You can install open models like Qwen, Llama, Mistral or GPT-OSS with Ollama, but a VPS without a graphics card runs them slowly.

How much memory does Ollama need on a VPS?

About 5 to 6 GB for a compressed 7 to 8 billion parameter model, on top of what your application and database need.

Can I move from Ollama to an API without changing my code?

Yes, if your app uses Ollama's OpenAI-compatible API (/v1/chat/completions). XAB AI also accepts common Ollama names like qwen2.5:7b.

Does XAB Solutions offer servers with a graphics card?

Not for now. We offer managed VPS and the XAB AI API for models.

A project, an idea, a problem with your website?

Describe it in a few lines. You receive a clear quote within 24 hours.