Skip to content

Qwen-Long

Reference, synced 2026-06-13.

flowchart TD
  n0["Models"]
  n1["Overview"]
  n2["Products"]
  n3["Solutions"]
  n4["Pricing"]
  n5["Resources"]
  n6["Partners"]
  n7["Support"]
  n8["Language"]
  n0 --> n1
  n1 --> n2
  n2 --> n3
  n3 --> n4
  n4 --> n5
  n5 --> n6
  n6 --> n7
  n7 --> n8

Free access Accelerate Delivery with Fixed-Cost Agentic CodingWatch how it works

Models

Empowering AI innovation for both enterprises and developers with Alibaba Cloud’s best-in-class Qwen models, AI-native apps, and AI solutions.

Alibaba Cloud Model Studio \ Enterprise-grade large model service and application development platform.

Try Visual Model \ Supports image understanding, image generation, and video generation.

Models

HappyHorse-1.0-T2V \ Cinematic creative generation, ultimate dynamic details Qwen3-VL-Plus \ Native VL, spatial reasoning, 1M-context video analysis Wan2.7-VideoEdit \ Supports both localized and global editing with prompt

Qwen3.6-Plus \ Native multimodal, 1M context, agentic coding Wan2.7-Image-Pro \ Interactive editing, long-text rendering, precise prompt following Qwen-Plus \ Balanced intelligence, efficient inference, production-ready performance

Qwen-Image-2.0 \ Professional infographics, exquisite photorealism Z-Image-Turbo \ Ultra-fast image generation, high throughput, cost-optimized inference Qwen3-Coder-Next \ Multi-turn tool interactions, future-ready development support

Wan2.7-T2V \ High-fidelity T2V, 15s duration, advanced camera control Wan2.7-I2V \ Cinematic I2V with emotional depth and visceral impact Wan2.7-R2V \ Up to 5 mixed image/video inputs and audio timbre cloning

GenAI Application

Qoder \ Intelligent coding assistant, available for enterprise-dedicated deployment. Qoder CN \ AI-powered coding assistant that boosts developer productivity with intelligent code completion, AI chat, multi-file editing, and task automation.

AI Service

Model Experience \ Experience full-scale, multimodal model capabilities online. Platform for AI \ An AI-native algorithm engineering platform for end-to-end modeling, training, and inference service deployment. Fine-tune Video Generation Model \ Customize Wan’s text-to-video capabilities through model fine-tuning to meet your unique requirements.

AI Use Case

AI Savings Plan Hot \ Save up to 47% on AI costs. Limited-time offer tailored to your usage. AI Video Creation \ Elevate your professional video production with Wan 2.6.

AI Token Plan \ One plan. Multiple models. Big Savings with a Fixed Subscription. AI Image Creation \ All-in-one creative suite for copywriting, image generation, and poster design.

Overview

As a global full-stack AI leader, Alibaba Cloud aims to make computing accessible to everyone and help worldwide customers accelerate innovation.

Why Alibaba Cloud

About Alibaba Cloud \ AI Powered Cloud Technology Our Global Network \ Explore our global presence and deployment regions around the world Our Global Offices \ With offices in 4 continents, we're always close to where it matters.

Asia Accelerator \ Accelerate Success in Asia with Alibaba Cloud Go Global \ Benefits of our Global Alliance Trust Center \ Empowering enterprises with a secure, compliant, and globally trusted cloud infrastructure

Customers and Insights

Olympic Games \ Alibaba Cloud Powers Olympic Games with AI-powered cloud technology Case Studies \ Learn how customers are scaling their businesses on Alibaba Cloud Analyst Reports \ Learn what the top industry analyst firms are saying about Alibaba Cloud

What's New

Events and Webinars \ Quick access to upcoming and on-demand events Product Updates \ Stay informed of the latest innovations Press Room \ Latest news and media releases

Products

Featured ProductsAI & Machine Learning Computing Container Storage Networking & CDN Security Middleware Database Analytics ComputingMedia ServicesEnterprise Services & Cloud CommunicationDomain Names and WebsitesEnd User ComputingServerlessDeveloper ToolsMigration & O&M ManagementApsara Stack

Alibaba Cloud Model Studio \ Supercharge your AI journey effortlessly with industry-leading GenAI models ApsaraDB RDS \ Store and manage your business data, with automated monitoring and backups Certificate Management Service (Original SSL Certificate) \ Create a safe and secure connection between your website and users

Elastic Compute Service (ECS) \ Host websites anywhere and scale enterprise workloads Container Service for Kubernetes (ACK) \ Run and scale containerized applications on managed Kubernetes infrastructure Object Storage Service (OSS) \ Store large amounts of data in the cloud and access it anywhere, anytime

Simple Application Server (SAS) \ All-in-one services for fast deployment Elastic IP Address (EIP) \ Manage your public IPs independently to improve internet network quality Domain Names and Website \ Get the perfect domain name to suit your every need

Solutions

Solutions by Industry Technical Solutions AI WebsitesNetworking Security and ComplianceData and AnalyticsEnterprise Service and ApplicationCloud MigrationCloud NativeHybrid CloudSMB solutions

Financial Services \ Innovate faster with Alibaba Cloud Games \ Grow your game rapidly with high global availability

New Retail \ Alibaba Cloud enables digital retail transformation to fuel growth and realize an omnichannel customer experience throughout the consumer journey. Media and Entertainment \ Ready your content for today's media market with a digitalized media journey

Supply Chain \ Power your supply chain with intelligent, efficient, and reliable solutions Sports \ Digitizing the sports industry with intelligent tech

Sustainability \ Achieve a sustainable future with low-carbon and energy-efficient technologies

Pricing

Flexible options like pay-as-you-go and clear billing rules to meet diverse business needs.

Overview & Tools

Pricing Calculator \ Get an instant pricing estimate based on your usage and needs Free Trial \ Try our 80+ cloud products for free.

Pricing Options \ Get the most out of Alibaba Cloud with flexible pricing

Optimize your cost

Migrate & Save \ Superior Performance At Lower Pricing. Save up to 50%. Promotion Center \ Unlock the latest Alibaba Cloud offers & promos

Resources

Official documentation, extensive tools, training resources, and a community to grow and innovate in the cloud.

Technical Resources

Documentation \ Product guides and FAQs Architecture Center \ Design reliable, secure, and efficient cloud architecture. Intelligent Solution Explorer \ Find the right solution for you, powered by AI

Blog \ Latest cloud insights and developer trends Whitepapers \ Research that explores the how and why behind our technology

Training&Certification

Alibaba Cloud Academy \ Build cloud skills and earn certifications with expert-led training.

