Skip to main content

Workflow and legacy agent application API

This document describes the input and output parameters of calling Alibaba Cloud Model Studio applications (agents, workflows) through the DashScope API, and provides call examples in typical scenarios.

This document applies only to the China (Beijing) region.
Related guides

Prerequisites

Before you begin, make sure you have completed the following steps:
  1. Create an application:Go to My Applications to create an Alibaba Cloud Model Studio application and obtain the application ID;
  2. Obtain an API Key:Obtain it on the API Key management page, and configure the API Key in environment variables.
  3. Install an SDK (optional):If you call with an SDK, install the DashScope SDK for your language.

Call Method

  • HTTP API calls Request URL: POST https://dashscope.aliyuncs.com/api/v1/apps/APP_ID/completion
    Where APP_ID must be replaced with your actual application ID
  • SDK calls Python/Java SDK: This document has the correct endpoint configured by default Custom endpoint: configurable via the base_url parameter
Online testing: Go to Application card -> Publish -> API testing to open the testing page, then fill in the parameters and click Run.

Request body

app_idstring(required)Application identifier.You can obtain the application ID on the application card of the My Applications page.
In the Java SDK, it is appId.For HTTP calls, put your actual application ID in the URL to replace APP_ID.
promptstring(required)The user's input instruction, used to guide the application to generate a reply.
For HTTP calls, put prompt into the input object.
session_idstring (optional)Session identifier for conversation history.When session_id is passed, the request automatically carries the conversation history stored in the cloud. In this case, prompt must be passed.This ID automatically expires after 1 consecutive hour without any requests.
In the Java SDK, this is setSessionId. When calling via HTTP, put session_id into the input object.
messagesarray (optional)The context passed to the model, arranged in conversation order.When using the messages parameter for multi-turn conversations, you do not need to pass prompt and session_id.If both session_id and messages are passed, the model prioritizes the content in messages and ignores session_id and prompt.
When calling via HTTP, put messages into the input object.
To use this parameter, the Python Dashscope SDK version must be at least 2.0.1, and the Java Dashscope SDK version must be at least 2.17.0.

Message type

System Messageobject (optional)The system message, used to define the model's role, tone, task objectives, or constraints. It is generally placed first in the messages array.
contentstring (required)The system instruction, used to specify the model's role, behavior rules, response style, and task constraints.rolestring (required)The role of the system message, fixed as system.
User Messageobject (required)The user message, used to pass questions, instructions, or context to the model.
contentstring (required)The message content.
textstring (required)The input text.
rolestring (required)The role of the user message, fixed as user.
Assistant Messageobject (optional)The model's reply. It is usually passed back to the model as context in multi-turn conversations.
contentstring (required)The text content of the model's reply.rolestring (required)The role of the assistant message, fixed as assistant.
workspace string (optional)The workspace identifier. Related documentation: Obtain Workspace ID.Pass workspace ID only when calling applications in a sub-workspace.
When calling via HTTP, specify X-DashScope-WorkSpace in the header.
stream boolean (optional) Default value: FalseWhether to respond in streaming output mode.It is recommended to set it to True, which improves the reading experience and reduces the risk of timeouts.Parameter values:
  • False (default): The model returns all content at once after generation is complete.
  • True (recommended): Content is output while being generated, and a data chunk is returned each time part of the content is generated. You need to read these chunks one by one in real time to assemble the complete reply.
To implement streaming output with the Java SDK, call the streamCall interface; to implement streaming output over HTTP, specify X-DashScope-SSE as enable in the Header.
incremental_output boolean (optional) Default value: FalseWhether to enable incremental output in streaming output mode.It is recommended to set it to True to improve the reading experience.Parameter values:
  • False (default): Each output returns the entire sequence generated so far, and the last output is the complete generated result.
I
I like
I like apple
I like apple.
  • True (recommended): Incremental output, that is, subsequent output does not include content that has already been output. You need to read these fragments one by one in real time to obtain the complete result.
