Ollama already speaks the OpenAI API format on your machine — the hard part is reaching it from anywhere else, safely. This guide adds a public HTTPS endpoint with authentication in front of your local model, with no port forwarding and no prompts stored.
Ollama serves models on localhost:11434 with an OpenAI-compatible API — but only on your machine, and with no authentication. Exposing that port to the internet directly (or through a generic tunnel) means anyone who finds the URL can use your GPU. What you actually want is a public endpoint that speaks the OpenAI API, requires a key, and leaves your network closed.
Mealissa is a secure, OpenAI- and Anthropic-compatible gateway that gives self-hosted local LLMs a globally accessible API endpoint, with prompts encrypted in transit and never stored. The mealissa-llm-agent connects outbound from your machine, so nothing is opened to the public internet — see how this compares to ngrok and Tailscale.
Install Ollama and pull any model from the Ollama library:
ollama pull qwen2.5:4b
Create an account on the cloud dashboard. The free Pico plan and a 7-day trial are available — see licensing plans. The license key doubles as the API key your callers will use.
Download the agent for Windows or Linux and launch it. It detects your Ollama models, connects outbound to the Mealissa cloud over an encrypted channel, and registers your node — no port forwarding, no firewall changes. The full walkthrough is in the install guide.
Your node now has an OpenAI Chat Completions–compatible endpoint. Use the node ID you chose during registration (also shown in the dashboard):
from openai import OpenAI
client = OpenAI(
base_url="https://mealissa.com/cloud/n/<node_id>/v1",
api_key="<license_key>",
)
response = client.chat.completions.create(
model="qwen2.5:4b",
messages=[{"role": "user", "content": "Hello!"}],
)
print(response.choices[0].message.content)
Or with plain HTTP from anywhere:
curl -s -X POST https://mealissa.com/cloud/n/<node_id>/v1/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer <license_key>" \
-d '{"model":"qwen2.5:4b","messages":[{"role":"user","content":"Hello!"}]}'
Streaming works the standard way — pass stream=true and consume the response as you would with any OpenAI-compatible server.
If you run the agent on more than one machine in the same group, use the group endpoint instead — requests are dispatched to a connected node in the group:
base_url="https://mealissa.com/cloud/g/<group_id>/v1"
A free Pico plan and a 7-day trial are available — no card required.