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 27BQwenGoogle: Gemma 4 31BGoogle
Input (IRR / 1M tokens)164,761549,204
Output (IRR / 1M tokens)5,382,2001,098,408
One message (IRR)3,0211,648
Context (tokens)1M262K
Max output (tokens)236K16K
Intelligence20.14.4
Coding——
Speed (tokens/s)57From public market statistics for this model48From public market statistics for this model
First token (s)1.0From public market statistics for this model0.7From public market statistics for this model
Health, 30 days57.41%92.51%
Usage rank#43#49
Can doImage inputTool callingJSON outputReasoningImage inputTool callingJSON outputReasoning
ReleasedAug 14, 2026Apr 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.

Python
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.

Get connected today

Create an account, top up your wallet and make your first request in minutes — no contract, no foreign card.

Create a free accounthttps://iranrouter.com/v1