I
like
apple
.
In the Java SDK, it is incrementalOutput. When calling over HTTP, put incremental_output into the parameters object.
flow_stream_mode string (optional) Default value: full_thoughtsThe streaming output mode of workflow applications. Related documentation: Streaming output.Parameter values:
  • message_format_plus (recommended): Enhanced message mode. Outputs the execution process and results of all nodes in the workflow_message field, covering all node types. It returns the same data structure as message_format, but supports streaming push for all node types.
    Client-side processing rules: for text nodes (OUTPUT / END text mode), message.content is an incremental delta and must be appended; for JSON nodes (LLM / Component / AgentGroup, etc.), message.content is a complete JSON snapshot and must be replaced as a whole. When node_is_completed=true, the node is marked as completed.
    Sub-canvas node streaming: nodes inside the sub-canvas of loop nodes and batch processing nodes are also pushed in a streaming manner, identified by the response field parent_node_id that indicates the parent node they belong to.
    Nested sub-canvas is not supported yet: loop or batch processing nodes cannot be placed inside the sub-canvas of loop/batch processing nodes.
    In the Java SDK, it is FlowStreamMode.MESSAGE_FORMAT_PLUS.
  • message_format (recommended): Message mode. Outputs the results of specified nodes (Output nodes or End nodes) in the message field.
    Enable the streaming output switch for the target node in the application in the console to return results in a streaming manner; if not enabled, the final result of the node is returned all at once.
    In the Java SDK, it is FlowStreamMode.MESSAGE_FORMAT.
  • full_thoughts (default): Full thoughts mode.
    Not recommended for new business. We recommend using message_format or message_format_plus instead.
    Outputs the results of all nodes in the thoughts field.
    When using this mode, you must also set the has_thoughts parameter to True.
    In the Java SDK, it is FlowStreamMode.FULL_THOUGHTS.
The Python SDK must be 2.0.1 or later, and the Java SDK must be 2.22.23 or later. When calling over HTTP, put flow_stream_mode into the parameters object.
biz_paramsobject (optional)When an application passes parameters through custom variables, nodes, or plug-ins, use this field for the transfer. Related documentation: Call agent applications - Pass custom parameters, Call workflow applications - Pass custom parameters.
In the Java SDK, this is bizParams. When calling via HTTP, put biz_params into the input object.
For workflow applications, the custom variables of the start node are passed directly. Example:
biz_params = {"city": "杭州"}
For agent applications, prompt variables or plug-in variable parameters are passed via the following fields:

Property

user_prompt_params object (optional)Represents custom prompt variable parameter information.Variable names within an application must be unique, with a limit of 10.Usage steps:
  1. Configure custom variables and reference them in the prompt within the application, then publish the application.
  2. The API call passes variable information through this parameter.
Example:
biz_params ={
    "user_prompt_params": {
        "date": "2025年03月03日",
        "city": "杭州"
    }
}
user_defined_params object (optional)Represents custom plug-in parameter information.Plug-ins added within an application must be unique, with a limit of 10.

Property

tool_idstring (optional)The plug-in ID, which can be obtained from the plug-in card.${plugin_params}string (optional)Multiple key-value pairs contained in the innermost level of the object. Each key-value pair represents a user-defined parameter name to be passed and its specified value. For example:
"article_index": 2
Usage steps:
  1. Associate the specified plug-in in the application, and publish the application.
  2. The API call passes plug-in information through this parameter.
You can provide multiple key-value pairs, where each key is the plug-in's TOOL_ID and the value is the parameter object required by that plug-in. Example:
"user_defined_params": {
        "<TOOL_ID>": {
            "article_index": 2},
        "<TOOL_ID>": {
            "article_index": 8}
        }
user_defined_tokens object (optional)Represents user-level authentication information for custom plug-ins.Plug-ins added within an application must be unique, with a limit of 10.

Property

tool_idstring (optional)The plug-in ID, which can be obtained from the plug-in card. Passed via the <TOOL_ID> field.user_token string (optional)Passes the user authentication information required by the plug-in, such as the actual value of DASHSCOPE_API_KEY.
Usage steps:
  1. Associate the specified plug-in in the application, and publish the application.
  2. The API call passes the plug-in's user-level authentication information through this parameter.
