gpuosBeta

Getting started · 3 min read · updated Oct 9, 2026

How to self-host an OpenAI-compatible API on your own GPU

Run open LLMs with Ollama on your GPU and share them through the hosted gpuos API with team keys, optional token quotas and usage metering.

On this page

Why self-host an OpenAI-compatible API

gpuos supports OpenAI-compatible chat completions, completions and embeddings, including streaming. For those operations, configure your client with the gpuos base URL, a workspace API key and a deployed model id. Check model-specific capabilities before changing an application.

Ollama runs inference on the GPU machine you connect. Your app's prompts and the model's outputs pass through the hosted gpuos gateway, which checks keys and records usage. You control the inference hardware and model deployment, while gpuos remains part of the request data flow.

Three ways to do it

Scroll horizontally to see every column.

ApproachWhat you getWhat you still build
Ollama or vLLM on a public portAn OpenAI-compatible endpoint on one machineTLS, authentication, per-user keys, quotas, metering, firewall rules
A gateway like LiteLLM in frontKeys and routingGPU nodes, model deployment, VRAM planning, the engine itself
gpuosAgent, model deployment, gateway, keys, quotas, meteringYour machine, drivers, model license review and workload validation

Exposing Ollama directly is fine for a single developer. It has no notion of users or keys, so as soon as a team or an application depends on it you end up rebuilding a gateway.

Step by step with gpuos

  1. Create a free workspace. The Community plan covers one node with one GPU.
  2. In Nodes, click Add node and run the install command on your GPU machine. It installs Ollama and the gpuos-agent service; the agent only makes outbound HTTPS connections.
  3. In Models, deploy a model such as Qwen3 8B. The VRAM gauge estimates short-context memory use; test the context length and concurrency your app needs.
  4. In API keys, create a key, optionally with a monthly token quota and a requests-per-minute limit.
  5. Call the supported chat completions, completions or embeddings endpoints at https://gpuos.si/v1 with your OpenAI client.
First request
curl https://gpuos.si/v1/chat/completions \
  -H "Authorization: Bearer $GPUOS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model": "qwen3-8b", "stream": true, "messages": [{"role": "user", "content": "Hello"}]}'

What production use needs

  • One key per app or teammate, so you can revoke one without breaking the others.
  • Optional quotas and rate limits per key: a monthly token quota and a requests-per-minute limit bound API access. They do not guarantee GPU capacity or latency.
  • Metering: prompt and completion tokens, latency and status per key, model and node.
  • OpenAI error format: 401, 403, 404, 429 and 503 errors that SDKs already know how to handle.
  • No inbound port: the agent connects out, so the GPU box stays behind its firewall.

gpuos covers all five. The quickstart lists every error code and its meaning.

Before you make the first request

Start with an NVIDIA GPU visible in nvidia-smi, enough free disk space for the weights, and an available gpuOS workspace. The LLM VRAM calculator compares the catalog estimates with your GPU before a download.

An OpenAI-compatible endpoint implements selected OpenAI API routes; it does not make every hosted OpenAI feature available. Check the model’s supported endpoints and tool-calling behavior before changing an application.

Keep GPUOS_API_KEY in a server-side environment variable. Browser applications should call your backend, which forwards authorized requests to the model.

Check the response and diagnose failures

  • A successful chat request returns content, or streaming chunks, for the catalog model id you selected. Test a short prompt first, then your actual workload.
  • 401: check the key and Authorization header. 404: check the path and deployed model id, which can differ from the Ollama tag.
  • 429: inspect the key’s quota or rate limit. 503: check whether the node is connected and the model has finished loading.
  • An out-of-memory error requires a shorter context, a smaller model or more VRAM; adding API retries cannot solve it.

References: Ollama’s supported OpenAI routes and the gpuOS quickstart.

Questions

Is a self-hosted model as good as GPT-class APIs?
Quality depends on the model and your task. Test your summaries, extraction, RAG answers or code assistance against representative inputs before choosing a model or moving production traffic.
What hardware do I need?
Choose a model whose short-context memory estimate suits your GPU, then validate your intended context length and concurrency. See the VRAM guide for catalog estimates.
Does my code have to change?
For supported chat completions, completions and embeddings, configure the base URL, API key and deployed model id. Other OpenAI operations and model-specific features need separate checks.

Related

Run it on your own GPU

Connect your GPU, deploy a catalog model and test the hosted API on a representative request. The quickstart explains the setup and data flow.