Developer Hub

Alibaba Cloud Project Hub \ Explore real-world projects built by developers using our platform. Our Developer MVPs \ Celebrating the developers who lead, build, and inspire our community

Partners

Partner-first strategy offering collaborative product, sales, and service models, plus high-quality partner solutions that complement Alibaba Cloud’s capabilities.

Marketplace

AI Alliance for ISVs \ Partner with us to build and grow AI solutions together ISV Benefits \ Unlock resources, market access, and go-to-market support as an ISV partner

Alibaba Cloud Marketplace \ Explore ready-to-deploy solutions from our partners and ISVs

Find a Partner

Partner Hub \ Find your ideal partner in no time

Become a Partner

Partner Network \ A partner portal for Alibaba Cloud Channel, Technology, MSP partner and other partner programs

Support

Full-lifecycle support and expert services, from cloud advisory and migration to operations.

Support & Professional Services

Professional Services \ Expert-led services to design, migrate, and optimize your cloud journey Support Plans \ Flexible support for every stage — from startup to enterprise

Partner Support Program \ Priority technical support for partners, with dedicated managers and faster issue resolution

Contact us

Connect With Us \

Talk to a sales expert and get a custom quote for your business

Language

  • English
  • 简体中文
  • 繁體中文
  • 日本語
  • Bahasa Indonesia

Locale

Visit aliyun.com

Documentation

Alibaba Cloud Model Studio

User Guide (Models) User Guide (Application) API Reference (Models) API Reference (Application)

Search for Help Content

Getting Started

The Beginner's Guide

Well-Architected Framework

AI & Machine Learning

Platform For AI

Alibaba Cloud Model Studio

DashVector

Artificial Intelligence Recommendation

OpenSearch

Image Search

Machine Translation

Intelligent Speech Interaction

Optimization Solver

Intelligent Computing LINGJUN

Computing

Elastic Compute Service

Elastic GPU Service

Elastic Container Instance

Dedicated Host

Compute Nest

Simple Application Server

Cloud Box

Auto Scaling

Elastic High Performance Computing

Batch Compute (Deprecated)

Function Compute

Serverless App Engine

ENS

Elastic Desktop Service

App Streaming

WUYING Terminal

Cloud Phone

Edge Network Acceleration

Alibaba Cloud Linux

AgentBay

Container

Container Service for Kubernetes

Container Compute Service

Container Registry

Storage

Object Storage Service

Cloud Parallel File Storage

File Storage NAS

Tablestore

Storage Capacity Unit

Simple Log Service

Cloud Backup

Intelligent Media Management

Drive and Photo Service

Data Transport

Cloud Storage Gateway

Data Online Migration

Hybrid Cloud Storage Array

Storage Services Overview

Backup and Disaster Recovery Center

Networking and CDN

Server Load Balancer

Elastic IP Address

Internet Shared Bandwidth

Data Transfer Plan

Virtual Private Cloud

NAT Gateway

PrivateLink

Alibaba Cloud DNS PrivateZone

Network Intelligence Service

Cloud Data Transfer

IPv6 Gateway

Anycast Elastic IP Address

Cloud Enterprise Network

Global Accelerator

VPN Gateway

Smart Access Gateway

Express Connect

CDN

Edge Security Acceleration

Cloud Network Well-architected Design Guidelines

Security

Anti-DDoS

Web Application Firewall

Cloud Firewall

Security Center

Bastionhost

Secure Access Service Edge

Certificate Management Service

Key Management Service

Data Security Center

Identity as a Service

Fraud Detection

AI Guardrails

Captcha

Blockchain as a Service

ID Verification

Managed Security Service

Middleware

Enterprise Distributed Application Service

Microservices Engine

Alibaba Cloud Service Mesh

SchedulerX

ApsaraMQ for RocketMQ

ApsaraMQ for Kafka

ApsaraMQ for RabbitMQ

ApsaraMQ for MQTT

Simple Message Queue (formerly MNS)

CloudFlow

EventBridge

Application Real-Time Monitoring Service

Managed Service for Prometheus

Managed Service for Grafana

Managed Service for OpenTelemetry

Performance Testing

Databases

ApsaraDB Console

PolarDB

ApsaraDB RDS

ApsaraDB for OceanBase (Deprecated)

Tair (Redis® OSS-Compatible)

Lindorm

Time Series Database

ApsaraDB for MongoDB

ApsaraDB for HBase

ApsaraDB for Memcache

ApsaraDB for MyBase

AnalyticDB

ApsaraDB for ClickHouse

ApsaraDB for SelectDB

Data Transmission Service

Database Autonomy Service

Data Management

Database Gateway - Deprecated

ApsaraDB for Cassandra - Deprecated

Analytics Computing

MaxCompute

Hologres

Realtime Compute for Apache Flink

Elasticsearch

Vector Retrieval Service for Milvus

E-MapReduce

Data Lake Formation

DataV

Quick BI

Quick Audience

Quick Tracking

DataWorks

DataHub

Dataphin

Media Services

ApsaraVideo VOD

ApsaraVideo Live

Intelligent Media Services

ApsaraVideo Media Processing

Apsara Video SDK

Enterprise Services & Cloud Communication

Energy Expert

CloudQuotation

Salesforce on Alibaba Cloud

GoChina ICP Filing Assistant

Marketplace

Alibaba Mail

Direct Mail

Short Message Service

Voice Service

Phone Number Verification Service

Cell Phone Number Service

Chat App Message Service

Financial Intelligence Engine

Domain Names and Websites

Domain Names

ICP Filing

Alibaba Cloud DNS

End User Computing

Elastic Desktop Service

App Streaming

WUYING Terminal

Cloud Phone

AgentBay

Internet of Things

IoT Platform

Serverless

Serverless App Engine

CloudFlow

EventBridge

Simple Message Queue (formerly MNS)

Function Compute

Developer Tools

OpenAPI Explorer

Alibaba Cloud SDK

Cloud Shell

Resource Orchestration Service

Alibaba Cloud CLI

BSS OpenAPI

Terraform

Pulumi

Ticket System API

Mobile Platform as a Service

Alibaba Cloud DevOps

API Gateway

Cloud Control API

AI Coding Assistant Lingma

Cloud Skills Portal

Migration & O&M Management

CloudOps Orchestration Service

Cloud Monitor

Intelligent Advisor

Cloud Governance Center

ActionTrail

Cloud Config

Resource Access Management

Resource Management

Cloud Architect Design Tools

Migration Hub

Server Migration Center

Service Catalog

Logic Composer

Quota Center

CloudSSO