You can provide multiple key-value pairs, where each key is the plug-in's TOOL_ID and the value is a user_token object.
memory_id string (optional)The long-term memory ID. See CreateMemory to create one. Related document: long-term memory.
Only agent applications support this parameter.
  1. Enable the long-term memory switch in the application, and publish the application.
  2. When calling the application with a specified memory_id, the system automatically builds and saves long-term memories based on user preferences.
  3. On subsequent calls with the same memory_id, the system restores these long-term memories and merges them with the latest user message before providing them to the model for processing.
In the Java SDK, this is memoryId. When calling via HTTP, put memory_id into the input object.
has_thoughts boolean (Optional) The default value is FalseWhether to output the process of plug-in calls and knowledge retrieval, or the thinking process of a model with thinking mode enabled. You can view it in the thoughts field.Parameter values:
  • True: Output.
  • False (default): Do not output.
In the Java SDK, this is hasThoughts. When calling via HTTP, put has_thoughts in the parameters object.
image_list array (Optional)A list of images. Supports image URLs and Data URLs (Base64-encoded). You must select a vision and video understanding model in the application.The base64 encoding format can be constructed as a Data URL: data:[MIME_type];base64,{base64_image}. For details and code examples, see the visual understanding section on the right side of this document.Scenarios:
  • Image retrieval (agent applications): Retrieve structured knowledge bases that contain image links based on the uploaded image links.
  • Visual understanding: Use the visual understanding capability of the Qwen VL series models to analyze image content for question answering.
Related document: Upload files (documents, images, videos, or audio).
In the Java SDK, this is images. When calling via HTTP, put image_list in the input object.
file_list array (Optional)A list that contains one or more file URLs.
Only agent applications support this parameter.
Related document: Upload files (documents, images, videos, or audio).
In the Java SDK, this is files. When calling via HTTP, put file_list in the input object.
The Python DashScope SDK version must be 2.0.1 or later, and the Java DashScope SDK version must be 2.21.13 or later.
rag_options object (Optional)Used to configure retrieval-related parameters, including but not limited to retrieving from specified knowledge bases or documents. For more information, see Retrieve knowledge bases.
Only agent applications support this parameter.
In the Java SDK, this is ragOptions. When calling via HTTP, put rag_options in the parameters object.

Property

pipeline_ids array (Required)A list that contains one or more knowledge base IDs. The maximum is 5.Retrieve all documents in the specified knowledge bases.How to obtain:
  • Obtain the knowledge base ID on the Knowledge Base page;
  • Or use the Data.Id returned by the CreateIndex API (only supports unstructured knowledge bases).
In the Java SDK, this is pipelineIds.
file_idsarray (Optional)A list that contains one or more unstructured document IDs. The maximum is 5.Retrieve unstructured documents in the specified knowledge bases.When passing in document IDs, you must also pass the knowledge base IDs to which these documents belong in the pipeline_ids field.How to obtain:
  • In Collections, click Details for the target file dataset. Get the document ID from the file list.
  • Or through the ID returned by the AddFile API for importing documents.
In the Java SDK, it is fileIds.
metadata_filterobject (Optional)Used to filter the metadata of unstructured documents. By specifying one or more key-value pairs, unstructured documents with this metadata in the specified knowledge base are retrieved.Prerequisites:When passing in metadata, you must also pass the knowledge base IDs to which the metadata belongs in the pipeline_ids field.How to view:
  • Visit the Knowledge Base page and click View Details Meta Information on the knowledge base card to view it.
  • Or obtain it through the ListChunks API.
This object consists of one or more key-value pairs:
  • Key: of type String, representing the name of the metadata.
  • Value:
    • Single-value matching: The value is a String, indicating that only documents whose field value is exactly equal to this string are retrieved.
      • Example: "author": "John.Doe"
    • Multiple-value "OR" matching: The value is an Array or List containing multiple String values. This indicates retrieving documents whose field value matches any value in the array (the logic is OR).
      • Example: "source": ["internal_wiki", "public_docs"]
Combination logic:
Different keys are combined with "AND" logic. For example, "author": "John.Doe", "source": ["internal_wiki", "public_docs"] means filtering out documents whose author is "John.Doe" and whose source is "internal_wiki" or "public_docs".
In the Java SDK, it is metadataFilter.
tags array (Optional)A list containing one or more unstructured document tags.Retrieves unstructured documents that have these tags.How to view:
  • In Collections, click Details for the target file dataset and check the tags on the document.
  • Or obtain them through the DescribeFile API.
