Home Blog

How to Use the Qwen3.8 Flash API

How to Use the Qwen3.8 Flash API

Aug 26, 2026

EmpirioLabs AI

Qwen3.8 Flash is the newest multimodal model in Alibaba's Qwen3.8 family, released on August 26, 2026, built for fast, low-cost coding, agent, and vision work. It pairs a 1M token context with text, image, and video understanding, deep thinking that is on by default, and the same five built-in tools as Qwen3.8 Max.

Qwen3.8 Flash is live on EmpirioLabs today through an OpenAI-compatible API, with function calling, strict JSON Schema structured output, streaming, and up to 128K output tokens. Try it in the playground or call it from any OpenAI-compatible client. The full spec and current rates live on the Qwen3.8 Flash model page and the API docs.

Pricing

Billing is usage based with one flat input rate and one flat output rate at every prompt size, and there is no separate cache tier. Web search, text-to-image search, and image-to-image search add a small per-call fee that applies only when a call actually runs; the web extractor and code interpreter run at no extra cost. Current rates always live on the model page and the pricing page, which stay in sync with what you are charged.

Quickstart

Point any OpenAI SDK at the EmpirioLabs base URL and pass qwen3-8-flash as the model:

from openai import OpenAI

client = OpenAI(
    base_url="https://api.empiriolabs.ai/v1",
    api_key="YOUR_EMPIRIOLABS_API_KEY",
)

resp = client.chat.completions.create(
    model="qwen3-8-flash",
    messages=[
        {"role": "user", "content": [
            {"type": "text", "text": "What is happening in this chart?"},
            {"type": "image_url", "image_url": {"url": "https://example.com/chart.png"}},
        ]},
    ],
    extra_body={"enable_thinking": True, "thinking_budget": 8192},
)

print(resp.choices[0].message.content)

The same model id works on /v1/responses, the Anthropic-shaped /v1/messages, and the Google-compatible /v1beta/models/qwen3-8-flash:generateContent route. The alternate id qwen3.8-flash resolves to the same model.

Thinking

Deep thinking is on by default and streams back as reasoning_content alongside the answer. Control it with enable_thinking and thinking_budget (up to 262,144 tokens), or send reasoning_effort and the platform maps it to a budget sized for the model. Thinking tokens bill as output tokens, so disable thinking or set a small budget for short, latency-sensitive turns.

Built-in tools

Five built-in tools ride behind tool_* toggles: tool_web_search, tool_web_extractor, tool_code_interpreter, tool_web_search_image, and tool_image_search. The web extractor requires web search, and both the extractor and the code interpreter run only while thinking is enabled. When tools run, the response's usage.tool_usage map reports exactly how many calls were made, so you can audit per-tool billing.

Structured output

For an exact response shape, pass response_format with {"type": "json_schema", ...} and "strict": true: the model returns exactly the schema's keys with no extras. Plain JSON mode with {"type": "json_object"} is also supported.

Things worth knowing before your first call

  • All five built-in tools default to on, and searches bill per invoked call. A single request can run web search several times, and each invocation is billed. For plain chat with no tool fees, set tool_web_search, tool_web_search_image, and tool_image_search to false.
  • tool_choice: "required" does not work while thinking is on. The request is rejected with a clear error. Keep tool_choice: "auto" with thinking enabled, or set enable_thinking: false when you need to force a function call.
  • JSON mode needs the word "json" in your messages. A {"type": "json_object"} request is rejected unless the word appears somewhere in the conversation. JSON Schema requests have no such requirement.

Qwen3.8 Flash is available now in the playground and through the EmpirioLabs API.

Ready to use better endpoints?

Explore our models, or contact us about business inquiries, custom deployments, or anything else.