Request and response parameters for calling the Qwen-Deep-Research model through the DashScope API.
Related documentation: Deep research (Qwen-Deep-Research)
The model currently supports only the Python DashScope SDK. The Java SDK and the OpenAI-compatible interface are not supported.
DashScope
Before you begin, get an API key and set it as an environment variable. To use the DashScope SDK, you must also install the SDK.
Request bodymodelstring(Required)Supported value: qwen-deep-research.messagesarray(Required)Conversation history, in chronological order.
Message types User message object(Required)A user message sends questions, instructions, or context to the model. In the two-step call flow of Qwen-Deep-Research, user messages serve different purposes:
Fields content string(Required)The message content.rolestring(Required)Must be user.object(Optional)The model's reply to a user message. For Step 2 (Deep research), pass the model's clarifying question from Step 1 to produce a more targeted analysis.contentstring(Optional)The message content.rolestring(Required)Must be assistant.string(Optional)Format and detail level of the research report. Valid values:
| Python |
Response objectstatus_codestringThe HTTP status code for the request. 200 indicates success; other values indicate an error.On failure, the thrown exception contains status_code and message.request_id stringThe unique identifier for the request.codestringThe error code. This field is empty on success.This parameter is returned only by the Python SDK.message stringThe error message. This field is empty on success.outputobjectThe result of the call.
Fields text stringThis parameter is always null.finish_reasonstringThe reason the model stopped generating content. Possible values:
arrayA list of output choices from the model.
Fields finish_reason stringPossible values:
objectThe message object from the model.
Fields Propertiesphase stringCurrent phase. Possible values:
stringMust be assistant.contentstringThe output content from the model.extra arrayWeb search results and references gathered by the model.deep_researchobjectRetrieved web search and reference information is included only in the answer and WebResearch stages, and is null in all other stages.researchobjectDetails of the research process.
Fields researchGoal stringThe research goal.querystringSearch query used during research.idintegerThe search round number, in the range of [1, 15].learningMapobjectContent summarized from tool calls, associated with the tool usage.referencesobjectCitations for the generated answer. This field appears only in the Answer phase.
Fields icon stringThe favicon URL for the referenced content.index_number integerThe index of the referenced content.descriptionstringA short description of the referenced content.titlestringThe title of the referenced web page.url stringThe URL of the referenced content.objectContent referenced during research. Included only in the Web Research phase.
Fields icon stringThe favicon URL for the referenced content.index_number integerThe index of the referenced content.descriptionstringA short description of the referenced content.titlestringThe web page title of the referenced content.url stringThe URL of the referenced content.stringThe status of a specific phase during streaming:
booleanWhether the stream is complete. Possible values:
stringThe reason the streaming output ended. Possible values:
objectThe number of tokens used in this request.
Fields input_tokens integerThe number of input tokens.output_tokens integerThe number of output tokens. |