HTTPDNS

Solutions

SAP

SuperApp

OpenLake

Membership Service

Expenses and Costs

Account Center

More

Support

Legal

Tech Share Terms and Conditions

After Sales Support

China Gateway Program

Service Level Objectives

Management Console

Security Control

This topic was translated by AI and is currently in queue for revision by our editors. Alibaba Cloud does not guarantee the accuracy of AI-translated content. Request expedited revision

Qwen-Long handles documents up to 10 million tokens through a file upload and reference mechanism, overcoming standard model context limits.

Note

This document applies only to the Chinese mainland (Beijing) region. To use the model, you must use an API key from the Chinese mainland (Beijing) region.

How to use

Use Qwen-Long in two steps: upload files, then call the API.

  1. File upload and parsing:
    • Upload a file using the API. For details about supported file formats and size limits, see Supported formats.

    • After a successful upload, the system returns a uniquefile-id for your account and starts parsing. No fees are charged for file upload, storage, or parsing.

  2. API call and billing:
    • When you call the model, reference one or more file-ids in the system message.

    • The model performs inference based on the text content associated with the file-id.

    • For each API call, the number of tokens in the referenced file content is counted as input tokens for that request.

This avoids transferring large files in each request, but note that file tokens are billed per API call.

Getting started

Prerequisites

  • Obtain an API key and configure it as an environment variable.

  • To call the model via SDK, install the OpenAI SDK.

Upload a document

This example uploads Model_Studio_Phone_Product_Introduction.docx to Model Studio's secure storage via the OpenAI-compatible interface and gets a file-id. See the API documentation for upload parameters.

Python

Java

curl

python
import os
from pathlib import Path
from openai import OpenAI

client = OpenAI(
    api_key=os.getenv("DASHSCOPE_API_KEY"),  # If not configured, replace with your API key.
    base_url="https://dashscope.aliyuncs.com/compatible-mode/v1",  # Enter the base_url of the DashScope service.
)

file_object = client.files.create(file=Path("Model_Studio_Phone_Product_Introduction.docx"), purpose="file-extract")
print(file_object.id)
java
import com.openai.client.OpenAIClient;
import com.openai.client.okhttp.OpenAIOkHttpClient;
import com.openai.models.files.*;

import java.nio.file.Path;
import java.nio.file.Paths;

public class Main {
    public static void main(String[] args) {
        // Create a client and use the API key from the environment variable.
        OpenAIClient client = OpenAIOkHttpClient.builder()
                // If you have not configured the environment variable, replace the following line with: .apiKey("sk-xxx")
                .apiKey(System.getenv("DASHSCOPE_API_KEY"))
                .baseUrl("https://dashscope.aliyuncs.com/compatible-mode/v1")
                .build();
        // Set the file path. Modify the path and filename as needed.
        Path filePath = Paths.get("src/main/java/org/example/Model_Studio_Phone_Product_Introduction.docx");
        // Create file upload parameters.
        FileCreateParams fileParams = FileCreateParams.builder()
                .file(filePath)
                .purpose(FilePurpose.of("file-extract"))
                .build();

        // Upload the file and print the file-id.
        FileObject fileObject = client.files().create(fileParams);
        System.out.println(fileObject.id());
    }
}
curl
curl --location --request POST 'https://dashscope.aliyuncs.com/compatible-mode/v1/files' \
  --header "Authorization: Bearer $DASHSCOPE_API_KEY" \
  --form 'file=@"Alibaba Cloud Model Studio Phone Series Product Introduction.docx"' \
  --form 'purpose="file-extract"'

Run the code to obtain the file-id for the uploaded file.

Pass information and chat using a file ID

Pass the file-id in system messages: first message defines the role, second contains the file-id, then add user questions.

Longer documents need more parsing time. Wait for parsing to complete before calling.

Python

Java

curl

python
import os
from openai import OpenAI, BadRequestError

client = OpenAI(
    api_key=os.getenv("DASHSCOPE_API_KEY"),  # If not configured, replace with your API key.
    base_url="https://dashscope-intl.aliyuncs.com/compatible-mode/v1",  # Enter the base_url of the DashScope service.
)
try:
    # Initialize messages list.
    completion = client.chat.completions.create(
        model="qwen-long",
        messages=[\
            # sys1: Role definition.\
            {'role': 'system', 'content': 'You are a helpful assistant.'},\
            # sys2: Document content (plain text or file-id).\
            # Replace '{FILE_ID}' with the file-id used in your conversation.\
            {'role': 'system', 'content': f'fileid://{FILE_ID}'},\
            # When the request includes a second system message, the user message content is limited to 9,000 tokens.\
            {'role': 'user', 'content': 'What is this article about?'}\
        ],
        # All examples use streaming output to show the model's response process. For non-streaming examples, see https://www.alibabacloud.com/help/en/model-studio/text-generation
        stream=True,
        stream_options={"include_usage": True}
    )

    full_content = ""
    for chunk in completion:
        if chunk.choices and chunk.choices[0].delta.content:
            # Concatenate the output content.
            full_content += chunk.choices[0].delta.content
            print(chunk.model_dump())

        # Get token usage.
        if chunk.usage:
            print(f"Total tokens: {chunk.usage.total_tokens}")

    print(full_content)

except BadRequestError as e:
    print(f"Error: {e}")
    print("See documentation: https://www.alibabacloud.com/help/en/model-studio/error-code")
java
import com.openai.client.OpenAIClient;
import com.openai.client.okhttp.OpenAIOkHttpClient;
import com.openai.core.http.StreamResponse;
import com.openai.models.chat.completions.*;

