How to run Qwen3.8 27B in 2026: the two-minute API path, the honest local guide, and the break-even math
How to run Qwen3.8 27B, every path priced and verified on 2026-10-14: an OpenAI-compatible API you can wire in two minutes (no GPU), the local Ollama install with real VRAM requirements per quant (18GB at 4-bit, 56GB at BF16), other providers, and the arithmetic that decides which one you should pick.
tl;dr
TL;DR — How to run Qwen3.8 27B: wire an OpenAI-compatible API in about two minutes (an account, a key, one code snippet — no GPU, no download), or run the open weights locally with a single Ollama command if your machine has the memory for it. Both paths are priced below, and the break-even math — not tribalism — picks the right one.
Fastest to start: the API. No hardware, $5 in welcome credits on our lane, and the same OpenAI SDK you already use. One honesty note: our lane's readiness flag read
is_ready: falseat authoring (2026-10-14) — check the endpoint the day you wire.Going local: one command, one real requirement.
ollama run qwen3.8pulls an 18GB 4-bit build that wants a 24GB-class GPU (or a 32GB+ unified-memory Mac); full-precision BF16 needs ~56GB. No rig-shaming either way.
runaii.cloud
Start free — $5 in credits, no application
Per-token serverless inference on open models behind one OpenAI-compatible URL. Cached prefixes bill for almost nothing.
Table of contents
- What is Qwen3.8-27B?
- Three ways to run Qwen3.8 27B, at a glance
- Path 1: run Qwen3.8 27B through an API
- Path 2: run Qwen3.8 27B locally with Ollama
- Path 3: run Qwen3.8 27B on other providers
- The break-even math
- Which path fits you?
- FAQ · Glossary · Sources and freshness · Changelog
What is Qwen3.8-27B? (the public model card)
Qwen3.8-27B is the 27-billion-parameter model in Alibaba's Qwen3.8 generation, published on Hugging Face at Qwen/Qwen3.8-27B under an Apache-2.0 license — the permissive license that lets you download, modify, self-host, and ship it in products without asking anyone. The repository has been downloaded over 7 million times, which tells you this is one of the most-run open models of its generation, not a research artifact.
Four facts from the model card matter for how you run it:
It is a native vision-language model. The card describes "native support for image and video understanding, from STEM diagrams and documents to hour-scale videos." The weights ship with a vision encoder, and Qwen's own benchmark table lists multimodal results (OSWorld-Verified 84.3, WebArena-Verified 64.8, AndroidWorld 81.9). Those are Qwen's published numbers, not ours — but they explain why the input column below sometimes says "text, image."
The context window is huge on paper: 262,144 tokens natively, extensible up to 1,000,000. The catch — and it recurs throughout this guide — is that the model card's maximum and any given lane's served limit are different numbers. Our API lane serves 32,768. Ollama's tags list 256K. Read the endpoint, not the card, before you design around a context figure.
It is a hybrid-architecture dense model: 64 layers alternating Gated DeltaNet (linear attention) blocks with Gated Attention blocks, trained with multi-token prediction. You don't need the architecture diagram to run it — you need it to understand why long contexts are cheaper on this generation than on older pure-attention models, and why memory estimates for "27B" vary less than you'd fear.
It thinks by default. Thinking mode is on out of the box, can be disabled per request, and has a published
reasoning_effortdial (xhighdefault,medium,low). Reasoning tokens bill as output tokens on every metered lane we checked — so a model that "thinks" costs more per answer than its token counts suggest unless you dial the effort down.
For coding specifically, Qwen's published table puts the 27B at 61.7 on SWE-bench Pro, 73.0 on Terminal Bench 2.1, and 90.3 on LiveCodeBench v6 — ahead of the previous-generation Qwen3.6-27B on every row they both report. Again: their numbers, their harness settings, cited in the sources section. We ran nothing, measured nothing, and any post that prints "we benchmarked it in an afternoon" against these figures is selling you a default route.
Three ways to run Qwen3.8 27B, at a glance
Most page-one guides for this query assume you're building a local rig. Maybe you are — Path 2 is a complete local guide. But the API path is faster to first token, needs zero hardware, and for most workloads is cheaper than people assume, so it goes first here. No rig-shaming in either direction: the table just states the trade.
| Path | Cost | Hardware you need | Time to first token | Best for |
|---|---|---|---|---|
1. API — runaii.cloud (qwen3.8-flash) |
$0.40/1M input · $0.04/1M cached · $1.60/1M output | None | About two minutes to wire; seconds per request after | Shipping something this week; agents; bursty work |
2. Local — Ollama 4-bit (qwen3.8:27b-q4_K_M) |
$0 per token; your hardware + electricity | ~24GB GPU VRAM (or 32GB+ unified-memory Mac) | One-time 18GB download (minutes to hours), then seconds | Privacy, offline, fixed cost at high volume |
| 2b. Local — full precision (BF16) | $0 per token; much more hardware | ~56GB just for weights: multi-GPU or a 64GB+ Mac | Same download story, 56GB of it | Maximum quality; quantization-sensitive work |
| 3. Other providers (OpenRouter, Cerebras) | From $0.04/1M input (OpenRouter, verified) | None | Minutes to wire | One key for many models; decode-speed plays |
All figures pulled 2026-10-14 from the public pages in Sources and freshness. One row-level honesty note: the model is natively multimodal, but our API lane currently lists text-only input in its public model listing — image input works on Ollama's tags and on OpenRouter's listing, so if vision matters to you, check the lane, not just the model.
Path 1: run Qwen3.8 27B through an API (about two minutes)
This is the "skip the rig" path. You create an account, create a key, paste one snippet, and you're generating text with the same weights people download 18GB to run. Our lane serves the Qwen3.8-27B weights as qwen3.8-flash — the public models API describes it as "Balanced model for production chat — served on Qwen3.8-27B weights." Details live on the Qwen3.8-Flash model page and the full rate card.
Step 1 — create the account
Sign up at runaii.cloud. New accounts start with $5 in welcome credits (stated on our pricing page, verified 2026-10-14) — enough for millions of input tokens, so your first experiments are effectively free. While on welcome credits, the per-key rate limit is 60 requests per minute; after your first payment it rises to 180 requests per minute, the same on every model.
Step 2 — create an API key
Open the API-keys page in the dashboard and create a key. Treat it like a password: it spends real credits. Export it so the SDK finds it:
export RUNAII_API_KEY="sk-runaii-..."
Step 3 — first request with the OpenAI SDK
Our endpoint speaks the OpenAI wire format natively (the Anthropic SDK also works, per the model page's quickstart). If you already use the OpenAI SDK, this is a base-URL and model-id change — nothing else:
from openai import OpenAI
client = OpenAI(
base_url="https://api.runaii.cloud/v1", # the only change vs openai
api_key="sk-runaii-...", # or read it from the environment
)
response = client.chat.completions.create(
model="runaii/qwen3.8-flash", # the Qwen3.8-27B lane
messages=[{"role": "user", "content": "Say hello in Spanish."}],
)
print(response.choices[0].message.content)
The model page's documented quickstart uses the fully-qualified id runaii/qwen3.8-flash; the public models listing shows the same lane as qwen3.8-flash. Use the form from the quickstart you're copying and you're consistent with the docs.
Step 4 — the curl variant
No SDK required — plain HTTP works:
curl https://api.runaii.cloud/v1/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $RUNAII_API_KEY" \
-d '{
"model": "runaii/qwen3.8-flash",
"messages": [{"role": "user", "content": "Say hello in Spanish"}]
}'
Streaming, tool calling, structured outputs, and a reasoning flag (for the thinking mode described on the model card) are all listed as supported parameters in the public models API.
Step 5 — verify, and read the readiness flag first
Before you point anything real at the lane, check the live state — this is the step most guides skip:
curl -s https://runaii.cloud/api/v1/models | \
python -c "import json,sys; print([(m['id'], m['is_ready']) for m in json.load(sys.stdin)['data']])"
That prints every lane with its live readiness flag.
The honesty block, stated plainly: on 2026-10-14, the session that wrote this post, our public models API reported is_ready: false for the Qwen3.8 lanes. On 2026-10-13 the same public endpoint reported them true (our GLM-5.3-Flash alternatives, priced post recorded exactly that). The flag is live operational state, not a spec — it can flip either direction on any given day, which is why we quote it with a date and point you at the endpoint rather than claiming "run it now" and hoping. If it reads false when you wire up, the prices and limits below are still the published card — the lane just isn't accepting traffic at that moment. Check the endpoint, then decide.
What the lane costs, and its published limits
Verified 2026-10-14 from GET https://runaii.cloud/api/v1/models:
| Line item | Value |
|---|---|
| Input (fresh prompt) | $0.40 per 1M tokens |
| Cached read (re-sent prefix) | $0.04 per 1M tokens |
| Output (completion) | $1.60 per 1M tokens |
| Served context | 32,768 tokens |
| Max output per request | 32,768 tokens |
| Throughput caps | 150K prompt tokens/min · 100K completion tokens/min |
| Concurrency | 20 requests |
| Rate limit per key | 60 req/min on welcome credits · 180 after first payment |
Two notes that save people money. First, the cached-read rate — the discounted price for prompt tokens the provider has already processed — is the number that decides agent bills, because agents re-send their whole context every turn. Our models API lists it at $0.04 (10% of fresh); our pricing page's table currently renders a dash in that column for this lane, so treat the API as the source and verify against a real receipt before you count on it. Every response exposes the split, so you can check what you were actually charged for. Second, the 32,768-token served context is much smaller than the model card's 262,144 — if you need long contexts, that's a lane-selection criterion, not a bug; the other-providers section has lanes with more.
Path 2: run Qwen3.8 27B locally with Ollama
The local path. The Apache-2.0 license means the weights are yours to download; the only questions are which quant fits your memory and how honest we're all prepared to be about setup time. Ollama is the fastest route because it packages the model, the runtime, and an OpenAI-compatible server in one install.
Step 1 — install Ollama
The public install command, from Ollama's download page (verified 2026-10-14):
# Linux or macOS
curl -fsSL https://ollama.com/install.sh | sh
# Windows: download OllamaSetup.exe from https://ollama.com/download
Step 2 — pull and run the model
One command downloads the default build and drops you into a chat:
ollama run qwen3.8
The default tag is the 27B at 4-bit quantization: an 18GB download listed with a 256K context window and text-plus-image input on Ollama's library page. First run is dominated by the download — minutes on a fast connection, longer otherwise; after that, the model loads from local disk and answers in seconds. Total honest setup time: however long 18GB takes to reach your machine, plus about two minutes.
Step 3 — pick the quant that fits your memory
Ollama's tag page for qwen3.8 (verified 2026-10-14) publishes these builds of the 27B, and the sizes sanity-check against the parameter count — 27B at ~4 bits ≈ 14GB of weights plus overhead lands at 18GB; at 8 bits, 30GB; at BF16 full precision, 56GB, which matches Hugging Face's 27.78-billion-parameter BF16 file set exactly:
| Tag | Download size | Fits comfortably in | Trade-off |
|---|---|---|---|
qwen3.8:27b-q4_K_M (default) |
18GB | 24GB GPU (RTX 3090/4090 class), 32GB+ Mac | Small quality loss vs full precision |
qwen3.8:27b-q8_0 |
30GB | 32GB+ VRAM with little headroom, or 48GB-class | Near-full precision; tight fit on a 32GB card |
qwen3.8:27b-mxfp8 |
32GB | 48GB-class VRAM | 8-bit floating-point format |
qwen3.8:27b-bf16 |
56GB | Multi-GPU, or 64GB+ unified-memory Mac | The reference build — maximum quality |
qwen3.8:27b-mlx |
18GB | Apple Silicon, 32GB+ unified memory | The 4-bit build packaged for Macs |
qwen3.8:27b-nvfp4 |
18GB | Modern 24GB+ GPUs supporting the format | 4-bit floating-point format |
Three pieces of guidance that the tag table implies but doesn't state. Weights size is not VRAM usage — the model also needs memory for activations and the context you actually run; a 24GB card runs the 18GB build with a workable context, not a maximal one. Long contexts cost memory above the weights — the 256K window on the tag page is what the build supports, not what any single GPU will hold; start smaller. And the MLX tag is the Mac path — same 18GB, packaged for Apple Silicon, so a MacBook with 32GB or more of unified memory is a genuinely portable way to run the 27B at 4-bit.
A 16GB gaming laptop cannot run this model at any quant Ollama publishes — the smallest build is already bigger than its memory. The qwen3.8 family page on Ollama lists 12 models, so if your hardware tops out below 24GB, the smaller siblings in the same family are one page away; this guide is deliberately about the 27B.
Step 4 — serve it as a local OpenAI-compatible endpoint
ollama serve (started automatically by the desktop app) exposes an OpenAI-compatible API on port 11434, documented on Ollama's "OpenAI compatibility" page:
from openai import OpenAI
client = OpenAI(
base_url="http://localhost:11434/v1",
api_key="ollama", # required by the SDK, ignored by the server
)
response = client.chat.completions.create(
model="qwen3.8:27b",
messages=[{"role": "user", "content": "Summarize this repo's README: ..."}],
)
This is the quiet superpower of the local path: your app code doesn't know (or care) whether the base URL is a cloud lane or your own machine. You can develop against the local build and switch to an API lane — ours or anyone's — by changing one string.
What local actually costs you
The honest accounting: $0 per token, plus the hardware, plus the electricity whenever it's running (it draws power even when idle-serving), plus your time as the operator — updates, memory tuning, the odd OOM at 2am. You also choose your own quality point: the 4-bit build is what most people run and it's good, but it is not the BF16 reference, and nobody's quantization claims should be confused with a measurement. Local wins on privacy (nothing leaves the machine), on offline operation, and on cost at sustained high volume — the arithmetic is below. It loses on convenience, on scale-to-zero (an idle GPU still costs money; an idle API bill is zero), and on serving features that lanes add on top (caching discounts, higher throughput, concurrent users).
Path 3: run Qwen3.8 27B on other providers
You are not locked to anyone — including us. Verified 2026-10-14 from public pages:
OpenRouter lists the model as qwen/qwen3.8-27b at $0.04/1M input, $0.0198/1M cached, $2.30/1M output, with a 1M-token advertised context (262,144 at the top provider) and text, image, and video input. Read that table honestly: their input and cached columns beat our lane on this model — 10x cheaper on fresh input — while our output column is 30% cheaper ($1.60 vs $2.30). For input-heavy rerun work, they win; for generation-heavy work, we do. That's the same column-splitting reality we laid out in GLM-5.3-Flash alternatives, priced, and we'd rather you see it than discover it on a bill.
Cerebras carries qwen-3.8-27b in its shared-inference catalog (27B, 64k/128k context) and publishes a decode figure of about 1,850 tokens per second in that catalog — the speed play if your product feels generation latency. Their catalog page doesn't list per-token prices; check their current page.
Qwen Cloud — the model card says a hosted Qwen3.8-27B with 1M context by default is "coming soon." When it lands, it becomes the first-party lane; until then, check their current page.
Every price above was fetched this session; aggregator rates float with their provider pools, so date-stamp anything you copy from here into a decision doc.
The break-even math: API per-token vs a local rig
This is labeled public arithmetic — not a measurement of any system. Assumptions are stated so you can re-run them with your own numbers.
The local rig, priced: a workstation built around a 24GB-class GPU (new or used) at $2,000, amortized over 24 months = $83/month. Power: a 350W wall draw running 8 hours a day is $93/month**, every month, whether it serves one request or ten thousand. (Your local electricity price and used-GPU market will move this; substitute your own numbers.)84 kWh/month; at $0.12/kWh that's **$10/month**. Call the rig **
The workload, stated: a 30-turn coding-agent session — 40K-token prompts, 80% of prompt tokens hitting the cache after turn one, 600 output tokens per turn. Totals per session: 240K fresh input, 960K cached, 18K output. This is the same session shape we used in our coding-agent comparison, so the arithmetic is comparable across posts.
The API bill at our published rates ($0.40 / $0.04 / $1.60 per 1M):
0.24M fresh × $0.40 = $0.096
0.96M cached × $0.04 = $0.038
0.018M out × $1.60 = $0.029
————————
$0.163 per 30-turn session
Break-even: $93 ÷ $0.163 ≈ 570 sessions/month ≈ 19 sessions per day. Run fewer than ~19 of these sessions daily and the API is cheaper than the amortized rig; run more and the rig's fixed cost starts winning — with the caveats from Path 2 attached (the rig serves only you, draws power, and a 4-bit build is not the BF16 reference).
The same session on OpenRouter's verified rates ($0.04 / $0.0198 / $2.30) works out to $0.070 per session — their cheaper input side moves the break-even to ~1,330 sessions/month, ~44/day. Cheaper lanes push the local rig further out of the money; pricier lanes pull it closer. This is why "which is cheaper, API or local?" has no universal answer — only your workload shape times the current rate card.
And the light user, for completeness: 30 sessions a month on our lane costs $4.90. The rig never pays for itself at that usage; welcome credits alone cover it.
Which path fits you?
- "I want to try it tonight" — Path 1, the API. Two minutes, no download, welcome credits absorb the first experiments. If our lane's readiness flag is false when you check, Path 3's lanes are the same two-minute wiring.
- Coding-agent builder — an API lane with a published cached-read price; the cached column decides your bill. Run the session arithmetic above on your own logs, and see our coding-agent cost comparison for the full field. At fleet volume, flat-rate coding plans trade the meter for a visible quota.
- Privacy or air-gapped requirements — Path 2, local. Nothing leaves the machine, works offline, Apache-2.0 means no license anxiety. Pick the quant from the VRAM table and accept the trade-offs honestly.
- Tinkerer with a 24GB GPU already in the tower — Path 2 costs you nothing new; the 18GB build is one command away and the OpenAI-compatible local endpoint keeps your app code portable.
- Sustained high volume (20+ heavy sessions/day) — the arithmetic says the rig wins on cost; read Path 2's honest accounting before believing any blog post (including this one) that stops at the hardware price.
- Need the full 262K context or image/video input — lane-selection problem: our lane serves 32K text-only today; Ollama's local build and OpenRouter's listing serve more. Check the lane, not the model card.
Sources and freshness
Every fact in this post was verified on 2026-10-14, in the session that wrote it:
- runaii.cloud models API — lane identity ("served on Qwen3.8-27B weights"), prices ($0.40/$0.04/$1.60 per 1M), 32,768 context, throughput/concurrency caps, supported parameters,
is_ready: falsefor both Qwen lanes as quoted. - The Qwen3.8-Flash model page — quickstart (base URL
https://api.runaii.cloud/v1, modelrunaii/qwen3.8-flash), OpenAI- and Anthropic-SDK support, rate limits (60/180 req/min). - runaii.cloud pricing — rate-card rows, "$5 free" welcome credits, the cached-column dash noted in Path 1.
- Token-Max coding plans — the flat-plan alternative linked from Which-path.
- Ollama library page for qwen3.8 and its tags page — default tag 18GB / 256K / text+image; every quant size in the VRAM table; the 12-model family count.
- Ollama download page and OpenAI compatibility docs — install command,
localhost:11434/v1endpoint. - Hugging Face model card, Qwen/Qwen3.8-27B — Apache-2.0 license, 27B parameter count, 262,144 native / 1M extensible context, vision-language capabilities, thinking-mode and
reasoning_effortdefaults, recommended sampling settings, every benchmark figure quoted, Qwen Cloud "coming soon" note, 7M+ downloads. - OpenRouter models API —
qwen/qwen3.8-27bat $0.04/$0.0198/$2.30 per 1M, 1M listed context (262,144 top provider), text+image+video input. - Cerebras model catalog —
qwen-3.8-27b, 27B, 64k/128k context, the ~1,850 tokens-per-second catalog figure.
Checked and not verifiable from public pages this session, marked as such rather than guessed: Cerebras per-token pricing ("check their current page"), Qwen Cloud's hosted availability and pricing (card says "coming soon"). The break-even section is arithmetic from the published rates above with its assumptions stated — nothing in it was measured. Prices in this market move weekly; every table carries its pull date.
Changelog
- 2026-10-14: initial draft. All prices, sizes, and specs verified this date from the sources above (live runaii.cloud models API and pages, Ollama library and tags pages, Hugging Face model card, OpenRouter models API, Cerebras catalog). Readiness flags quoted as of authoring: runaii Qwen3.8 lanes
is_ready: falseon 2026-10-14 (the same public endpoint showedtrueon 2026-10-13). Re-verify every price, flag, and spec before publication, then monthly, or immediately if any listed lane reprices.
Glossary
- MLX
- Apple's machine-learning framework for Apple Silicon; the `-mlx` tags are builds packaged for it, the practical path for running this model on a Mac.
runaii.cloud
Start free — $5 in credits, no application
Per-token serverless inference on open models behind one OpenAI-compatible URL. Cached prefixes bill for almost nothing.