structured_filter object (Optional)Used to perform metadata filtering on structured data. By specifying one or more key-value pairs, you can filter out document chunks that meet the conditions.How to view:
  • On the Knowledge Base page, click View Details View Index on the knowledge base card to view it.
  • Or obtain it through the ListChunks API.
This object consists of one or more key-value pairs:
Each key (column name) must have a corresponding value; filtering by column name only is not supported.
  • Key: Must be of type String, representing the name of the metadata field (column name) to filter.
  • Value:
    • Single-condition matching: The value is a String or Number, indicating that only documents whose field value exactly matches are retrieved. Example: "category": "Company News".
    • Multiple-value "OR" matching: The value is an Array or List containing multiple String or Number values. This indicates retrieving documents whose field value matches any value in the array (the logic is OR). Example: "year": 2024, "department": ["Engineering", "Product"].
Combination logic:
Different keys are combined with "AND" logic. For example, "year": 2024, "department": ["Engineering", "Product"] means filtering out document chunks whose year is 2024 and whose department is "Engineering" or "Product".
In the Java SDK, it is structuredFilter.
session_file_idsarray(Optional)A list containing one or more file IDs. The maximum is 10.
Only agent applications support this parameter.
When calling an agent application, pass the file IDs, and the system will extract the text content from the files as the content basis for LLM question answering.Related document: Upload files (documents, images, videos, or audio).
The session file ID must start with "file_session_" and the file status must be FILE_IS_READY. Otherwise, the call fails.
In the Java SDK, it is sessionFileIds.
The Python DashScope SDK must be at least 2.0.1, and the Java DashScope SDK must be at least 2.17.0.
model_idstring(Optional)The model name.
Only agent applications support this parameter.
When calling the API, you can pass the model name used for this call through this parameter.Priority: When the model_id passed through the API differs from the console configuration, the API parameter value takes precedence.
In the Java SDK, it is modelId. When calling through HTTP, put model_id into the parameters object.
The Java DashScope SDK must be at least 2.19.3.
enable_system_timeboolean (Optional) Default value: TrueControls whether the model automatically obtains the current time (Beijing time).
Only agent applications support this parameter.
Parameter values:
  • True (default): The current time is enabled, and the model can directly respond to real-time requests (such as "today's date").
  • False: The current time is disabled. You need to manually pass in the time through custom variables. For example:
# 通过 user_prompt_params 传递自定义时间
biz_params ={
    "user_prompt_params": {
        "date": "2025年03月03日"
    }
}
Scenarios:
  • You need to customize the time source instead of relying on the current time.
  • Avoid changes in model output caused by changes in the current time.
In the Java SDK, it is enableSystemTime. When calling through HTTP, put enable_system_time into the parameters object.
The Java DashScope SDK must be at least 2.19.3.
enable_web_searchboolean (Optional) Default value: falseWhether the model uses internet search results as reference when generating a reply.
Only agent applications support this parameter.
Parameter values:
  • True: Internet search is enabled, and the model uses the search results as reference information when generating a reply.
    The model decides on its own whether and when to trigger an internet search.
  • False (default): Disables internet search.
Priority:
  • If this parameter is not set during the call, the status of the in-app web search switch takes precedence.
  • If enable_web_search is set during the call, the API parameter takes precedence.
Enabling the internet search feature may increase Token consumption.
In the Java SDK, it is enableWebSearch. When calling through HTTP, put enable_web_search into the parameters object.
The Java DashScope SDK must be at least 2.19.3.
dialog_roundinteger (Optional)The number of context rounds carried.
Only agent applications support this parameter.
Sets the maximum number of historical conversation rounds input to the model. The more rounds, the stronger the conversation relevance.Priority: When the dialog_round passed through the API differs from the console configuration, the API parameter value takes precedence.
In the Java SDK, it is dialogRound. When calling through HTTP, put dialog_round into the parameters object.
The Java DashScope SDK must be at least 2.19.3.
enable_thinking boolean (Optional) Default value: falseThis parameter is used to switch between thinking mode and non-thinking mode in deep thinking models. It applies only to agent applications.
Workflow applications do not support dynamically controlling the thinking mode through this parameter; you need to set it in each LLM node separately.
Parameter values:
  • False (default): Non-thinking mode. The final answer is returned directly (in the text field).
  • True: Thinking mode is enabled. The model first outputs the thinking process and then returns the final answer.
