Skip to main content

QwenCloud

QwenCloud is available on the Spanway gateway through the qwencloud/ model prefix. You register a QwenCloud model once in the gateway's config.yaml (or through the Admin UI), and every application then calls it through the gateway's OpenAI-compatible API with a Spanway virtual key. The provider credential stays on the gateway, and every request is authenticated, rate limited, logged and costed in the same way as any other provider.

The provider exposes an OpenAI-compatible API, so the gateway reuses its OpenAI request translation and only changes the base URL and credential.

Supported endpoints​

The gateway's endpoint support matrix lists the following endpoints for QwenCloud. Each link explains the request shape and the gateway features that apply to that endpoint.

Model types​

The bundled price map lists 45 QwenCloud models across these modes: Chat, Image generation. The mode decides which gateway endpoint a model is meant for, and it is also used by the gateway's health checks to send the right kind of test request.

Credentials​

The QwenCloud integration does not read a provider specific environment variable. Set api_base, and api_key when the server requires one, directly in spanway_params. Use the os.environ/ prefix to pull those values from the environment or from a configured secret manager.

Register a model on the gateway​

Add an entry to model_list in config.yaml. The model_name is the public name your applications send, and spanway_params.model tells the gateway which provider and upstream model to call.

model_list:
- model_name: glm-5.2
spanway_params:
model: qwencloud/glm-5.2

Start the gateway with this file:

spanway --config config.yaml
Private preview

Spanway is in private preview. The container images and Helm charts will be published soon. To request access, write to sales@spanway.ai, and preview customers receive download instructions in their onboarding pack.

To add the model without a restart, call POST /model/new with the same model_name and spanway_params, or use the Models + Endpoints page in the Admin UI. See model management for details.

Call the model through the gateway​

Send requests to the gateway's /v1/chat/completions endpoint with a virtual key. The gateway maps the public model name to the QwenCloud deployment, translates the request, and returns the response in the OpenAI format.

curl -X POST http://localhost:4000/v1/chat/completions \
-H "Authorization: Bearer $SPANWAY_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "glm-5.2",
"messages": [{"role": "user", "content": "Summarize what an AI gateway does in two sentences."}]
}'

The same request works from any OpenAI SDK by setting the base URL to http://localhost:4000 and the API key to a Spanway virtual key. Create keys with POST /key/generate as described in virtual keys.

Models and pricing​

The table lists every QwenCloud model in the gateway's bundled price map. Prices are shown in US dollars per 1 million tokens, computed from the per-token values the gateway uses for spend tracking. Context window sizes are the provider limits recorded in the same file. Capabilities are the supports_* flags set for each model.

info

Prices come from the price map bundled with this Spanway build. They are used to calculate the spend recorded for each request, key, team and user. Your negotiated rates may differ, and you can override them per deployment with custom pricing.

Model (model value)ModeMax input tokensMax output tokensInput per 1M tokensOutput per 1M tokensOther pricingCapabilities
qwencloud/deepseek-v4-flashChat1,000,000393,216$0.2$0.4tools, reasoning, prompt caching, structured output
qwencloud/deepseek-v4-flash-0731Chat1,000,000393,216$0.2$0.4tools, reasoning, prompt caching, structured output
qwencloud/deepseek-v4-proChat1,000,000393,216$2.40$4.80tools, reasoning, prompt caching, structured output
qwencloud/glm-5.1Chat202,745131,072$1.40$4.40tools, reasoning, prompt caching, structured output
qwencloud/glm-5.2Chat1,048,576131,072$1.40$4.40tools, reasoning, prompt caching, structured output
qwencloud/kimi-k2.7-codeChat229,37616,384$0.95$4.00tools, vision, reasoning, prompt caching, structured output
qwencloud/qwen-coderChat1,000,00016,384$0.3$1.50tools, reasoning
qwencloud/qwen-flashChat997,95232,768tools, reasoning
qwencloud/qwen-flash-2025-07-28Chat997,95232,768tools, reasoning
qwencloud/qwen-image-2.0Image generation
qwencloud/qwen-image-2.0-proImage generation
qwencloud/qwen-image-3.0Image generation
qwencloud/qwen-image-3.0-proImage generation
qwencloud/qwen-maxChat30,7208,192$1.60$6.40tools, reasoning
qwencloud/qwen-plusChat129,02416,384$0.4$1.20tools, reasoning
qwencloud/qwen-plus-2025-01-25Chat129,0248,192$0.4$1.20tools, reasoning
qwencloud/qwen-plus-2025-04-28Chat129,02416,384$0.4$1.20tools, reasoning
qwencloud/qwen-plus-2025-07-14Chat129,02416,384$0.4$1.20tools, reasoning
qwencloud/qwen-plus-2025-07-28Chat997,95232,768tools, reasoning
qwencloud/qwen-plus-2025-09-11Chat997,95232,768tools, reasoning
qwencloud/qwen-plus-latestChat997,95232,768tools, reasoning
qwencloud/qwen-turboChat129,02416,384$0.05$0.2tools, reasoning
qwencloud/qwen-turbo-2024-11-01Chat1,000,0008,192$0.05$0.2tools, reasoning
qwencloud/qwen-turbo-2025-04-28Chat1,000,00016,384$0.05$0.2tools, reasoning
qwencloud/qwen-turbo-latestChat1,000,00016,384$0.05$0.2tools, reasoning
qwencloud/qwen3-30b-a3bChat129,02416,384tools, reasoning
qwencloud/qwen3-coder-flashChat997,95265,536tools, reasoning
qwencloud/qwen3-coder-flash-2025-07-28Chat997,95265,536tools, reasoning
qwencloud/qwen3-coder-plusChat997,95265,536tools, reasoning
qwencloud/qwen3-coder-plus-2025-07-22Chat997,95265,536tools, reasoning
qwencloud/qwen3-maxChat258,04865,536tools, reasoning
qwencloud/qwen3-max-2026-01-23Chat258,04865,536tools, reasoning
qwencloud/qwen3-max-previewChat258,04865,536tools, reasoning
qwencloud/qwen3-next-80b-a3b-instructChat262,14465,536$0.15$1.20tools
qwencloud/qwen3-next-80b-a3b-thinkingChat262,14465,536$0.15$1.20tools, reasoning
qwencloud/qwen3-vl-32b-instructChat131,07232,768$0.16$0.64tools, vision
qwencloud/qwen3-vl-32b-thinkingChat131,07232,768$0.16$2.87tools, vision, reasoning
qwencloud/qwen3-vl-235b-a22b-instructChat131,07232,768$0.4$1.60tools, vision
qwencloud/qwen3-vl-235b-a22b-thinkingChat131,07232,768$0.4$4.00tools, vision, reasoning
qwencloud/qwen3-vl-plusChat260,09632,768tools, vision, reasoning
qwencloud/qwen3.5-plusChat991,80865,536tools, vision, reasoning
qwencloud/qwen3.7-maxChat991,80865,536$2.50$7.50tools, reasoning, prompt caching, structured output
qwencloud/qwen3.7-plusChat991,80865,536tools, vision, reasoning, prompt caching, structured output
qwencloud/qwen3.8-maxChat991,808131,072$2.00$6.00tools, vision, reasoning, prompt caching, structured output
qwencloud/qwq-plusChat98,3048,192$0.8$2.40tools, reasoning