public class Main {
    public static void main(String[] args) {
        // Create a client and use the API key from the environment variable.
        OpenAIClient client = OpenAIOkHttpClient.builder()
                // If you have not configured the environment variable, replace the following line with: .apiKey("sk-xxx")
                .apiKey(System.getenv("DASHSCOPE_API_KEY"))
                .baseUrl("https://dashscope-intl.aliyuncs.com/compatible-mode/v1")
                .build();

        // Create a chat request.
        ChatCompletionCreateParams chatParams = ChatCompletionCreateParams.builder()
                //sys1: Role definition.
                .addSystemMessage("You are a helpful assistant.")
                //sys2: Document content (plain text or file-id).
                //Replace '{FILE_ID}' with the file-id used in your conversation.
                .addSystemMessage("fileid://{FILE_ID}")
                //When the request includes a second system message, the user message content is limited to 9,000 tokens.
                .addUserMessage("What is this article about?")
                .model("qwen-long")
                .build();

        StringBuilder fullResponse = new StringBuilder();

        // All examples use streaming output to show the model's response process. For non-streaming examples, see https://www.alibabacloud.com/help/en/model-studio/text-generation
        try (StreamResponse<ChatCompletionChunk> streamResponse = client.chat().completions().createStreaming(chatParams)) {
            streamResponse.stream().forEach(chunk -> {
                // Print and concatenate the content of each chunk.
                System.out.println(chunk);
                String content = chunk.choices().get(0).delta().content().orElse("");
                if (!content.isEmpty()) {
                    fullResponse.append(content);
                }
            });
            System.out.println(fullResponse);
        } catch (Exception e) {
            System.err.println("Error: " + e.getMessage());
            System.err.println("See documentation: https://www.alibabacloud.com/help/en/model-studio/error-code");
        }
    }
}
curl
curl --location 'https://dashscope-intl.aliyuncs.com/compatible-mode/v1/chat/completions' \
--header "Authorization: Bearer $DASHSCOPE_API_KEY" \
--header "Content-Type: application/json" \
--data '{
    "model": "qwen-long",
    "messages": [\
        {"role": "system","content": "You are a helpful assistant."},\
        {"role": "system","content": "fileid://file-fe-xxx"},\
        {"role": "user","content": "What is this article about?"}\
    ],
    "stream": true,
    "stream_options": {
        "include_usage": true
    }
}'

Pass multiple documents

Pass multiple file-ids in one system message or add separate system messages for each document.

Pass multiple documents

Append documents

Python

Java

curl

python
import os
from openai import OpenAI, BadRequestError

client = OpenAI(
    api_key=os.getenv("DASHSCOPE_API_KEY"),  # If not configured, replace with your API key.
    base_url="https://dashscope-intl.aliyuncs.com/compatible-mode/v1",  # Enter the base_url of the DashScope service.
)
try:
    # Initialize messages list.
    completion = client.chat.completions.create(
        model="qwen-long",
        messages=[\
            {'role': 'system', 'content': 'You are a helpful assistant.'},\
            # Replace '{FILE_ID1}' and '{FILE_ID2}' with the file-ids used in your conversation.\
            {'role': 'system', 'content': f"fileid://{FILE_ID1},fileid://{FILE_ID2}"},\
            {'role': 'user', 'content': 'What are these articles about?'}\
        ],
        # All examples use streaming output to show the model's response process. For non-streaming examples, see https://www.alibabacloud.com/help/en/model-studio/text-generation
        stream=True,
        stream_options={"include_usage": True}
    )

    full_content = ""
    for chunk in completion:
        if chunk.choices and chunk.choices[0].delta.content:
            # Concatenate the output content.
            full_content += chunk.choices[0].delta.content
            print(chunk.model_dump())

    print(full_content)

except BadRequestError as e:
    print(f"Error: {e}")
    print("See documentation: https://www.alibabacloud.com/help/en/model-studio/error-code")
java
import com.openai.client.OpenAIClient;
import com.openai.client.okhttp.OpenAIOkHttpClient;
import com.openai.core.http.StreamResponse;
import com.openai.models.chat.completions.*;

public class Main {
    public static void main(String[] args) {
        // Create a client and use the API key from the environment variable.
        OpenAIClient client = OpenAIOkHttpClient.builder()
                .apiKey(System.getenv("DASHSCOPE_API_KEY"))
                .baseUrl("https://dashscope-intl.aliyuncs.com/compatible-mode/v1")
                .build();

        // Create a chat request.
        ChatCompletionCreateParams chatParams = ChatCompletionCreateParams.builder()
                .addSystemMessage("You are a helpful assistant.")
                //Replace '{FILE_ID1}' and '{FILE_ID2}' with the file-ids used in your conversation.
                .addSystemMessage("fileid://{FILE_ID1},fileid://{FILE_ID2}")
                .addUserMessage("What are these two articles about?")
                .model("qwen-long")
                .build();

        StringBuilder fullResponse = new StringBuilder();

        // All examples use streaming output to show the model's response process. For non-streaming examples, see https://www.alibabacloud.com/help/en/model-studio/text-generation
        try (StreamResponse<ChatCompletionChunk> streamResponse = client.chat().completions().createStreaming(chatParams)) {
            streamResponse.stream().forEach(chunk -> {
                // The content of each chunk.
                System.out.println(chunk);
                String content = chunk.choices().get(0).delta().content().orElse("");
                if (!content.isEmpty()) {
                    fullResponse.append(content);
                }
            });
            System.out.println("\nFull response content:");
            System.out.println(fullResponse);
        } catch (Exception e) {
            System.err.println("Error: " + e.getMessage());
            System.err.println("See documentation: https://www.alibabacloud.com/help/en/model-studio/error-code");
        }
    }
}
curl
curl --location 'https://dashscope-intl.aliyuncs.com/compatible-mode/v1/chat/completions' \
--header "Authorization: Bearer $DASHSCOPE_API_KEY" \
--header "Content-Type: application/json" \
--data '{
    "model": "qwen-long",
    "messages": [\
        {"role": "system","content": "You are a helpful assistant."},\
        {"role": "system","content": "fileid://file-fe-xxx1"},\
        {"role": "system","content": "fileid://file-fe-xxx2"},\
        {"role": "user","content": "What are these two articles about?"}\
    ],
    "stream": true,
    "stream_options": {
        "include_usage": true
    }
}'

Python

Java

curl

python
import os
from openai import OpenAI, BadRequestError

client = OpenAI(
    api_key=os.getenv("DASHSCOPE_API_KEY"),  # If not configured, replace with your API key.
    base_url="https://dashscope-intl.aliyuncs.com/compatible-mode/v1",  # Enter the base_url of the DashScope service.
)
# Initialize the messages list.
messages = [\
    {'role': 'system', 'content': 'You are a helpful assistant.'},\
    # Replace '{FILE_ID1}' with the file-id used in your conversation.\
    {'role': 'system', 'content': f'fileid://{FILE_ID1}'},\
    {'role': 'user', 'content': 'What is this article about?'}\
]

try:
    # First-round response
    completion_1 = client.chat.completions.create(
        model="qwen-long",
        messages=messages,
        stream=False
    )
    # Print first-round response.
    # To stream: set stream=True, concatenate segments, and pass to assistant_message content.
    print(f"First-round response: {completion_1.choices[0].message.model_dump()}")
except BadRequestError as e:
    print(f"Error: {e}")
    print("See documentation: https://www.alibabacloud.com/help/en/model-studio/error-code")

# Construct the assistant_message.
assistant_message = {
    "role": "assistant",
    "content": completion_1.choices[0].message.content}