Priority:
  • If this parameter is not set at the call, the thinking mode switch state of the model in the application takes precedence.
  • If enable_thinking is set at the call, the API parameter takes precedence.
To obtain the content of the thinking process, you must also set has_thoughts to True. Then:
  1. Thinking process: for agent applications, obtain it through the thought field; for workflow applications, obtain it through the reasoningContent field.
  2. Final answer: obtain it through the text field.
There is a very small chance that the thinking process is not output even after enable_thinking is enabled.
In the Java SDK, this parameter is enableThinking. When you call the API over HTTP, put enable_thinking in the parameters object.
The Java DashScope SDK version must be 2.20.0 or later.
  • Single-turn conversation
  • Multi-turn conversation
  • Pass parameters
  • Impact of releasing a new version on API calls
  • Streaming output
  • Retrieve knowledge base
  • Long-term memory
  • Upload files
  • Visual understanding
  • Python
  • Java
  • HTTP
  • dashscope CLI
Request example
import os
import dashscope
from dashscope import DashScopeError

client = dashscope.Client(
    # 若没有配置环境变量,可用百炼API Key将下行替换为:api_key="sk-xxx"。但不建议在生产环境中直接将API Key硬编码到代码中,以减少API Key泄露风险。
    api_key=os.getenv("DASHSCOPE_API_KEY"))
try:
    response = client.apps.completions.create(
        app_id='APP_ID',  # 替换为实际的应用 ID
        prompt='你是谁?')
    print(response.text)
except DashScopeError as e:
    print(f'request_id={e.request_id}')
    print(f'code={e.code}')
    print(f'message={e.message}')
    print(f'请参考文档:https://help.aliyun.com/zh/model-studio/developer-reference/error-code')

Response object

status_code stringThe HTTP status code returned (only appears in the response for HTTP calls).200 indicates a successful request; otherwise, the request failed.
When a call fails, both the Python SDK and Java SDK throw an exception; you can obtain the status code, error code, and detailed error information from the exception attributes e.status_code/e.code/e.message.
request_id stringThe unique identifier of this call.
The Java SDK returns this parameter as requestId.
code stringThe error code; empty when the call succeeds (only returned in the HTTP response body).
When an SDK call fails, the error code is returned through the code attribute of the DashScopeError exception (ApiException in Java).
message stringDetailed error information; ignored when the request succeeds (only returned in the HTTP response body).
When an SDK call fails, the error message is returned through the message attribute of the DashScopeError exception (ApiException in Java).
output objectThe call result information.

output Properties

text stringThe reply content generated by the model.finish_reason stringThe reason for completion.stop indicates a natural end (a preset marker was encountered); null indicates forced termination (such as reaching the maximum length limit or a manual stop).session_idstringThe unique identifier of the current conversation.Pass it in subsequent requests to carry the conversation history.thoughtsarraySet the has_thoughts parameter to True when calling to view the plugin call and knowledge retrieval process, or the thinking process of deep-thinking models, in thoughts.
thought stringThe model's thinking process.After you select a deep-thinking model in the agent application in the console and successfully publish the application, if you set the has_thoughts parameter to True in the API call, the model's thinking process will be returned in this field.reasoningContentstringThe model's thinking process.After you select a deep-thinking model in the workflow application in the console and successfully publish the application, if you set the has_thoughts parameter to True in the API call, the model's thinking process will be returned in this field.action_type stringThe type of execution step returned by the LLM. For example, API indicates executing an API plugin, agentRag indicates performing knowledge retrieval, and reasoning indicates the thinking process of a deep-thinking model.action_name stringThe name of the executed action, such as knowledge retrieval, API plugin, or thinking process.action stringThe executed step.action_input_stream stringThe streaming result of the input parameters.action_input stringThe input parameters of the plugin.observation stringThe retrieval or plugin process.
doc_references arrayInformation about the documents cited by the model from the retrieved recall documents.Only after you turn on the Show answer sources switch and publish the application in the agent application in the Model Studio console can doc_references contain valid information.
index_id stringThe index of the recalled document cited by the model, such as [1].title stringThe title of the text chunk cited by the model.doc_id stringThe document ID cited by the model.doc_name stringThe document name cited by the model.doc_url stringThe document link cited by the model; null if the document is stored in the secure storage space of the Alibaba Cloud Model Studio platform.text stringThe specific text content cited by the model.biz_id stringThe business association identifier cited by the model.images arrayThe list of image URLs cited by the model.page_numberarrayThe page number of the text chunk cited by the model.
This parameter is only supported for knowledge bases created after October 25, 2024.
To use this parameter, the Python Dashscope SDK must be version 2.0.1 or later, and the Java Dashscope SDK must be version 2.16.10 or later.
workflow_messageobjectThe object containing workflow node statuses and messages.
Output field specific to workflow applications:
  • This field is only returned when calling a workflow application; agent applications do not return it.
  • In streaming output mode, when flow_stream_mode is set to message_format or message_format_plus, this field returns the execution status and messages of each workflow node in real time.
  • In non-streaming output mode, this field returns the status and messages of the final node (the End node or Process output node).
