What is Ollama Cloud and How Does the API Routing Work?
I tried running GLM-5 locally on my laptop and ran into a familiar problem: my hardware couldn’t handle it. Models with 120B+ parameters need serious GPU power, and my 8GB VRAM card just wasn’t enough.
Then I discovered Ollama Cloud. Instead of upgrading my hardware or switching to a completely different API service, I could keep using the same Ollama CLI I already knew—just with a :cloud suffix.
Here’s what I learned about how Ollama Cloud actually works.
The Core Problem
Running large language models locally has always required significant hardware investment. Models like GPT-OSS 120B or GLM-5.1 exceed what most consumer hardware can handle.
You’re forced to either:
- Buy expensive GPU hardware
- Use separate API services (OpenAI, Anthropic) with different tooling
- Compromise on model quality for hardware compatibility
Ollama Cloud offers a different approach: keep your existing Ollama tooling while offloading large models to cloud infrastructure.
How the Routing Works
Ollama Cloud has two access paths.
Method 1: Local Daemon with :cloud Suffix
When you run a model with the :cloud suffix, your local Ollama daemon automatically routes the request to ollama.com:
ollama run glm-5:cloud "Explain quantum computing"# Request path: Local CLI -> Local Daemon -> ollama.com -> Cloud GPUThe :cloud suffix is the key indicator. Only models on the cloud model list support this suffix. If you try :cloud on a non-cloud model, it won’t work.
Method 2: Direct API Access
For containerized environments or setups where running a local daemon is impractical, you can connect directly to Ollama’s cloud endpoint:
curl https://ollama.com/v1/chat/completions \ -H "Authorization: Bearer $OLLAMA_API_KEY" \ -H "Content-Type: application/json" \ -d '{"model": "glm-5", "messages": [{"role": "user", "content": "Explain API routing"}]}'This is where I made my first mistake.
The OpenAI-compatible endpoint is https://ollama.com/v1, NOT https://ollama.com/api/v1. The /api prefix is for native Ollama endpoints. I spent 30 minutes debugging 404 errors before realizing this.
The Architecture Flow
Here’s how requests actually travel:
┌─────────────────┐ ┌─────────────────┐ ┌─────────────────┐│ Your App/CLI │────▶│ ollama.com │────▶│ Cloud GPUs ││ │ │ (API Router) │ │ (NCPs) │└─────────────────┘ └─────────────────┘ └─────────────────┘
API Key Auth Request Routing Model Inference (:cloud suffix) Model Selection GPU Time BillingRequests route through ollama.com, not directly to the model providers. This is an abstraction layer—you’re not getting direct access to NVIDIA or whoever is providing the GPUs.
GPU-Time Billing vs Token Caps
This part confused me initially. Unlike OpenAI or Anthropic’s token-based billing, Ollama Cloud measures GPU time utilization.
From the pricing docs:
“Usage reflects actual utilization of Ollama’s cloud infrastructure - primarily GPU time, which depends on model size and request duration. Shorter requests and prompts that share cached context use less.”
What this means practically:
- Shorter requests cost less
- Prompts that reuse cached context cost less
- As hardware improves over time, you naturally get more from your subscription
- No surprise bills (subscription model, not usage-based)
I asked around on Reddit about token limits. Someone mentioned using 500M tokens with GLM-4.7 on the Zai coding plan. The reality is there’s no fixed token cap—it’s about how much GPU time you’re consuming.
Plan Limits and Reset Windows
The limits reset on two schedules:
| Plan | Monthly Cost | Concurrent Models | Usage Level | Reset Windows |
|---|---|---|---|---|
| Free | $0 | 1 | Light | 5h / 7d |
| Pro | $20 | 3 | 50x Free | 5h / 7d |
| Max | $100 | 10 | 250x Free | 5h / 7d |
- Session limits: Every 5 hours
- Weekly limits: Every 7 days
If you hit your session limit, you can resume after the 5-hour reset window. This makes it usable for intermittent development work, though extended agent sessions might hit limits faster than expected.
Common Mistakes I’ve Seen
1. Wrong API endpoint
Using https://ollama.com/api/v1 instead of https://ollama.com/v1. The /api prefix is for native Ollama endpoints, not OpenAI-compatible ones.
2. Using :cloud on non-cloud models
Only models listed on ollama.com/search?c=cloud support the suffix. I tried it on a model I pulled locally and got an error.
3. Ignoring concurrency limits
Free tier: 1 concurrent model. Pro: 3 concurrent models. Exceeding the limit queues requests rather than rejecting them, but you’ll notice the latency.
4. Misunderstanding the usage limits
It’s not token-capped. It’s GPU-time-based. The 5-hour session reset vs 7-day weekly reset took me a few reads to understand.
Python Example: Direct Cloud Access
If you don’t want to run a local daemon, here’s how to connect directly:
import osfrom ollama import Client
client = Client( host='https://ollama.com', headers={'Authorization': 'Bearer ' + os.environ.get('OLLAMA_API_KEY')})
# No :cloud suffix needed for direct APIresponse = client.chat('glm-5', messages=[ {'role': 'user', 'content': 'What is Ollama Cloud?'}], stream=True)
for part in response: print(part['message']['content'], end='', flush=True)Setting Up AI Coding Agents
For tools like Pi or OpenCode, you configure the endpoint in your models file:
{ "ollama-cloud": { "api": "openai-completions", "apiKey": "YOUR_API_KEY", "baseUrl": "https://ollama.com/v1", "models": [ { "id": "glm-5:cloud", "contextWindow": 202752, "input": ["text"], "reasoning": true } ] }}This gives you a viable alternative to frontier model APIs, especially for models like GLM-5 that handle extended agent workflows with hundreds of tool calls.
Why This Matters
For individual developers: no hardware investment required for large models, same tooling works for local and cloud, subscription model prevents surprise bills.
For teams: predictable costs, privacy guarantee (prompts/responses never logged or trained on), zero data retention policies with NVIDIA Cloud Partners.
The main trade-off is you’re adding network latency to every request. For coding agents that make hundreds of sequential calls, this can add noticeable delay compared to local inference. But if your hardware can’t run the model at all, that trade-off is worth it.
Final Words + More Resources
My intention with this article was to help others share my knowledge and experience. If you want to contact me, you can contact by email: Email me
Here are also the most important links from this article along with some further resources that will help you in this scope:
- 👨💻 Ollama Cloud Models
- 👨💻 Ollama Pricing
Oh, and if you found these resources useful, don’t forget to support me by starring the repo on GitHub!
Comments