# Add assistant_message to messages.
messages.append(assistant_message)

# Add the file-id of the appended document to messages.
# Replace '{FILE_ID2}' with the file-id used in your conversation.
system_message = {'role': 'system', 'content': f'fileid://{FILE_ID2}'}
messages.append(system_message)

# Add the user's question.
messages.append({'role': 'user', 'content': 'What are the similarities and differences between the methods discussed in these two articles?'})

# Response after appending the document.
completion_2 = client.chat.completions.create(
    model="qwen-long",
    messages=messages,
    # All code examples use streaming output to clearly and intuitively show the model output process. For non-streaming output examples, see https://www.alibabacloud.com/help/en/model-studio/text-generation
    stream=True,
    stream_options={
        "include_usage": True
    }
)

# Stream and print the response after appending the document.
print("Response after appending the document:")
for chunk in completion_2:
    print(chunk.model_dump())
java
import com.openai.client.OpenAIClient;
import com.openai.client.okhttp.OpenAIOkHttpClient;
import com.openai.models.chat.completions.*;
import com.openai.core.http.StreamResponse;

import java.util.ArrayList;
import java.util.List;

public class Main {
    public static void main(String[] args) {
        OpenAIClient client = OpenAIOkHttpClient.builder()
                .apiKey(System.getenv("DASHSCOPE_API_KEY"))
                .baseUrl("https://dashscope-intl.aliyuncs.com/compatible-mode/v1")
                .build();
        // Initialize messages list.
        List<ChatCompletionMessageParam> messages = new ArrayList<>();

        // Add information for role setting.
        ChatCompletionSystemMessageParam roleSet = ChatCompletionSystemMessageParam.builder()
                .content("You are a helpful assistant.")
                .build();
        messages.add(ChatCompletionMessageParam.ofSystem(roleSet));

        // Replace '{FILE_ID1}' with the file-id used in your conversation.
        ChatCompletionSystemMessageParam systemMsg1 = ChatCompletionSystemMessageParam.builder()
                .content("fileid://{FILE_ID1}")
                .build();
        messages.add(ChatCompletionMessageParam.ofSystem(systemMsg1));

        // User question message (USER role).
        ChatCompletionUserMessageParam userMsg1 = ChatCompletionUserMessageParam.builder()
                .content("Please summarize the article content.")
                .build();
        messages.add(ChatCompletionMessageParam.ofUser(userMsg1));

        // Construct the first-round request and handle exceptions.
        ChatCompletion completion1;
        try {
            completion1 = client.chat().completions().create(
                    ChatCompletionCreateParams.builder()
                            .model("qwen-long")
                            .messages(messages)
                            .build()
            );
        } catch (Exception e) {
            System.err.println("Request error. See error code page:");
            System.err.println("https://www.alibabacloud.com/help/en/model-studio/error-code");
            System.err.println("Error details: " + e.getMessage());
            e.printStackTrace();
            return;
        }

        // First-round response.
        String firstResponse = completion1 != null ? completion1.choices().get(0).message().content().orElse("") : "";
        System.out.println("First-round response: " + firstResponse);

        // Construct AssistantMessage.
        ChatCompletionAssistantMessageParam assistantMsg = ChatCompletionAssistantMessageParam.builder()
                .content(firstResponse)
                .build();
        messages.add(ChatCompletionMessageParam.ofAssistant(assistantMsg));

        // Replace '{FILE_ID2}' with the file-id used in your conversation.
        ChatCompletionSystemMessageParam systemMsg2 = ChatCompletionSystemMessageParam.builder()
                .content("fileid://{FILE_ID2}")
                .build();
        messages.add(ChatCompletionMessageParam.ofSystem(systemMsg2));

        // Second-round user question (USER role).
        ChatCompletionUserMessageParam userMsg2 = ChatCompletionUserMessageParam.builder()
                .content("Please compare the structural differences between the two articles.")
                .build();
        messages.add(ChatCompletionMessageParam.ofUser(userMsg2));

        // All examples use streaming output to show the model's response process. For non-streaming examples, see https://www.alibabacloud.com/help/en/model-studio/text-generation
        StringBuilder fullResponse = new StringBuilder();
        try (StreamResponse<ChatCompletionChunk> streamResponse = client.chat().completions().createStreaming(
                ChatCompletionCreateParams.builder()
                        .model("qwen-long")
                        .messages(messages)
                        .build())) {

            streamResponse.stream().forEach(chunk -> {
                String content = chunk.choices().get(0).delta().content().orElse("");
                if (!content.isEmpty()) {
                    fullResponse.append(content);
                }
            });
            System.out.println("\nFinal response:");
            System.out.println(fullResponse.toString().trim());
        } catch (Exception e) {
            System.err.println("Error: " + e.getMessage());
            System.err.println("See documentation: https://www.alibabacloud.com/help/en/model-studio/error-code");
        }
    }
}
curl
curl --location 'https://dashscope-intl.aliyuncs.com/compatible-mode/v1/chat/completions' \
--header "Authorization: Bearer $DASHSCOPE_API_KEY" \
--header "Content-Type: application/json" \
--data '{
    "model": "qwen-long",
    "messages": [\
        {"role": "system","content": "You are a helpful assistant."},\
        {"role": "system","content": "fileid://file-fe-xxx1"},\
        {"role": "user","content": "What is this article about?"},\
        {"role": "system","content": "fileid://file-fe-xxx2"},\
        {"role": "user","content": "What are the similarities and differences between the methods discussed in these two articles?"}\
    ],
    "stream": true,
    "stream_options": {
        "include_usage": true
    }
}'

Pass information as plain text

Instead of using file-ids, pass document content directly as a string. Add role settings in the first message to prevent confusion with document content.

If document content exceeds 1 million tokens, use a file ID instead due to API size limits.

Simple example

Pass multiple documents

Append documents

You can input the document content directly into the System Message.

Python

Java

curl

python
import os
from openai import OpenAI

client = OpenAI(
    api_key=os.getenv("DASHSCOPE_API_KEY"),  # Replace your API key here if you haven't set the environment variable
    base_url="https://dashscope-intl.aliyuncs.com/compatible-mode/v1",  # Set the DashScope service base_url
)
# Initialize the messages list
completion = client.chat.completions.create(
    model="qwen-long",
    messages=[\
        {'role': 'system', 'content': 'You are a helpful assistant.'},\
        {'role': 'system', 'content': 'Alibaba Cloud Model Studio smartphone product introduction: Alibaba Cloud Model Studio X1 —————— Enjoy an ultimate visual experience: features a 6.7-inch 1440 x 3200 pixel ultra-clear screen...'},\
        {'role': 'user', 'content': 'What does the article talk about?'}\
    ],
    # All code examples use streaming output to clearly and intuitively show the model's output process. For non-streaming examples, see https://www.alibabacloud.com/help/en/model-studio/text-generation
    stream=True,
    stream_options={"include_usage": True}
)

