DEV Community

Cover image for How to use the Qwen 3.7 Plus API ?
Hassann
Hassann

Posted on • Originally published at apidog.com

How to use the Qwen 3.7 Plus API ?

Qwen 3.7 Plus is Alibaba’s multimodal agent model: text, image, and video in, a 1M-token context, and budget pricing. Because it is API-only, the implementation questions are simple: how do you get a key, how do you send multimodal input, and how do you estimate cost?

Try Apidog today

This guide walks through API access, key setup, Python/curl/JavaScript requests, multimodal payloads, pricing examples, rate limits, and testing with Apidog. If you want capabilities and benchmarks first, start with the Qwen 3.7 Plus overview. For the text-only flagship, see the base Qwen 3.7 API guide.

TL;DR

Qwen 3.7 Plus runs through Alibaba Cloud Model Studio on an OpenAI-compatible endpoint.

Implementation summary:

  • Use the region-specific DashScope base URL.
  • Pass your Model Studio key as a Bearer token.
  • Call /chat/completions.
  • Use the qwen3.7-plus model ID.
  • Add image or video parts to the message content array for multimodal input.
  • Budget for visual tokens: images and video share the same 1M-token context window.

Pricing is $0.40 per million input tokens and $1.60 per million output tokens, with cached input at $0.08 per million tokens. There is no perpetual free tier, but new accounts get a one-time free quota. Confirm the exact model ID in the Model Studio docs before shipping.

How to access Qwen 3.7 Plus

Qwen 3.7 Plus has two practical access paths.

Qwen 3.7 Plus access

Option 1: Qwen Chat

Use chat.qwen.ai for quick manual testing.

Good for:

  • Trying prompts
  • Uploading screenshots
  • Checking image grounding behavior
  • Evaluating model quality before writing code

Not good for:

  • Production integration
  • Automated workflows
  • API testing

Option 2: Alibaba Cloud Model Studio

Use Alibaba Cloud Model Studio, also known as DashScope, for API access.

Model Studio exposes Qwen 3.7 Plus through an OpenAI-compatible API, so existing OpenAI SDK code can usually be adapted by changing:

  • api_key
  • base_url
  • model

Qwen 3.7 Plus is proprietary. There are no open weights, so you cannot self-host it or run it air-gapped. If self-hosting is a requirement, see the Qwen 3.7 Plus overview for the tradeoffs.

Method API access Cost Best for
Qwen Chat (chat.qwen.ai) No Free, rate-limited Quick evaluation with images
Model Studio / DashScope Yes, OpenAI-compatible Pay per token Production integration
Self-hosting No n/a Not available; weights are closed

Getting a Qwen 3.7 Plus API key

Access goes through Alibaba Cloud.

  1. Create an Alibaba Cloud account.
  2. Open the Model Studio console: modelstudio.console.alibabacloud.com.
  3. Activate Model Studio for your account and region.
  4. Open the API keys section.
  5. Generate a key.
  6. Copy it once and store it securely.

Keys are region-scoped. A Singapore key will not authenticate against the Beijing endpoint.

Base URLs by region

Region Base URL
Singapore https://dashscope-intl.aliyuncs.com/compatible-mode/v1
US / Virginia https://dashscope-us.aliyuncs.com/compatible-mode/v1
Beijing / China https://dashscope.aliyuncs.com/compatible-mode/v1

Store the key as an environment variable

Do not commit the key to source control.

# macOS / Linux
export DASHSCOPE_API_KEY="sk-your-key-here"

# Windows PowerShell
setx DASHSCOPE_API_KEY "sk-your-key-here"
Enter fullscreen mode Exit fullscreen mode

Your first Qwen 3.7 Plus request

The endpoint is OpenAI-compatible. You can use the OpenAI SDK or raw HTTP.

The model ID is currently:

qwen3.7-plus
Enter fullscreen mode Exit fullscreen mode

Before production deployment, confirm the current model string in the Model Studio model list, because identifiers can change.

Python example

Install the SDK:

pip install openai
Enter fullscreen mode Exit fullscreen mode

Send a request:

import os
from openai import OpenAI

