# Alibaba Qwen3.7 Max > Integrate the qwen 3.7 max api for 1M token context and SOTA coding. Access Alibaba's native multimodal power at GPTProto.com with unified USD billing. ## Overview - **Base URL**: `https://gptproto.com/v1` - **Model ID**: `qwen3.7-max` - **Vendor**: Alibaba - **Category**: text-to-text - **Capabilities**: text-to-text, file-analysis, web-search - **Supported endpoints**: Chat Completions - **Model page**: https://gptproto.com/model/qwen/qwen3.7-max/web-search - **API documentation**: https://docs.gptproto.com ## Authentication Every request needs a GPTProto API key in the `Authorization` header. Create one at https://gptproto.com/dashboard/api-key, then export it: ```bash export GPTPROTO_API_KEY="your-api-key" ``` Header: `Authorization: Bearer $GPTPROTO_API_KEY`. Use `base_url` `https://gptproto.com/v1` with any OpenAI-compatible SDK. ## Pricing Platform price by tier (USD, already includes the GPTProto discount): - **Output** — $0.0014 per 1K tokens - **Input** — $0.0004 per 1K tokens Price range: $0 – $0 per generation. Prices may change. The model page always shows the live price: https://gptproto.com/model/qwen/qwen3.7-max/web-search ## Endpoints ### Chat Completions Sends a request for a model response for the given chat conversation. Supports both streaming and non-streaming modes. `POST https://gptproto.com/v1/chat/completions` - **Authorization**: `Bearer $GPTPROTO_API_KEY` - **Content-Type**: `application/json` ## Parameters Common request body fields for this model: - **`reasoning`** (`map`): Controls reasoning behavior for models that support thinking tokens, including whether reasoning is enabled, the reasoning effort, maximum reasoning tokens, and whether reasoning is excluded from the response. - **`max_tokens`** (`integer`): This sets the upper limit for the number of tokens the model can generate in response. - **`temperature`** (`float`): This setting influences the variety in the model's responses. - Default: ``1`` - **`top_p`** (`float`): This setting limits the model's choices to a percentage of likely tokens: only the top tokens whose probabilities add up to P. - Default: ``1`` - **`seed`** (`integer`): If specified, the inferencing will sample deterministically, such that repeated requests with the same seed and parameters should return the same result. - **`presence_penalty`** (`float`): Adjusts how often the model repeats specific tokens already used in the input. - Default: ``0`` - **`response_format`** (`map`): Forces the model to produce specific output format. - **`tools`** (`array`): Tool calling parameter, following OpenAI's tool calling request shape. - **`tool_choice`** (`string or object`): Controls which (if any) tool is called by the model. - **`top_k`** (`integer`): This limits the model's choice of tokens at each step, making it choose from a smaller set. - Default: ``0`` - **`frequency_penalty`** (`float`): This setting aims to control the repetition of tokens based on how often they appear in the input. - Default: ``0`` - **`stop`** (`array`): Stop generation immediately if the model encounter any token specified in the stop array. ## Usage Examples ### 1. First request The snippets below call **Chat Completions**. Swap the path if you prefer another supported endpoint. ```bash curl --request POST "https://gptproto.com/v1/chat/completions" \ --header "Authorization: Bearer $GPTPROTO_API_KEY" \ --header "Content-Type: application/json" \ --data '{ "model": "qwen3.7-max", "messages": [ { "role": "user", "content": "Hello" } ] }' ``` ```python import os import requests url = "https://gptproto.com/v1/chat/completions" headers = { "Authorization": f"Bearer {os.environ['GPTPROTO_API_KEY']}", "Content-Type": "application/json" } payload = { "model": "qwen3.7-max", "messages": [ { "role": "user", "content": "Hello" } ] } response = requests.request("POST", url, headers=headers, json=payload) print(response.json()) ``` ```typescript const response = await fetch("https://gptproto.com/v1/chat/completions", { method: "POST", headers: { "Authorization": `Bearer ${process.env.GPTPROTO_API_KEY}`, "Content-Type": "application/json", }, body: JSON.stringify({ model: "qwen3.7-max", messages: [ { role: "user", content: "Hello", }, ], }), }); const data = await response.json(); console.log(data); ``` ```python from openai import OpenAI import os client = OpenAI( base_url="https://gptproto.com/v1", api_key=os.environ["GPTPROTO_API_KEY"], ) completion = client.chat.completions.create( model="qwen3.7-max", messages=[ { "role": "user", "content": "Hello" } ] ) print(completion.choices[0].message.content) ``` ```typescript import OpenAI from "openai"; const client = new OpenAI({ baseURL: "https://gptproto.com/v1", apiKey: process.env.GPTPROTO_API_KEY, }); const completion = await client.chat.completions.create({ model: "qwen3.7-max", messages: [ { role: "user", content: "Hello", }, ], }); console.log(completion.choices[0].message.content); ``` ### 2. Enable streaming Add `"stream": true` to the request body to receive tokens as server-sent events: ```bash curl -N --request POST "https://gptproto.com/v1/chat/completions" \ --header "Authorization: Bearer $GPTPROTO_API_KEY" \ --header "Content-Type: application/json" \ --data '{ "stream": true, "model": "qwen3.7-max", "messages": [ { "role": "user", "content": "Hello" } ] }' ``` ## HTTP Status Codes - `400` — malformed body, a parameter or value this model does not accept, or input blocked by the provider's content moderation - `401` — missing or invalid API key - `403` — insufficient credits - `413` — request body too large - `429` — rate limited; retry with backoff - `500` — An internal server error occurred - `502` — An internal server error occurred - `504` — Gateway timeout — upstream service did not respond in time; retry later ## Additional Resources - [Model page](https://gptproto.com/model/qwen/qwen3.7-max/web-search) - [API documentation](https://docs.gptproto.com) - [All models](https://gptproto.com/model) - [API keys](https://gptproto.com/dashboard/api-key) - [Platform overview for LLMs](https://gptproto.com/llm-full.txt) - Any other model: `https://gptproto.com/model/{vendor}/{model}/{scene}/llms.txt`