full_content = ""
for chunk in completion:
    if chunk.choices and chunk.choices[0].delta.content:
        # Append output content
        full_content += chunk.choices[0].delta.content
        print(chunk.model_dump())

print(full_content)
java
import com.openai.client.OpenAIClient;
import com.openai.client.okhttp.OpenAIOkHttpClient;
import com.openai.core.http.StreamResponse;

import com.openai.models.chat.completions.*;

public class Main {
    public static void main(String[] args) {
        // Create a client using the API key from the environment variable
        OpenAIClient client = OpenAIOkHttpClient.builder()
                .apiKey(System.getenv("DASHSCOPE_API_KEY"))
                .baseUrl("https://dashscope-intl.aliyuncs.com/compatible-mode/v1")
                .build();

        // Create a chat request
        ChatCompletionCreateParams chatParams = ChatCompletionCreateParams.builder()
                .addSystemMessage("You are a helpful assistant.")
                .addSystemMessage("Alibaba Cloud Model Studio smartphone product introduction: Alibaba Cloud Model Studio X1 —————— Enjoy an ultimate visual experience: features a 6.7-inch 1440 x 3200 pixel ultra-clear screen...")
                .addUserMessage("What does this article talk about?")
                .model("qwen-long")
                .build();

        StringBuilder fullResponse = new StringBuilder();

        // All examples use streaming output to show the model's response process. For non-streaming examples, see https://www.alibabacloud.com/help/en/model-studio/text-generation
        try (StreamResponse<ChatCompletionChunk> streamResponse = client.chat().completions().createStreaming(chatParams)) {
            streamResponse.stream().forEach(chunk -> {
                // Print and append each chunk's content
                System.out.println(chunk);
                String content = chunk.choices().get(0).delta().content().orElse("");
                if (!content.isEmpty()) {
                    fullResponse.append(content);
                }
            });
            System.out.println(fullResponse);
        } catch (Exception e) {
            System.err.println("Error: " + e.getMessage());
            System.err.println("For more information, see https://www.alibabacloud.com/help/en/model-studio/error-code");
        }
    }
}
curl
curl --location 'https://dashscope-intl.aliyuncs.com/compatible-mode/v1/chat/completions' \
--header "Authorization: Bearer $DASHSCOPE_API_KEY" \
--header "Content-Type: application/json" \
--data '{
    "model": "qwen-long",
    "messages": [\
        {"role": "system","content": "You are a helpful assistant."},\
        {"role": "system","content": "Alibaba Cloud Model Studio X1 —— Enjoy an ultimate visual experience: features a 6.7-inch 1440 x 3200 pixel ultra-clear screen with a 120Hz refresh rate, ..."},\
        {"role": "user","content": "What does this article talk about?"}\
    ],
    "stream": true,
    "stream_options": {
        "include_usage": true
    }
}'

To pass multiple documents in a single conversation turn, place the content of each document in a separate System Message.

Python

Java

curl

python
import os
from openai import OpenAI

client = OpenAI(
    api_key=os.getenv("DASHSCOPE_API_KEY"),  # Replace your API key here if you haven't set the environment variable
    base_url="https://dashscope-intl.aliyuncs.com/compatible-mode/v1",  # Set the DashScope service base_url
)
# Initialize the messages list
completion = client.chat.completions.create(
    model="qwen-long",
    messages=[\
        {'role': 'system', 'content': 'You are a helpful assistant.'},\
        {'role': 'system', 'content': 'Alibaba Cloud Model Studio X1————Enjoy an ultimate visual experience: features a 6.7-inch 1440 x 3200 pixel ultra-clear screen with a 120Hz refresh rate...'},\
        {'role': 'system', 'content': 'Stardust S9 Pro —— A revolutionary visual feast: breakthrough 6.9-inch 1440 x 3088 pixel under-display camera design...'},\
        {'role': 'user', 'content': 'What are the similarities and differences between the products discussed in these two articles?'}\
    ],
    # All code examples use streaming output to clearly and intuitively show the model's output process. For non-streaming examples, see https://www.alibabacloud.com/help/en/model-studio/text-generation
    stream=True,
    stream_options={"include_usage": True}
)
full_content = ""
for chunk in completion:
    if chunk.choices and chunk.choices[0].delta.content:
        # Append output content
        full_content += chunk.choices[0].delta.content
        print(chunk.model_dump())

print(full_content)
java
import com.openai.client.OpenAIClient;
import com.openai.client.okhttp.OpenAIOkHttpClient;
import com.openai.core.http.StreamResponse;

import com.openai.models.chat.completions.*;

public class Main {
    public static void main(String[] args) {
        // Create a client using the API key from the environment variable
        OpenAIClient client = OpenAIOkHttpClient.builder()
                .apiKey(System.getenv("DASHSCOPE_API_KEY"))
                .baseUrl("https://dashscope-intl.aliyuncs.com/compatible-mode/v1")
                .build();

        // Create a chat request
        ChatCompletionCreateParams chatParams = ChatCompletionCreateParams.builder()
                .addSystemMessage("You are a helpful assistant.")
                .addSystemMessage("Alibaba Cloud Model Studio smartphone product introduction: Alibaba Cloud Model Studio X1 —————— Enjoy an ultimate visual experience: features a 6.7-inch 1440 x 3200 pixel ultra-clear screen...")
                .addSystemMessage("Stardust S9 Pro —— A revolutionary visual feast: breakthrough 6.9-inch 1440 x 3088 pixel under-display camera design...")
                .addUserMessage("What are the similarities and differences between the products discussed in these two articles?")
                .model("qwen-long")
                .build();

        StringBuilder fullResponse = new StringBuilder();

        // All examples use streaming output to show the model's response process. For non-streaming examples, see https://www.alibabacloud.com/help/en/model-studio/text-generation
        try (StreamResponse<ChatCompletionChunk> streamResponse = client.chat().completions().createStreaming(chatParams)) {
            streamResponse.stream().forEach(chunk -> {
                // Print and append each chunk's content
                System.out.println(chunk);
                String content = chunk.choices().get(0).delta().content().orElse("");
                if (!content.isEmpty()) {
                    fullResponse.append(content);
                }
            });
            System.out.println(fullResponse);
        } catch (Exception e) {
            System.err.println("Error: " + e.getMessage());
            System.err.println("For more information, see https://www.alibabacloud.com/help/en/model-studio/error-code");
        }
    }
}
curl
curl --location 'https://dashscope-intl.aliyuncs.com/compatible-mode/v1/chat/completions' \
--header "Authorization: Bearer $DASHSCOPE_API_KEY" \
--header "Content-Type: application/json" \
--data '{
    "model": "qwen-long",
    "messages": [\
        {"role": "system","content": "You are a helpful assistant."},\
        {"role": "system","content": "Alibaba Cloud Model Studio X1 —— Enjoy an ultimate visual experience: features a 6.7-inch 1440 x 3200 pixel ultra-clear screen with a 120Hz refresh rate..."},\
        {"role": "system","content": "Stardust S9 Pro —— A revolutionary visual feast: breakthrough 6.9-inch 1440 x 3088 pixel under-display camera design..."},\
        {"role": "user","content": "What are the similarities and differences between the products discussed in these two articles?"}\
    ],
    "stream": true,
    "stream_options": {
        "include_usage": true
    }
}'

