# Qwen-Max > Qwen text model with tool calling and structured output and a 128K-token context window. ## Key facts - Model author: Qwen - Input: $1.60 per 1M tokens - Output: $6.40 per 1M tokens - Cached input: $0.32 per 1M tokens - Context window: 128,000 tokens - Input modalities: text - Output modalities: text - Capabilities: structured_output, tools - Model IDs: `qwen/qwen-max` - Model page: https://www.realrelay.ai/model/qwen/qwen-max ## Overview Qwen-Max is a text model from Alibaba Cloud's Qwen family that supports tool calling and structured output. It takes text input, returns text and has a 128K-token context window. It is priced at $1.60 per 1M input tokens and $6.40 per 1M output tokens, with cached input at $0.32 per 1M tokens. Qwen-Max has a 128K-token context window. It accepts text input and returns text. ## Capabilities Qwen-Max accepts text input and returns text. It supports tool calling and structured output, so an application can have the model call external functions and return replies in a fixed format. The 128K-token context window holds long documents or extended conversation histories in a single request, and cached input is billed at a lower rate when the same prompt prefix repeats. ## Pricing Qwen-Max is priced per 1M tokens at $1.60 for input and $6.40 for output, with cached input at $0.32. Qwen-Max is available through RealRelay's OpenAI-compatible API. ## Use cases Use Qwen-Max for assistants that call external tools and must return replies in a fixed structure, for example filling forms, producing JSON for an API or routing requests between services. The 128K-token window fits long documents and conversation histories in one request, and the lower cached-input rate helps when the same instructions are reused across many calls. ## Call it OpenAI-compatible chat completions: ```bash curl https://www.realrelay.ai/v1/chat/completions \ -H "Authorization: Bearer $REALRELAY_API_KEY" \ -H "Content-Type: application/json" \ -d '{"model": "qwen/qwen-max", "messages": [{"role": "user", "content": "Hello"}]}' ``` ## FAQ ### What is Qwen-Max? Qwen-Max is a text model from Alibaba Cloud's Qwen family that supports tool calling and structured output. It takes text input, returns text and has a 128K-token context window. ### How much does Qwen-Max cost? Qwen-Max costs $1.60 per 1M input tokens and $6.40 per 1M output tokens, and cached input is $0.32 per 1M tokens. ### What is the context window of Qwen-Max? Qwen-Max has a 128K-token context window. ### What inputs and outputs does Qwen-Max support? Qwen-Max accepts text input and returns text. ### Does Qwen-Max support tool calling and structured output? Yes. Qwen-Max supports tool calling and structured output. ### What is Qwen-Max used for? Qwen-Max is used for tool-calling assistants and structured-output tasks over text, such as form filling, JSON generation and request routing. ### How do I call Qwen-Max through the API? Send requests to RealRelay's OpenAI-compatible API with the model ID qwen/qwen-max.