client = OpenAI(
    api_key=os.environ["DASHSCOPE_API_KEY"],
    base_url="https://dashscope-intl.aliyuncs.com/compatible-mode/v1",
)

resp = client.chat.completions.create(
    model="qwen3.7-plus",
    messages=[
        {
            "role": "user",
            "content": "Summarize the Qwen 3.7 Plus pricing model in two sentences."
        }
    ],
)

print(resp.choices[0].message.content)
Enter fullscreen mode Exit fullscreen mode

curl example

curl "https://dashscope-intl.aliyuncs.com/compatible-mode/v1/chat/completions" \
  -H "Authorization: Bearer $DASHSCOPE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "qwen3.7-plus",
    "messages": [
      {
        "role": "user",
        "content": "Hello from the Qwen 3.7 Plus API."
      }
    ]
  }'
Enter fullscreen mode Exit fullscreen mode

JavaScript example

Install the SDK:

npm install openai
Enter fullscreen mode Exit fullscreen mode

Send a request:

import OpenAI from "openai";

const client = new OpenAI({
  apiKey: process.env.DASHSCOPE_API_KEY,
  baseURL: "https://dashscope-intl.aliyuncs.com/compatible-mode/v1",
});

const resp = await client.chat.completions.create({
  model: "qwen3.7-plus",
  messages: [
    {
      role: "user",
      content: "Hello from the Qwen 3.7 Plus API.",
    },
  ],
});

console.log(resp.choices[0].message.content);
Enter fullscreen mode Exit fullscreen mode

Sending images and video

Use Qwen 3.7 Plus when you need multimodal input. Visual content is passed as additional parts in the message content array.

The payload shape is similar to OpenAI vision requests.

resp = client.chat.completions.create(
    model="qwen3.7-plus",
    messages=[
        {
            "role": "user",
            "content": [
                {
                    "type": "text",
                    "text": "Which button submits this form? Give pixel coordinates."
                },
                {
                    "type": "image_url",
                    "image_url": {
                        "url": "https://example.com/screenshot.png"
                    }
                },
            ],
        }
    ],
)

print(resp.choices[0].message.content)
Enter fullscreen mode Exit fullscreen mode

You can send an image as:

  • A public image URL
  • A base64 data URI

This is useful for GUI-grounding workflows. For example, you can send a screenshot and ask the model to return an action such as:

click at (x=487, y=232)
Enter fullscreen mode Exit fullscreen mode

Video follows the same general pattern with a video part, but exact part names can vary by region. Check the OpenAI-compatibility docs for the current schema before implementing video requests.

Pricing

Qwen 3.7 Plus is positioned as a budget multimodal model.

Model Input / 1M tokens Output / 1M tokens Cached input / 1M tokens
Qwen 3.7 Plus $0.40 $1.60 $0.08
Qwen 3.7 Max $2.50 $7.50 $0.25

Qwen 3.7 Plus is roughly six times cheaper than Qwen 3.7 Max on input tokens.

There is no perpetual free tier. New Model Studio accounts get a one-time free token quota, usually in the Singapore region, for evaluation. After that, billing switches to pay-as-you-go.

The old Qwen OAuth free path was retired on April 15, 2026, so do not build production workflows around it.

Official references:

Cost examples

Text is usually cheap. Vision-heavy workloads cost more because images and video are converted into tokens that count against the same context window and input-token rate.

Request Input tokens Output tokens Approx cost
Text-only prompt 10,000 2,000 ~$0.007
One 1080p screenshot + prompt ~1,500 300 ~$0.001
30s video sampled at 2 fps ~77,000 500 ~$0.032

These frame-token figures are approximate and depend on resolution and sampling rate.

Practical cost controls:

  • Downscale screenshots before sending.
  • Crop screenshots to the relevant UI region.
  • Sample fewer video frames.
  • Avoid sending duplicate context.
  • Cache repeated prompt prefixes where supported.
  • Track token usage in responses.

For broader cost strategy, see:

Rate limits and errors

Model Studio enforces per-account rate limits. Limits vary by:

  • Account tier
  • Region
  • Requests per minute
  • Tokens per minute

