Qwen3.8 27B vs Gemma 4 31B
Qwen3.8 27B and Gemma 4 31B are mid-sized models with published weights that also read images. Both have adjustable reasoning and suit work that does not need the largest model.
Today's prices and specs
Prices are in Rial per million tokens and specs are read straight from the IranRouter catalogue. The best value in each row is green. The intelligence and coding indexes come from public benchmarks, and hovering over a speed or first-token figure shows where it was measured.
| Qwen: Qwen3.8 27BQwen | Google: Gemma 4 31BGoogle | |
|---|---|---|
| Input (IRR / 1M tokens) | 164,761 | 549,204 |
| Output (IRR / 1M tokens) | 5,382,200 | 1,098,408 |
| One message (IRR) | 3,021 | 1,648 |
| Context (tokens) | 1M | 262K |
| Max output (tokens) | 236K | 16K |
| Intelligence | 20.1 | 4.4 |
| Coding | — | — |
| Speed (tokens/s) | 57From public market statistics for this model | 48From public market statistics for this model |
| First token (s) | 1.0From public market statistics for this model | 0.7From public market statistics for this model |
| Health, 30 days | 57.41% | 92.51% |
| Usage rank | #43 | #49 |
| Can do | Image inputTool callingJSON outputReasoning | Image inputTool callingJSON outputReasoning |
| Released | Aug 14, 2026 | Apr 2, 2026 |
The differences at a glance
- Gemma 4 31B's input price is about 3.3 times Qwen3.8 27B's.
- Qwen3.8 27B's output price is about 4.9 times Gemma 4 31B's.
- One typical message costs about 3,021 IRR on Qwen3.8 27B and about 1,648 IRR on Gemma 4 31B.
- Qwen3.8 27B holds 1M tokens of context and Gemma 4 31B 262K.
- Both accept text, images and video as input.
When to choose Qwen3.8 27B
- Coding, professional work and research, the uses its maker names.
- Long agent tasks where you want to set the amount of reasoning yourself.
When to choose Gemma 4 31B
- A product that needs tool calling and is served by a compact model.
- When you may want to run the same model on your own hardware later.
Before you decide
If published weights matter to you, read each model's licence on its maker's site before you plan to run it yourself. Through the API it makes no difference to your work.
from openai import OpenAI client = OpenAI(api_key="ir-...", base_url="https://iranrouter.com/v1") for model in ["qwen/qwen3.8-27b", "google/gemma-4-31b-it"]: r = client.chat.completions.create(model=model, messages=[{"role": "user", "content": "..."}]) print(model, r.choices[0].message.content)
Frequently asked questions
Which is cheaper, Qwen3.8 27B or Gemma 4 31B?
It depends on the work: at today's rates Qwen3.8 27B has the cheaper input and Gemma 4 31B the cheaper output. Long prompts with short answers lean on input, long answers on output.
Do I need my own GPU?
No. You reach the model through the API with an ir- key, with no server or GPU of your own. Published weights only mean you could run the model elsewhere if you ever wanted to.
Can I try both on one account?
Yes. One ir- key and the same Rial wallet reach both, and switching means changing only the model value in the request. You can set a spending limit on each key.