During your interaction with the model, you might need to add new document information. To do this, append the new document content as a System Message to the Messages array.

Python

Java

curl

python
import os
from openai import OpenAI, BadRequestError

client = OpenAI(
    api_key=os.getenv("DASHSCOPE_API_KEY"),  # Replace your API key here if you haven't set the environment variable
    base_url="https://dashscope-intl.aliyuncs.com/compatible-mode/v1",  # Set the DashScope service base_url
)
# Initialize the messages list
messages = [\
    {'role': 'system', 'content': 'You are a helpful assistant.'},\
    {'role': 'system', 'content': 'Alibaba Cloud Model Studio X1 —— Enjoy an ultimate visual experience: features a 6.7-inch 1440 x 3200 pixel ultra-clear screen with a 120Hz refresh rate...'},\
    {'role': 'user', 'content': 'What does this article talk about?'}\
]

try:
    # First-round response
    completion_1 = client.chat.completions.create(
        model="qwen-long",
        messages=messages,
        stream=False
    )
    # Print the first-round response
    # For streaming output in the first round, set stream=True and concatenate each segment's content. Pass the concatenated string as the content when constructing assistant_message
    print(f"First-round response: {completion_1.choices[0].message.model_dump()}")
except BadRequestError as e:
    print(f"Error: {e}")
    print("For more information, see https://www.alibabacloud.com/help/en/model-studio/error-code")

# Construct assistant_message
assistant_message = {
    "role": "assistant",
    "content": completion_1.choices[0].message.content}

# Append assistant_message to messages
messages.append(assistant_message)
# Append new document content to messages
system_message = {
    'role': 'system',
    'content': 'Stardust S9 Pro —— A revolutionary visual feast: breakthrough 6.9-inch 1440 x 3088 pixel under-display camera design, delivering an immersive visual experience...'}
messages.append(system_message)

# Add user question
messages.append({
    'role': 'user',
    'content': 'What are the similarities and differences between the products discussed in these two articles?'
})

# Response after appending the document
completion_2 = client.chat.completions.create(
    model="qwen-long",
    messages=messages,
    # All code examples use streaming output to clearly and intuitively show the model's output process. For non-streaming examples, see https://www.alibabacloud.com/help/en/model-studio/text-generation
    stream=True,
    stream_options={"include_usage": True}
)

# Stream and print the response after appending the document
print("Response after appending the document:")
for chunk in completion_2:
    print(chunk.model_dump())
java
import com.openai.client.OpenAIClient;
import com.openai.client.okhttp.OpenAIOkHttpClient;
import com.openai.models.chat.completions.*;
import com.openai.core.http.StreamResponse;

import java.util.ArrayList;
import java.util.List;

public class Main {
    public static void main(String[] args) {
        OpenAIClient client = OpenAIOkHttpClient.builder()
                .apiKey(System.getenv("DASHSCOPE_API_KEY"))
                .baseUrl("https://dashscope-intl.aliyuncs.com/compatible-mode/v1")
                .build();
        // Initialize the messages list
        List<ChatCompletionMessageParam> messages = new ArrayList<>();

        // Add role-setting information
        ChatCompletionSystemMessageParam roleSet = ChatCompletionSystemMessageParam.builder()
                .content("You are a helpful assistant.")
                .build();
        messages.add(ChatCompletionMessageParam.ofSystem(roleSet));

        // First-round content
        ChatCompletionSystemMessageParam systemMsg1 = ChatCompletionSystemMessageParam.builder()
                .content("Alibaba Cloud Model Studio X1 —— Enjoy an ultimate visual experience: features a 6.7-inch 1440 x 3200 pixel ultra-clear screen with a 120Hz refresh rate, 256GB storage, 12GB RAM, and a 5000mAh long-lasting battery...")
                .build();
        messages.add(ChatCompletionMessageParam.ofSystem(systemMsg1));

        // User question (USER role)
        ChatCompletionUserMessageParam userMsg1 = ChatCompletionUserMessageParam.builder()
                .content("Please summarize the article content")
                .build();
        messages.add(ChatCompletionMessageParam.ofUser(userMsg1));

        // Build the first-round request and handle exceptions
        ChatCompletion completion1;
        try {
            completion1 = client.chat().completions().create(
                    ChatCompletionCreateParams.builder()
                            .model("qwen-long")
                            .messages(messages)
                            .build()
            );
        } catch (Exception e) {
            System.err.println("Error: " + e.getMessage());
            System.err.println("For more information, see https://www.alibabacloud.com/help/en/model-studio/error-code");
            e.printStackTrace();
            return;
        }

        // First-round response
        String firstResponse = completion1 != null ? completion1.choices().get(0).message().content().orElse("") : "";
        System.out.println("First-round response: " + firstResponse);

        // Construct AssistantMessage
        ChatCompletionAssistantMessageParam assistantMsg = ChatCompletionAssistantMessageParam.builder()
                .content(firstResponse)
                .build();
        messages.add(ChatCompletionMessageParam.ofAssistant(assistantMsg));

        // Second-round content
        ChatCompletionSystemMessageParam systemMsg2 = ChatCompletionSystemMessageParam.builder()
                .content("Stardust S9 Pro —— A revolutionary visual feast: breakthrough 6.9-inch 1440 x 3088 pixel under-display camera design, delivering an immersive visual experience...")
                .build();
        messages.add(ChatCompletionMessageParam.ofSystem(systemMsg2));

        // Second-round user question (USER role)
        ChatCompletionUserMessageParam userMsg2 = ChatCompletionUserMessageParam.builder()
                .content("Please compare the structural differences between the two descriptions")
                .build();
        messages.add(ChatCompletionMessageParam.ofUser(userMsg2));

        // All examples use streaming output to show the model's response process. For non-streaming examples, see https://www.alibabacloud.com/help/en/model-studio/text-generation
        StringBuilder fullResponse = new StringBuilder();
        try (StreamResponse<ChatCompletionChunk> streamResponse = client.chat().completions().createStreaming(
                ChatCompletionCreateParams.builder()
                        .model("qwen-long")
                        .messages(messages)
                        .build())) {

            streamResponse.stream().forEach(chunk -> {
                String content = chunk.choices().get(0).delta().content().orElse("");
                if (!content.isEmpty()) {
                    fullResponse.append(content);
                }
            });
            System.out.println("\nFinal response:");
            System.out.println(fullResponse.toString().trim());
        } catch (Exception e) {
            System.err.println("Error: " + e.getMessage());
            System.err.println("For more information, see https://www.alibabacloud.com/help/en/model-studio/error-code");
        }
    }
}
curl
curl --location 'https://dashscope-intl.aliyuncs.com/compatible-mode/v1/chat/completions' \
--header "Authorization: Bearer $DASHSCOPE_API_KEY" \
--header "Content-Type: application/json" \
--data '{
    "model": "qwen-long",
    "messages": [\
            {"role": "system","content": "You are a helpful assistant."},\
            {"role": "system","content": "Alibaba Cloud Model Studio X1 —— Enjoy an ultimate visual experience: features a 6.7-inch 1440 x 3200 pixel ultra-clear screen with a 120Hz refresh rate..."},\
            {"role": "user","content": "What does this article talk about?"},\
            {"role": "system","content": "Stardust S9 Pro —— A revolutionary visual feast: breakthrough 6.9-inch 1440 x 3088 pixel under-display camera design, delivering an immersive visual experience..."},\
            {"role": "user","content": "What are the similarities and differences between the products discussed in these two articles"}\
        ],
    "stream": true,
    "stream_options": {
        "include_usage": true
    }
}'