Differences from agent application output:
  • Agent applications: the final reply is mainly returned via the output.text field, and the thoughts field (requires has_thoughts=true) returns the plugin call and knowledge retrieval process.
  • Workflow applications: in addition to output.text, the workflow_message field returns detailed execution information of workflow nodes, including node name, type, status, and the output content of each node.
node_statusstringThe execution status of the current node, for example, executing.node_typestringThe type of the current node, for example, End (end node).node_msg_seq_idintegerThe sequence number of messages within a node.node_namestringThe name of the current node, for example, End.messageobjectThe object containing the specific message content.

message Properties

contentstringThe specific text content of the message.rolestringThe role of the message sender, for example, Assistant.
node_is_completedbooleanIndicates whether the current node has finished execution. true means completed; false means not completed.node_idstringThe unique identifier ID of the current node.parent_node_idstringThe ID of the parent node (loop node / batch node) that the current node belongs to.
  • Main canvas nodes: return null.
  • Sub-canvas nodes: return the node_id of the loop node or batch node they belong to.
Only in message_format_plus mode do sub-canvas nodes return non-null values.
Sub-canvas node content structure (message_format_plus)When flow_stream_mode=message_format_plus and the node is in a sub-canvas (parent_node_id is non-null), message.content is the complete NodeResult JSON of that iteration/branch.
nodeIdstringThe node ID within the sub-canvas.nodeNamestringThe node name.nodeTypestringThe node type, such as LLM, Plugin, or Output.nodeStatusstringThe node execution status: success / fail / skip (skipped, not executed) / executing.inputstringThe node input content.outputstringThe node output content.indexintegerThe sub-canvas iteration/branch index, incrementing from 0.parentNodeIdstringThe parent node (loop node / batch node) ID.nodeExecTimestringThe node execution time, such as 100ms.errorCodestringReturned when node execution fails.errorInfostringReturned when node execution fails.
The processing rules for text nodes (Output / End text mode) and JSON nodes such as LLM are the same as on the main canvas: text nodes are deltas that must be concatenated, and JSON nodes are snapshots that must be replaced as a whole; node_is_completed=true marks the end of a node.
usage objectThe data usage information of this request.

usage Properties

