← Integrations · Terminal agents

Qwen Code setup via the Kiree gateway

Connect Qwen Code to kiree.net through a Custom Provider or OPENAI_* variables: Qwen3 models from the catalog, billed by tokens, no Alibaba account.

Why the gateway

Why the direct setup does not cover every case

Qwen Code normally logs into Alibaba ModelStudio. The Custom Provider routes requests to the kiree.net gateway; the CLI runs with catalog models without a Qwen/Alibaba account.

Setup

Steps to your first request

·

Get a key

Create a sk-… key in the kiree.net console.

·

Choose a Custom Provider

On first run of qwen (or via /auth) choose Custom Provider, protocol openai — not ModelStudio and not Qwen OAuth.

·

Set the gateway and model

Base URL https://kiree.net/v1, key sk-…, model ID e.g. qwen3-8-max. Check with /stats or any request.

Base URL: "https://kiree.net/v1"
API key: "sk-…"
Model ID: "qwen3-8-max"

Alternative to variables: ~/.qwen/settings.json → modelProviders.openai with baseUrl https://kiree.net/v1 and envKey OPENAI_API_KEY.

Check: qwen -p "reply ok" or /stats inside the session: requests go through kiree.net.

Models

What to connect in Qwen Code

Any text model from the catalog works on one key. Below are popular options to start.

Diagnostics

Common errors

!

Goes to Qwen OAuth / ModelStudio

The wrong provider was chosen: in /auth switch to Custom Provider with the openai protocol.

!

401 Unauthorized

The key is missing: check OPENAI_API_KEY or envKey in settings.json.

!

404 model_not_found

The model ID is not from the catalog: use exact IDs, e.g. qwen3-8-max or qwen3-7-plus.

FAQ

Frequently asked questions

How do I connect Qwen Code through the gateway?+

Via the Custom Provider with the kiree.net address: no Qwen or Alibaba account is needed.

Why not ModelStudio?+

ModelStudio is Alibaba's native provider with its own registration and billing. The Custom Provider sends requests to the kiree.net gateway, billed by tokens.

Which Qwen models are available?+

qwen3-8-max, qwen3-7-max, qwen3-7-plus and other catalog text models; you can also add DeepSeek for budget tasks.

How is usage billed?+

Tokens are charged from the kiree.net balance; no Qwen subscription is required.

Get a key for Qwen Code

Create a key in a couple of minutes; pay only for actual usage, no subscription required.