Skip to content
← All posts
Product

We asked every model to look at a picture. Three could.

5 min read

Today the gateway adds qwen3.8-27b — Alibaba’s Qwen 3.8 27B, with a 262,144-token context window, tool calling, and image input. It joins the launch promotion at 40% off list price, applied automatically. That is the announcement. The more useful part of this post is what we found while getting there.

The claim we almost published

Our first draft of this page said Qwen was the only model in our catalog that could actually read an image. It was a good line. It was also wrong, and we caught it with about an hour to spare — not by thinking harder, but by running the check on every model instead of the one we were excited about.

Two Kimi models had been marked as vision-capable in our catalog since day one, inherited from their model pages. Nobody had ever sent them a picture. So before writing a superlative, we sent one to all seven.

The test

Deliberately blunt: two images, one solid red, one solid green, generated in the test itself so nothing depends on an external file or a network fetch. The question is “what is the dominant colour of this image?” and the model has to get both right. One image proves nothing — a model that sees nothing still guesses “red” a fair share of the time.

Three read images. Four do not.

  • `qwen3.8-27b` — reads images. Both probes correct, which is why we are selling it as a vision model.
  • `kimi-k2.6` — reads images. Both probes correct. The catalog was right by luck; now it is right by measurement.
  • `kimi-k2.7-code` — reads images. Both probes correct.
  • `glm-5.2` — does not. Accepted the images without complaint, answered “Unknown”, then returned nothing.
  • `deepseek-v4-pro` — does not. Accepted the images and returned an empty answer, twice, after doing the most compute of anything in the test.
  • `deepseek-v4-flash` — does not. Accepted the images and answered “unknown” both times.
  • `glm-4.7-flash` — does not, and says so. Refused the request outright with an explicit error stating it is not a multimodal model.

The failure in the middle is the expensive one

Look at the shape of that list. One model refuses cleanly. Three accept the image, spend real compute, and answer anyway — from the text alone, with no indication that the picture was ignored. That second behaviour is worse than an error in every way that matters: you are billed in full, you get a fluent answer, and nothing in the response tells you it was a guess. An error message costs you nothing and takes thirty seconds to handle.

This is why our gateway now refuses image input on any model not marked as vision-capable — a 400 before the request goes upstream, billed at $0. We would rather hand you a refusal you can act on than a confident paragraph about an image nobody looked at.

How to send an image

The shape is what the OpenAI SDK already expects: a content array with a text part and an image_url part. One rule decides whether your first attempt works — the image must be inlined as a base64 data URI. A remote http(s) link is not fetched, and we reject it up front rather than letting it fail deeper in the stack.

python
import base64
from openai import OpenAI

client = OpenAI(base_url="https://api.clfaigateway.dev/v1", api_key="sk-gw-...")

with open("screenshot.png", "rb") as f:
    b64 = base64.b64encode(f.read()).decode()

resp = client.chat.completions.create(
    model="qwen3.8-27b",
    messages=[{
        "role": "user",
        "content": [
            {"type": "text", "text": "What does this screen show?"},
            {"type": "image_url",
             "image_url": {"url": f"data:image/png;base64,{b64}"}},
        ],
    }],
    max_completion_tokens=400,   # leave room for reasoning
)
print(resp.choices[0].message.content)

What we measured on Qwen, and what we did not

  • Context window 262,144 tokens, confirmed against the endpoint rather than copied from a page.
  • ~1.1 s to first token on a short prompt. Prefill is the slow part: roughly 165–195 ms per 1,000 input tokens, several times slower than our DeepSeek Flash line — a 150K-token prompt takes about 28 s before the answer starts, though the first byte arrives in ~1.9 s.
  • Tool calling verified — six of six contract tests, with tools called using the correct schemas.
  • No cached-input discount. Prefix caching is not active on this model in our measurements, so we price cached input the same as regular input instead of advertising a saving that would not arrive.
  • Not measured: small print, scanned documents, dense charts. Our probe shows the model reads the image it is given. It does not establish OCR quality, so we are not selling OCR.

Pricing

During the launch period qwen3.8-27b bills at $0.27 / $1.92 per 1M tokens (input/output, list $0.45 / $3.20). Images bill as input tokens at the normal rate — there is no separate image fee. The live rate and the struck-through list price are both on the models page, synced from the same billing database that rates your requests.

Model IDs are unchanged from upstream and the endpoint is OpenAI-compatible, so adopting it is a base_url and a key: sign up at app.clfaigateway.dev, top up with VietQR or an international card, and send the first image. The details live at /qwen3-8-27b-api, /qwen3-8-27b-vision and /vision-api.

FAQ

Which models on the gateway can read images?

Three: qwen3.8-27b, kimi-k2.6 and kimi-k2.7-code. Each was verified by our own probe, not by reading a model page. The other four refuse image input at the gateway, at no cost to you.

Can I send an image by URL?

No. Images must be inlined as base64 data URIs; remote http(s) links are not fetched. We reject a URL up front with a clear error rather than letting it fail upstream.

Does it do OCR on scanned documents?

We have not measured that, so we do not claim it. Our probe establishes that the model genuinely reads the image it receives — not how well it handles small print or dense charts. Test it on your own documents; a failed request that produced nothing costs $0.

How long does the 40% discount last?

For the launch period, across the whole catalog. The live price on the models page is always the billed price.