modelsarrayThe model information of this call.
model_id stringThe model ID invoked by this application call.input_tokens integerThe length of the user input text after being converted into tokens.output_tokens integerThe length of the model-generated reply after being converted into tokens.
Single-turn conversation response exampleThe following is the raw response returned by the HTTP interface (the Python SDK returns a flattened response object, which can be read directly via response.text/response.finish_reason/response.session_id).
{
    "output": {
        "finish_reason": "stop",
        "session_id": "6105c965c31b40958a43dc93c28c7a59",
        "text": "我是千问,由阿里云开发的AI助手。我被设计用来回答各种问题、提供信息和与用户进行对话。有什么我可以帮助你的吗?"
    },
    "usage": {
        "models": [
            {
                "output_tokens": 36,
                "model_id": "qwen-plus",
                "input_tokens": 74
            }
        ]
    },
    "request_id": "f97ee37d-0f9c-9b93-b6bf-bd263a232bf9"
}
Response example with a specified knowledge baseWhen calling the application knowledge base feature, to output the document information cited by the model from the recalled documents, click Retrieval settings in the agent application in the Model Studio console, turn on the Show answer sources switch, and publish the application.The following is the response object shape of the Python SDK 2.0.
{
    "text": "根据您的预算,我推荐您考虑百炼 Zephyr Z9。这款手机轻巧便携,拥有6.4英寸1080 x 2340像素的屏幕,搭配128GB存储与6GB RAM,非常适合日常使用<ref>[1]</ref>。此外,它还配备了4000mAh电池以及30倍数字变焦镜头,能够捕捉远处细节,价格区间在2499-2799元之间,完全符合您的预算需求<ref>[1]</ref>。",
    "finish_reason": "stop",
    "session_id": "6c1d47fa5eca46b2ad0668c04ccfbf13",
    "thoughts": null,
    "doc_references": [
        {
            "index_id": "1",
            "title": "百炼手机产品介绍",
            "doc_id": "file_7c0e9abee4f142f386e488c9baa9cf38_10317360",
            "doc_name": "百炼系列手机产品介绍",
            "doc_url": null,
            "text": "【文档名】:百炼系列手机产品介绍\n【标题】:百炼手机产品介绍\n【正文】:参考售价:5999- 6499。百炼 Ace Ultra ——游戏玩家之选:配备 6.67英寸 1080 x 2400像素屏幕,内置 10GB RAM与 256GB存储,确保游戏运行丝滑无阻。百炼 Ace Ultra ——游戏玩家之选:配备 6.67英寸 1080 x 2400像素屏幕,内置 10GB RAM与 256GB存储,确保游戏运行丝滑无阻。5500mAh电池搭配液冷散热系统,长时间游戏也能保持冷静。高动态双扬声器,沉浸式音效升级游戏体验。参考售价:3999- 4299。百炼 Zephyr Z9 ——轻薄便携的艺术:轻巧的 6.4英寸 1080 x 2340像素设计,搭配 128GB存储与 6GB RAM,日常使用游刃有余。4000mAh电池确保一天无忧,30倍数字变焦镜头捕捉远处细节,轻薄而不失强大。参考售价:2499- 2799。百炼 Flex Fold+ ——折叠屏新纪元:集创新与奢华于一身,主屏 7.6英寸 1800 x 2400像素与外屏 4.7英寸 1080 x 2400像素,多角度自由悬停设计,满足不同场景需求。512GB存储、12GB RAM,加之 4700mAh电池与 UTG超薄柔性玻璃,开启折叠屏时代新篇章。此外,这款手机还支持双卡双待、卫星通话,帮助您在世界各地都能畅联通话。参考零售价:9999- 10999。\n",
            "biz_id": null,
            "images": [

            ],
            "page_number": [
                0]
        }]
}
Exception response exampleWhen a request fails, the Python SDK throws an exception whose code and message attributes indicate the cause of the error.The following shows an example of an exception response when a valid API-KEY is not provided.
request_id=1d14958f-0498-91a3-9e15-be477971967b,
code=401,
message=Invalid API-key provided.

QPM limits

Application calls are rate-limited on two independent dimensions, the application and the account. If either limit is reached, a rate limit error is returned:
  • Per-application concurrency: the number of requests per second counted by application ID (app_id), with a default upper limit of 100 QPS. Submission requests for asynchronous workflow tasks share this quota with synchronous calls.
  • Total account traffic: the number of requests per minute counted at the level of the same Alibaba Cloud primary account, with a default upper limit of 15000 QPM.
Requests that exceed the threshold are rejected with HTTP 429 and the error code Throttling.RateQuota, and usually recover automatically within one minute. If you expect a significant increase in business concurrency or call volume, contact your Alibaba Cloud business manager in advance to evaluate and request a quota increase.

Error codes

If the call fails (the Python SDK throws a DashScopeError exception, and HTTP calls return an error message), refer to Error codes for troubleshooting.