Model pricing

Model nameVersionContext lengthMax inputMax outputInput costOutput cost
(Tokens)(per 1 million tokens)
------
Model nameVersionContext lengthMax inputMax outputInput costOutput cost
(Tokens)(per 1 million tokens)
qwen-long-latest > Always has the same capabilities as the latest snapshot version.Latest10,000,00010,000,00032,768$0.072$0.287
qwen-long-2025-01-25 > Also known as qwen-long-0125.Snapshot

FAQ

  1. Does the Qwen-Long model support submitting batch jobs?

Yes. Qwen-Long supports the OpenAI Batch API at 50% of real-time call rates. Submit batch jobs as files; jobs run asynchronously and return results on completion or timeout.

  1. Where are files saved after they are uploaded using the OpenAI-compatible file API?

Files are uploaded to your Model Studio bucket at no cost. See the OpenAI File API for querying and managing files.

  1. What is qwen-long-2025-01-25?

This is a version snapshot frozen at a specific point in time. More stable than `latest`, with no expiration date.

  1. How can I know when a file has finished parsing?

Call the model with the file-id. If parsing is incomplete, you'll get error 400: "File parsing in progress, please try again later." A successful response means parsing is complete.

  1. How can I ensure the model outputs a JSON string in a standard format?

qwen-long and all snapshots support structured output. Specify a JSON Schema to ensure valid JSON that matches your structure.

API reference

Refer to Qwen API details for the input and output parameters of the Qwen-Long model.

Error codes

If the model call fails and returns an error message, see Error messages for resolution.

Limits

  • SDK dependencies:
    • File operations (upload, delete, query) require an OpenAI-compatible SDK.

    • Invoke models using an OpenAI-compatible SDK or Dashscope SDK.

  • File upload:
    • Supported formats: TXT, DOCX, PDF, XLSX, EPUB, MOBI, MD, CSV, JSON, BMP, PNG, JPG/JPEG, and GIF.

    • File size: The maximum size for image files is 20 MB. The maximum size for other file formats is 150 MB.

    • Account quota: Maximum 10,000 files or 100 GB per account. Uploads fail when either limit is reached. Delete files to free quota. See OpenAI compatible - File.

    • Storage period: Currently, there is no expiration limit for stored files.

  • API inputs:
    • The first system message defines the role. The second contains document content or fileid://xxx. The user message contains the query.

    • When referencing files using a file-id, a single request can reference a maximum of 100 files.

    • With a second system message, user message limit is 9,000 tokens. No limit with only one system message.

    • The total context length is limited to 10 million tokens.

  • API outputs:
    • The maximum output length is 32,768 tokens.
  • File sharing:
    • file-ids are account-specific and cannot be used cross-account or with RAM user API keys.
  • Throttling: For information about model throttling conditions, see Throttling.

Previous: MCPNext: Code Capabilities (Qwen-Coder)

Is this page helpful?

How to use

Getting started

Prerequisites

Upload a document

Pass information and chat using a file ID

Pass multiple documents

Pass information as plain text

Model pricing

FAQ

API reference

Error codes

Limits

Contact Us

Sales Support

Live-chat with our sales team or get in touch with a business development professional in your region.

Contact Sales

Technical Support

Open a ticket and get quick help from our technical team.

Open a Ticket >

Connect & Report Abuse

We look forward to your suggestion.

Post a Suggestion > Report Abuse >

Chat now with Alibaba Cloud Customer Service to assist you in finding the right products and services to meet your needs.

\ \ Hi, I'm Alibaba Cloud AI Assistant!\ \ I can help with questions and solutions.

Why Alibaba Cloud

About Alibaba Cloud

Asia Accelerator

Our Global Network

Global Offices

Trust Center

Case Studies

Analyst Reports

Products & Pricings

Pricing Calculator

ECS

SAS

Model Studio

Database

Security

SMS

Solutions

Financial Services

Retail Services

Media Services

Gaming Services

ISV Solutions

Engage

Developer Community

Partner Network

Startups

Marketplace

Join Alibaba Cloud

Resources & Support

Developer Learning Hub

Documentation Center

Training & Certification

Service Notices

Submit a Ticket

Security Report

Qwen Cloud

Careers About Us Privacy Policy Legal Integrity Compliance Reporting Channel Service Notices Links

© 2009-2026 Copyright by Alibaba Cloud All rights reserved

© 2009-2026 Copyright by Alibaba Cloud All rights reserved

Careers About Us Privacy Policy Legal Integrity Compliance Reporting Channel Service Notices Links