Check the quota page in the Model Studio console for your current values. If you hit them, request an increase from the console.

Common API errors

Error Common cause Fix
401 Unauthorized Wrong key or key from the wrong region Verify the API key and base URL region
429 Too Many Requests Rate limit exceeded Retry with exponential backoff
400 Bad Request Malformed multimodal payload, oversized image, or context overflow Validate payload shape and media size
5xx Temporary service-side issue Retry with backoff

Basic retry pattern

import time
from openai import OpenAI

def call_with_retry(client: OpenAI, payload: dict, max_retries: int = 5):
    for attempt in range(max_retries):
        try:
            return client.chat.completions.create(**payload)
        except Exception as exc:
            wait = 2 ** attempt

            if attempt == max_retries - 1:
                raise

            print(f"Request failed: {exc}. Retrying in {wait}s...")
            time.sleep(wait)
Enter fullscreen mode Exit fullscreen mode

Use this pattern for 429 and transient 5xx failures. For 400 and 401, fix the request instead of retrying blindly.

Test and mock the API with Apidog

Multimodal payloads are easy to get wrong. Common mistakes include:

  • Incorrectly nested content arrays
  • Invalid base64 image data
  • Wrong media part names
  • Oversized images
  • Region/key mismatches
  • Tool-call responses that are hard to inspect from terminal logs

Testing Qwen 3.7 Plus with Apidog

Apidog gives you a workspace for testing the Qwen 3.7 Plus API.

You can use it to:

  • Send requests to /chat/completions
  • Add image and video parts to request bodies
  • Store your Model Studio key per environment
  • Inspect raw JSON responses
  • Save working request examples
  • Mock the endpoint while your frontend or agent workflow is still under development

When Qwen 3.7 Plus is used inside GUI or CLI agent flows, Apidog’s AI agent debugger helps inspect the full sequence and identify where a run failed.

Download Apidog to test, debug, and mock the Qwen 3.7 Plus API before it reaches production.

FAQ

Is there a free tier for the Qwen 3.7 Plus API?

No. There is no perpetual free tier. New Alibaba Cloud Model Studio accounts get a one-time free token quota for evaluation, usually in the Singapore region. After that, billing moves to pay-as-you-go.

What is the model ID?

Use:

qwen3.7-plus
Enter fullscreen mode Exit fullscreen mode

Confirm the current string in the Model Studio model list before shipping, because model identifiers can change.

How is image and video cost calculated?

Visual content is converted to input tokens. Those tokens are billed at the standard input rate and count against the context window.

A 1080p screenshot can cost a few thousand tokens. Video adds tokens per sampled frame, so large media payloads can dominate the bill.

How is Qwen 3.7 Plus different from Qwen 3.7 Max?

Both use the same OpenAI-compatible API shape and base URLs.

Qwen 3.7 Plus:

  • Accepts text, image, and video input
  • Costs less
  • Is better suited to budget multimodal workflows

Qwen 3.7 Max:

  • Is text-only
  • Costs more
  • Keeps a small edge on pure-text benchmarks

Can I self-host Qwen 3.7 Plus?

No. The weights are closed. Qwen 3.7 Plus runs only through Alibaba Cloud Model Studio.

Which base URL should I use?

Use the base URL matching the region where you created your API key:

  • Singapore: https://dashscope-intl.aliyuncs.com/compatible-mode/v1
  • US / Virginia: https://dashscope-us.aliyuncs.com/compatible-mode/v1
  • Beijing / China: https://dashscope.aliyuncs.com/compatible-mode/v1

A key from one region will not authenticate against another region’s endpoint.

The bottom line

Qwen 3.7 Plus is straightforward to integrate if you already use OpenAI-style APIs: swap the base URL, pass your DashScope key, set the model ID, and add image or video parts when needed.

The main implementation risk is not the API shape. It is cost and payload control. Downscale images, sample video carefully, watch token usage, and test the full request/response flow before production.

Use Apidog to validate requests, inspect responses, and mock the Qwen 3.7 Plus endpoint while you build.

Top comments (0)