Qwen3.5 4B API

Qwen3.5 4B is a low-cost multimodal reasoning model with 256K context, image and video input, function tools, and structured output.

Alibaba Cloud Text Generation 256K context Released Mar 2, 2026 Native Inference

About Qwen3.5 4B

Qwen3.5 4B is a low-cost multimodal reasoning model with 256K context, image and video input, function tools, and structured output.

Supports text, image, and video input, streaming, function tools, structured JSON output, seed control, and thinking mode on by default. Use reasoning_effort or thinking_budget for bounded thinking, or enable_thinking=false for direct answers. Automatic cache reads are billed at the cached-input rate when reported by the model service. Explicit cache controls are not supported.

Also known as Alibaba Cloud Qwen3.5 4B

reasoning vision video function calling cache multimodal json mode logprobs

Qwen3.5 4B specs

Model ID
qwen3-5-4b
Author
Alibaba Cloud
Category
Text Generation
Released
Mar 2, 2026
Context window
256K tokens
Max output
32,768 tokens
Input
TextImageVideo
Output
Text
Structured output
JSON Schema
Endpoints
POST/v1/chat/completionsPOST/v1/responsesPOST/v1/messagesPOST/v1/completionsPOST/v1beta/models/qwen3-5-4b:generateContent
Alternate model IDs
qwen3.5-4b

Qwen3.5 4B API pricing

Live pay-as-you-go rates from the EmpirioLabs catalog. You can also choose a plan with weekly allowances.

Type
Spec
Rate
Input
per 1M prompt tokens
$0.04
Output
per 1M generated tokens
$0.07
Implicit cache read
per 1M cached input tokens
$0.02
Web Search (Linkup)
per call when invoked
$0.013
Compare on the full pricing page

How to call the Qwen3.5 4B API

Qwen3.5 4B serves the OpenAI-compatible Chat Completions API. Point any OpenAI SDK at https://api.empiriolabs.ai/v1 with your EmpirioLabs API key and use the model id qwen3-5-4b. Get an API key from the EmpirioLabs dashboard.

cURL
curl https://api.empiriolabs.ai/v1/chat/completions \
  -H "Authorization: Bearer $EMPIRIOLABS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "qwen3-5-4b",
    "messages": [
      {"role": "user", "content": "Write a haiku about the ocean."}
    ]
  }'
Python (OpenAI SDK)
from openai import OpenAI

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

response = client.chat.completions.create(
    model="qwen3-5-4b",
    messages=[{"role": "user", "content": "Write a haiku about the ocean."}],
)
print(response.choices[0].message.content)
Full Qwen3.5 4B API reference

Qwen3.5 4B API parameters

Request parameters supported by the Qwen3.5 4B API on EmpirioLabs. Defaults apply when a field is omitted.

ParameterTypeDefaultRange / valuesDescription
temperaturenumber0.70 to 2Sampling temperature. 0 is deterministic and 2 is maximum randomness.
top_pnumber0.950.01 to 1Nucleus sampling probability mass. Lower values make outputs more focused.
max_tokensinteger81921 to 32768Maximum output tokens. When omitted: 8,192 at low and medium reasoning effort, 9,216 at high, and 32,768 at max or with thinking off.
stopstring--Up to 4 strings where the model will stop generating further tokens.
enable_thinkingbooleantrue-Enable reasoning before answering.
reasoning_effortenummediumnone, low, medium, high, maxReasoning effort level. none disables thinking. low, medium, high, and max set bounded thinking budgets sized to the selected model.
thinking_budgetinteger40961024 to 32768Maximum tokens reserved for reasoning when thinking is enabled. When max_tokens is lower, room is kept for the answer; a very low max_tokens can be spent entirely on...
top_kinteger20min 1Limit sampling to the top K candidate tokens when supported.
min_pnumber00 to 1Minimum probability threshold for token sampling.
frequency_penaltynumber0-2 to 2Penalty based on how often a token has already appeared.
presence_penaltynumber0-2 to 2Penalty for tokens that already appeared in the generated text.
repetition_penaltynumber1min 0.1Higher values discourage repeated phrasing.
seedinteger-0 to 2147483647Optional random seed for reproducible sampling.
logprobsbooleanfalse-Return token log probabilities when supported.
7 more parameters in the docs

Good to know

Supports text, image, and video input, streaming, function tools, structured JSON output, seed control, and thinking mode on by default. Use reasoning_effort or thinking_budget for bounded thinking, or enable_thinking=false for direct answers. Automatic cache reads are billed at the cached-input rate when reported by the model service. Explicit cache controls are not supported.

Qwen3.5 4B on the blog

Announcements, prompt tests, and comparisons that cover this model.

Qwen3.5 4B API: common questions

How much does the Qwen3.5 4B API cost?

On EmpirioLabs, Qwen3.5 4B is billed pay as you go: Input $0.04 per 1M prompt tokens; Output $0.07 per 1M generated tokens; Implicit cache read $0.02 per 1M cached input tokens; Web Search (Linkup) $0.013 per call when invoked. You can also choose a plan with weekly allowances. The live rate card on this page always matches what the API charges.

What inputs and outputs does Qwen3.5 4B support?

Qwen3.5 4B takes Text, Image, Video as input and returns Text.

What is the context window of Qwen3.5 4B?

Qwen3.5 4B supports a 256K-token context window with up to 32,768 output tokens per response.

Is the Qwen3.5 4B API OpenAI-compatible?

Yes. Qwen3.5 4B serves the OpenAI-compatible Chat Completions API, so existing OpenAI SDKs work by pointing base_url at https://api.empiriolabs.ai/v1 and setting the model id to qwen3-5-4b.

What is the model ID for Qwen3.5 4B?

Send qwen3-5-4b as the model in your request. The alternate IDs qwen3.5-4b also work.

When was Qwen3.5 4B released?

Alibaba Cloud released Qwen3.5 4B on Mar 2, 2026.

Can I try Qwen3.5 4B in the browser before integrating?

Yes. The EmpirioLabs playground runs Qwen3.5 4B in the browser with the same parameters the API exposes, so you can test prompts before writing code.

How do I get a Qwen3.5 4B API key?

Create an EmpirioLabs account, then generate a key under API Keys in the dashboard. Billing is pay-as-you-go credits, so you only pay for the requests you make. You can also choose a plan with weekly allowances.

Compare Qwen3.5 4B with other models

All model comparisons

Ready to use better endpoints?

Check out our pricing or reach out if you want your own model deployed on our stack.