Skip to main content

Cloud only: Get a single turn

Call requirements, permissions, request fields, response fields, and error handling.

Request and permissions

GET https://openapi.qwenwork.ai/v1/session/sessions/{session_id}/turns/{turn_id} Authentication: Authorization: Bearer <access_token>; use an access token obtained through user OAuth authorization. Required business Scope: session.session.read Authorization methods declared by the contract: Organization authorization (organization), personal authorization (personal) The platform must enable the Scope for the application. The user must have the corresponding business permissions, and the target resource must be within their accessible scope. Whether personal or organization authorization is available to the application depends on the actual console configuration.

Behavior and limitations

Omitting session_type selects a cloud session. Every remote-control request must use session_type=remote and provide a nonempty device_id. Providing device_id for a cloud session, an empty or unknown type, or duplicate target parameters returns 422 VALIDATION_ERROR. Cross-device aggregated lists and automatic fallback to cloud are not provided. Both types use the same authentication chain; the open platform validates the corresponding Scope declared by each endpoint. Cloud sessions: Returns a single turn, including fields omitted from list rows:
  • final_message is the full text, without truncation.
  • items lists what the agent presented during this turn, discriminated by type:
    • file—a file the agent explicitly presented to the user as part of its response, not every file it wrote. alt is the agent's own description, usable directly as a caption. path is a storage path, not a URL; exchange it for a download link when you need the bytes.
    • web_app—a Web application started by the agent.
    • document_review—a reviewed document, including verdict and findings.
Files the agent merely wrote are not items; they appear in GET /sessions/{session_id}/output. For web_app, published_url is a persistent address. live_preview: true means a live view may exist while the runtime is alive. Its address is returned in the live section of GET /sessions/{session_id}/output, not embedded here. Remote-control sessions: This operation returns 422 OPERATION_NOT_SUPPORTED without contacting the target device. Call through the open platform, retaining the existing oauth_app Token, identity resolution, application IP restrictions, and resource ownership checks. Cloud and remote-control parameters retain their actual contract semantics. Short paths such as /sessions in this page are relative to the common prefix /v1/session. Use the full path at the top of this page for actual requests. Supported session types: cloud In the full JSON, x-session-variants preserves the parameters, request bodies, and responses for cloud and remote-control sessions separately. Do not mix fields from the two branches.

Path parameters

ParameterTypeRequiredDescription and constraints
session_idstringYesSession identifier: a UUID for cloud sessions; an opaque identifier on the selected device for remote-control sessions.
Minimum length: 1
Maximum length: 256
turn_idstringYesTurn id, for example one obtained from GET /sessions/{session_id}/turns.
Turn id, for example one obtained from GET /sessions/{session_id}/turns.
Format: "uuid"

Query parameters

ParameterTypeRequiredDescription and constraints
session_typestringNoOmitting session_type selects a cloud session. Every remote-control request must use session_type=remote and provide a nonempty device_id. Providing device_id for a cloud session, an empty or unknown type, or duplicate target parameters returns 422 VALIDATION_ERROR. Cross-device aggregated lists and automatic fallback to cloud are not provided. Both types use the same authentication chain; the open platform validates the corresponding Scope declared by each endpoint.
Default: "cloud"
Allowed values: ["cloud", "remote"]
device_idstringNoRequired only for remote control. An opaque target device identifier from device discovery; it must be URL-encoded. The target connection must be signed in to the currently authenticated account.
Minimum length: 1
Maximum length: 256

Request body

The public contract declares no request body. Do not add identity fields or undeclared business fields.

Successful responses

Preserve the original response structure of each business endpoint; do not add a common code/msg/data wrapper.

HTTP 200

Success Response type: application/json
FieldTypeRequiredDescription and constraints
$schemastringNoURL of the JSON Schema for this object.
Format: "uri"
channelstring | nullNoSource of this turn initiating prompt; null for unattributed historical turns.
ended_atstring | nullYesWhen the turn ended, or null while still running. ISO 8601.
errorobject | nullYesStructured failure details. null unless status is failed.
errorobjectYesAt least one of: branch 1
Additional fields: false
error.categorystringNoAt least one of: branch 1
Problem category: quota, auth, permission, rate_limit, model_unavailable, timeout, content_rejected, input_too_large, input_invalid, limit_reached, service_error, or unknown. Open enum. For classification and statistics; branch on remedy instead, because the same category can require different actions. Treat unrecognized values as unknown.
error.codestringYesAt least one of: branch 1
Machine-readable failure code. Open enum. Branch on known codes and handle the rest as generic failures.
error.messagestringYesAt least one of: branch 1
Human-readable explanation for logs and operational displays. The wording is not part of the contract and may change.
error.remedystringNoAt least one of: branch 1
Action required to resolve the error: retry, retry_after_backoff, switch_model, new_session, modify_input, reauthenticate, top_up_quota, contact_admin, refresh, or report. Open enum. Branch on this field. retry and retry_after_backoff mean the same request can be resent; all other values require a change first. new_session means the problem affects the entire session: create a new session instead of merely changing the prompt. Treat unrecognized values as requiring a change first.
error.trace_idstringNoAt least one of: branch 1
Server trace id, identical to the X-Request-Id response header. Include it when reporting a problem—we use it to locate the request.
errornullYesAt least one of: branch 2
—
final_messagestring | nullYesThe agent's closing text, complete and untruncated. null when the turn ends with a tool call that has no user-facing output. This is the last contiguous text segment, not the full response.
interrupt_reasonstring | nullYesWhat ended this turn. Non-null only when status is interrupted. Values: "user_requested", "runtime_restarted", "runtime_unavailable", "session_ended", or "action_required_timeout". Open enum; treat unrecognized values as non-retryable.
itemsarrayYesItems the agent presented during this turn. An empty array when nothing was presented. Files written to the output directory are listed by GET /sessions/{id}/output. If output_count in the turn list is not 0 but this array is empty, the read is incomplete and can be retried.
items[]objectNo—
items[]objectNoExactly one of: branch 1
Present when type is "file".
Additional fields: false
items[].created_atstringYesExactly one of: branch 1
When this item was produced. ISO 8601, with microseconds and timezone.
items[].fileobjectYesExactly one of: branch 1
Additional fields: false
items[].file.altstringNoExactly one of: branch 1
The agent's description of this file. Suitable as a caption or alt text.
items[].file.barn_idstringNoExactly one of: branch 1
Storage id; exchange it for a download URL.
items[].file.mime_typestringNoExactly one of: branch 1
Content type, for example application/pdf.
items[].file.pathstringYesExactly one of: branch 1
Storage path, not a URL. Exchange it for a download link when you need the file content; presigned URLs expire, so they are issued on demand rather than listed here.
items[].file.sizeintegerNoExactly one of: branch 1
Size in bytes.
Format: "int64"
items[].tool_call_idstringNoExactly one of: branch 1
The tool call that produced this item. Correlate it with tool_call / tool_call_update events in the event stream.
items[].typestringYesExactly one of: branch 1
Item type, determining which other fields exist. Open enum; skip unrecognized types rather than raising an error.
Allowed values: ["file"]
items[]objectNoExactly one of: branch 2
Present when type is "web_app".
Additional fields: false
items[].created_atstringYesExactly one of: branch 2
When this item was produced. ISO 8601, with microseconds and timezone.
items[].tool_call_idstringNoExactly one of: branch 2
The tool call that produced this item. Correlate it with tool_call / tool_call_update events in the event stream.
items[].typestringYesExactly one of: branch 2
Item type, determining which other fields exist. Open enum; skip unrecognized types rather than raising an error.
Allowed values: ["web_app"]
items[].web_appobjectYesExactly one of: branch 2
Additional fields: false
items[].web_app.live_previewbooleanNoExactly one of: branch 2
true means this turn provided a page that may still be viewable live. This is a flag, not a URL: addresses are short-lived, so the live section of GET /sessions/{id}/output issues them on demand.
items[].web_app.published_urlstringNoExactly one of: branch 2
A persistent address, present only if the page was actually published. Safe to store and share—unlike live previews, it outlives the runtime.
items[].web_app.source_dirstringNoExactly one of: branch 2
The application's directory in this session's workspace.
items[].web_app.staticbooleanNoExactly one of: branch 2
true for a static site; false when a running server is required. Static sites can be published persistently; dynamic applications exist only while the runtime is alive.
items[]objectNoExactly one of: branch 3
Present when type is "document_review".
Additional fields: false
items[].created_atstringYesExactly one of: branch 3
When this item was produced. ISO 8601, with microseconds and timezone.
items[].document_reviewobjectYesExactly one of: branch 3
Additional fields: false
items[].document_review.findingsarrayNoExactly one of: branch 3
Issues found; present when verdict is "failed".
items[].document_review.findings[]stringNoExactly one of: branch 3
—
items[].document_review.pathstringNoExactly one of: branch 3
Workspace path of the reviewed document. A turn may review multiple documents, so use this to associate verdict and findings with the specific file.
items[].document_review.verdictstringYesExactly one of: branch 3
"passed" or "failed".
items[].tool_call_idstringNoExactly one of: branch 3
The tool call that produced this item. Correlate it with tool_call / tool_call_update events in the event stream.
items[].typestringYesExactly one of: branch 3
Item type, determining which other fields exist. Open enum; skip unrecognized types rather than raising an error.
Allowed values: ["document_review"]
items[]objectNoExactly one of: branch 4
Item types added after this document was written. Only the fields common to all items are guaranteed. Skip them rather than raising an error.
items[].created_atstringYesExactly one of: branch 4
When this item was produced. ISO 8601, with microseconds and timezone.
items[].tool_call_idstringNoExactly one of: branch 4
The tool call that produced this item. Correlate it with tool_call / tool_call_update events in the event stream.
items[].typestringYesExactly one of: branch 4
Item type, determining which other fields exist. Open enum; skip unrecognized types rather than raising an error.
metaobjectNoPublic metadata of the initiating prompt, when recorded.
Additional fields: false
meta.pa_strstringNo—
pending_actionobject | nullYesThe question blocking this turn, or null if none. Non-null if and only if status is action_required.
pending_actionobjectYesAt least one of: branch 1
Additional fields: false
pending_action.asked_atstringYesAt least one of: branch 1
When the agent asked the question. ISO 8601, with microseconds and timezone. The turn has been consuming wall-clock time since then, so treat older values as urgent.
pending_action.questionsarrayYesAt least one of: branch 1
Questions to display, ready to render. Usually only one. Answer in the same order in the answers array.
pending_action.questions[]objectNoAt least one of: branch 1
Additional fields: false
pending_action.questions[].headerstringNoAt least one of: branch 1
Optional short label for the question, suitable as a heading above it.
pending_action.questions[].multi_selectbooleanYesAt least one of: branch 1
true means the agent requests multiple selections. ⚠️ The answer field accepts only one string per question, so multiple selections are written as text in that entry for the agent to interpret, not parsed—see updated_input.answers in POST /question-response. When false, return exactly one label.
pending_action.questions[].optionsarrayNoAt least one of: branch 1
List of options. When empty, this is a free-text question and any text is a valid answer.
pending_action.questions[].options[]objectNoAt least one of: branch 1
Additional fields: false
pending_action.questions[].options[].descriptionstringNoAt least one of: branch 1
Optional additional explanation of what selecting this option means.
pending_action.questions[].options[].labelstringYesAt least one of: branch 1
Return this string unchanged when answering. It identifies the option; it is not just display text.
pending_action.questions[].questionstringYesAt least one of: branch 1
Question text to display.
pending_action.tool_call_idstringYesAt least one of: branch 1
Return this as tool_call_id in POST /sessions/{id}/question-response. It associates the answer with the question asked.
pending_actionnullYesAt least one of: branch 2
—
session_idstringYesThe session this turn belongs to.
started_atstringYesWhen the turn started. ISO 8601, with microseconds and timezone.
statusstringYesHow this turn ended, or whether it has not ended yet. Read this field, not stop_reason, to determine successful versus abnormal termination.
stop_reasonstring | nullYesThe agent's stop reason, for example end_turn. null while the turn is executing or if it ended before reporting. Abnormal termination also reports end_turn, so use status to determine success.
turn_idstringYesThis turn's id.

Error responses

HTTPDescription and handling
defaultError. Branch on code, not just the HTTP status code—multiple conditions can share the same status code.
Retain the request ID and error fields in the response for troubleshooting. A write operation may already have taken effect after a timeout or disconnection. Do not automatically retry merely because no successful response was received.

Full field contract

The JSON below contains the complete request, response, and error schemas, nested constraints, and public extension definitions for this endpoint. Copy it for verification. Success examples not declared in the contract are not inferred.
{
  "components": {
    "schemas": {
      "SessionPublicErrorBody": {
        "additionalProperties": false,
        "properties": {
          "code": {
            "description": "Stable machine-readable error code. Branch on it rather than the HTTP status code, because different conditions can share the same status. New codes may be added; treat unrecognized values as unexpected errors in that HTTP status class.",
            "examples": [
              "VALIDATION_ERROR"
            ],
            "type": "string"
          },
          "detail": {
            "description": "Structured context whose shape depends on code—for example, the fields rejected by validation. null when no additional information is available."
          },
          "message": {
            "description": "Human-readable explanation for logs and error displays. The wording is not part of the contract and may change without a version increment.",
            "examples": [
              "Request validation failed"
            ],
            "type": "string"
          },
          "trace_id": {
            "description": "W3C trace id for this request. Include it when reporting problems—it locates the request in platform logs. If the request carried no trace context, this is 32 zero characters.",
            "examples": [
              "00000000000000000000000000000000"
            ],
            "type": "string"
          }
        },
        "required": [
          "code",
          "message",
          "detail",
          "trace_id"
        ],
        "type": "object"
      },
      "SessionPublicPendingAction": {
        "additionalProperties": false,
        "properties": {
          "asked_at": {
            "description": "When the agent asked the question. ISO 8601, with microseconds and timezone. The turn has been consuming wall-clock time since then, so treat older values as urgent.",
            "type": "string"
          },
          "questions": {
            "description": "Questions to display, ready to render. Usually only one. Answer in the same order in the answers array.",
            "items": {
              "$ref": "#/components/schemas/SessionPublicQuestion"
            },
            "type": "array"
          },
          "tool_call_id": {
            "description": "Return this as tool_call_id in POST /sessions/{id}/question-response. It associates the answer with the question asked.",
            "type": "string"
          }
        },
        "required": [
          "tool_call_id",
          "asked_at",
          "questions"
        ],
        "type": "object"
      },
      "SessionPublicQuestion": {
        "additionalProperties": false,
        "properties": {
          "header": {
            "description": "Optional short label for the question, suitable as a heading above it.",
            "type": "string"
          },
          "multi_select": {
            "description": "true means the agent requests multiple selections. ⚠️ The answer field **accepts only one string per question**, so multiple selections are written as text in that entry for the agent to interpret, not parsed—see `updated_input.answers` in `POST /question-response`. When false, return exactly one label.",
            "type": "boolean"
          },
          "options": {
            "description": "List of options. When empty, this is a free-text question and any text is a valid answer.",
            "items": {
              "$ref": "#/components/schemas/SessionPublicQuestionOption"
            },
            "type": "array"
          },
          "question": {
            "description": "Question text to display.",
            "type": "string"
          }
        },
        "required": [
          "question",
          "multi_select"
        ],
        "type": "object"
      },
      "SessionPublicQuestionOption": {
        "additionalProperties": false,
        "properties": {
          "description": {
            "description": "Optional additional explanation of what selecting this option means.",
            "type": "string"
          },
          "label": {
            "description": "Return this string unchanged when answering. It identifies the option; it is not just display text.",
            "type": "string"
          }
        },
        "required": [
          "label"
        ],
        "type": "object"
      },
      "SessionPublicSessionError": {
        "additionalProperties": false,
        "properties": {
          "category": {
            "description": "Problem category: quota, auth, permission, rate_limit, model_unavailable, timeout, content_rejected, input_too_large, input_invalid, limit_reached, service_error, or unknown. Open enum. For classification and statistics; branch on remedy instead, because the same category can require different actions. Treat unrecognized values as unknown.",
            "type": "string"
          },
          "code": {
            "description": "Machine-readable failure code. Open enum. Branch on known codes and handle the rest as generic failures.",
            "type": "string"
          },
          "message": {
            "description": "Human-readable explanation for logs and operational displays. The wording is not part of the contract and may change.",
            "type": "string"
          },
          "remedy": {
            "description": "Action required to resolve the error: retry, retry_after_backoff, switch_model, new_session, modify_input, reauthenticate, top_up_quota, contact_admin, refresh, or report. Open enum. Branch on this field. retry and retry_after_backoff mean the same request can be resent; all other values require a change first. new_session means the problem affects the entire session: create a new session instead of merely changing the prompt. Treat unrecognized values as requiring a change first.",
            "type": "string"
          },
          "trace_id": {
            "description": "Server trace id, identical to the X-Request-Id response header. Include it when reporting a problem—we use it to locate the request.",
            "type": "string"
          }
        },
        "required": [
          "code",
          "message"
        ],
        "type": "object"
      },
      "SessionPublicTurnDetail": {
        "additionalProperties": false,
        "properties": {
          "$schema": {
            "description": "URL of the JSON Schema for this object.",
            "examples": [
              "https://example.com/schemas/TurnDetail.json"
            ],
            "format": "uri",
            "readOnly": true,
            "type": "string"
          },
          "channel": {
            "description": "Source of this turn initiating prompt; null for unattributed historical turns.",
            "type": [
              "string",
              "null"
            ]
          },
          "ended_at": {
            "description": "When the turn ended, or null while still running. ISO 8601.",
            "examples": [
              "2026-08-24T09:16:22.905311+00:00"
            ],
            "type": [
              "string",
              "null"
            ]
          },
          "error": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/SessionPublicSessionError"
              },
              {
                "type": "null"
              }
            ],
            "description": "Structured failure details. null unless status is failed."
          },
          "final_message": {
            "description": "The agent's closing text, complete and untruncated. null when the turn ends with a tool call that has no user-facing output. This is the last contiguous text segment, not the full response.",
            "type": [
              "string",
              "null"
            ]
          },
          "interrupt_reason": {
            "description": "What ended this turn. Non-null only when status is interrupted. Values: \"user_requested\", \"runtime_restarted\", \"runtime_unavailable\", \"session_ended\", or \"action_required_timeout\". Open enum; treat unrecognized values as non-retryable.",
            "type": [
              "string",
              "null"
            ]
          },
          "items": {
            "description": "Items the agent presented during this turn. An empty array when nothing was presented. Files written to the output directory are listed by GET /sessions/{id}/output. If output_count in the turn list is not 0 but this array is empty, the read is incomplete and can be retried.",
            "items": {
              "$ref": "#/components/schemas/SessionPublicTurnItem"
            },
            "type": "array"
          },
          "meta": {
            "additionalProperties": false,
            "description": "Public metadata of the initiating prompt, when recorded.",
            "properties": {
              "pa_str": {
                "type": "string"
              }
            },
            "type": "object"
          },
          "pending_action": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/SessionPublicPendingAction"
              },
              {
                "type": "null"
              }
            ],
            "description": "The question blocking this turn, or null if none. Non-null if and only if status is action_required."
          },
          "session_id": {
            "description": "The session this turn belongs to.",
            "examples": [
              "0b9f2c14-6d3a-4f18-9c27-8ae5d1b47f30"
            ],
            "type": "string"
          },
          "started_at": {
            "description": "When the turn started. ISO 8601, with microseconds and timezone.",
            "type": "string"
          },
          "status": {
            "description": "How this turn ended, or whether it has not ended yet. Read this field, not stop_reason, to determine successful versus abnormal termination.",
            "type": "string"
          },
          "stop_reason": {
            "description": "The agent's stop reason, for example end_turn. null while the turn is executing or if it ended before reporting. Abnormal termination also reports end_turn, so use status to determine success.",
            "examples": [
              "end_turn"
            ],
            "type": [
              "string",
              "null"
            ]
          },
          "turn_id": {
            "description": "This turn's id.",
            "examples": [
              "2f7a1e88-4c05-4b93-8d61-3ea90c5b7d24"
            ],
            "type": "string"
          }
        },
        "required": [
          "turn_id",
          "session_id",
          "status",
          "stop_reason",
          "interrupt_reason",
          "final_message",
          "error",
          "pending_action",
          "items",
          "started_at",
          "ended_at"
        ],
        "type": "object"
      },
      "SessionPublicTurnItem": {
        "discriminator": {
          "mapping": {
            "document_review": "#/components/schemas/SessionPublicTurnItemDocumentReviewItem",
            "file": "#/components/schemas/SessionPublicTurnItemFileItem",
            "web_app": "#/components/schemas/SessionPublicTurnItemWebAppItem"
          },
          "propertyName": "type"
        },
        "oneOf": [
          {
            "$ref": "#/components/schemas/SessionPublicTurnItemFileItem"
          },
          {
            "$ref": "#/components/schemas/SessionPublicTurnItemWebAppItem"
          },
          {
            "$ref": "#/components/schemas/SessionPublicTurnItemDocumentReviewItem"
          },
          {
            "$ref": "#/components/schemas/SessionPublicTurnItemUnknownItem"
          }
        ]
      },
      "SessionPublicTurnItemDocumentReview": {
        "additionalProperties": false,
        "properties": {
          "findings": {
            "description": "Issues found; present when verdict is \"failed\".",
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "path": {
            "description": "Workspace path of the reviewed document. A turn may review multiple documents, so use this to associate verdict and findings with the specific file.",
            "type": "string"
          },
          "verdict": {
            "description": "\"passed\" or \"failed\".",
            "type": "string"
          }
        },
        "required": [
          "verdict"
        ],
        "type": "object"
      },
      "SessionPublicTurnItemDocumentReviewItem": {
        "additionalProperties": false,
        "description": "Present when type is \"document_review\".",
        "properties": {
          "created_at": {
            "description": "When this item was produced. ISO 8601, with microseconds and timezone.",
            "type": "string"
          },
          "document_review": {
            "$ref": "#/components/schemas/SessionPublicTurnItemDocumentReview"
          },
          "tool_call_id": {
            "description": "The tool call that produced this item. Correlate it with tool_call / tool_call_update events in the event stream.",
            "type": "string"
          },
          "type": {
            "description": "Item type, determining which other fields exist. Open enum; skip unrecognized types rather than raising an error.",
            "enum": [
              "document_review"
            ],
            "type": "string"
          }
        },
        "required": [
          "type",
          "created_at",
          "document_review"
        ],
        "title": "TurnItemDocumentReviewItem",
        "type": "object"
      },
      "SessionPublicTurnItemFile": {
        "additionalProperties": false,
        "properties": {
          "alt": {
            "description": "The agent's description of this file. Suitable as a caption or alt text.",
            "type": "string"
          },
          "barn_id": {
            "description": "Storage id; exchange it for a download URL.",
            "type": "string"
          },
          "mime_type": {
            "description": "Content type, for example application/pdf.",
            "type": "string"
          },
          "path": {
            "description": "Storage path, not a URL. Exchange it for a download link when you need the file content; presigned URLs expire, so they are issued on demand rather than listed here.",
            "type": "string"
          },
          "size": {
            "description": "Size in bytes.",
            "format": "int64",
            "type": "integer"
          }
        },
        "required": [
          "path"
        ],
        "type": "object"
      },
      "SessionPublicTurnItemFileItem": {
        "additionalProperties": false,
        "description": "Present when type is \"file\".",
        "properties": {
          "created_at": {
            "description": "When this item was produced. ISO 8601, with microseconds and timezone.",
            "type": "string"
          },
          "file": {
            "$ref": "#/components/schemas/SessionPublicTurnItemFile"
          },
          "tool_call_id": {
            "description": "The tool call that produced this item. Correlate it with tool_call / tool_call_update events in the event stream.",
            "type": "string"
          },
          "type": {
            "description": "Item type, determining which other fields exist. Open enum; skip unrecognized types rather than raising an error.",
            "enum": [
              "file"
            ],
            "type": "string"
          }
        },
        "required": [
          "type",
          "created_at",
          "file"
        ],
        "title": "TurnItemFileItem",
        "type": "object"
      },
      "SessionPublicTurnItemUnknownItem": {
        "description": "Item types added after this document was written. Only the fields common to all items are guaranteed. Skip them rather than raising an error.",
        "properties": {
          "created_at": {
            "description": "When this item was produced. ISO 8601, with microseconds and timezone.",
            "type": "string"
          },
          "tool_call_id": {
            "description": "The tool call that produced this item. Correlate it with tool_call / tool_call_update events in the event stream.",
            "type": "string"
          },
          "type": {
            "description": "Item type, determining which other fields exist. Open enum; skip unrecognized types rather than raising an error.",
            "not": {
              "enum": [
                "file",
                "web_app",
                "document_review"
              ]
            },
            "type": "string"
          }
        },
        "required": [
          "type",
          "created_at"
        ],
        "title": "TurnItemUnknownItem",
        "type": "object"
      },
      "SessionPublicTurnItemWebApp": {
        "additionalProperties": false,
        "properties": {
          "live_preview": {
            "description": "true means this turn provided a page that may still be viewable live. This is a flag, not a URL: addresses are short-lived, so the live section of GET /sessions/{id}/output issues them on demand.",
            "type": "boolean"
          },
          "published_url": {
            "description": "A persistent address, present only if the page was actually published. Safe to store and share—unlike live previews, it outlives the runtime.",
            "type": "string"
          },
          "source_dir": {
            "description": "The application's directory in this session's workspace.",
            "type": "string"
          },
          "static": {
            "description": "true for a static site; false when a running server is required. Static sites can be published persistently; dynamic applications exist only while the runtime is alive.",
            "type": "boolean"
          }
        },
        "type": "object"
      },
      "SessionPublicTurnItemWebAppItem": {
        "additionalProperties": false,
        "description": "Present when type is \"web_app\".",
        "properties": {
          "created_at": {
            "description": "When this item was produced. ISO 8601, with microseconds and timezone.",
            "type": "string"
          },
          "tool_call_id": {
            "description": "The tool call that produced this item. Correlate it with tool_call / tool_call_update events in the event stream.",
            "type": "string"
          },
          "type": {
            "description": "Item type, determining which other fields exist. Open enum; skip unrecognized types rather than raising an error.",
            "enum": [
              "web_app"
            ],
            "type": "string"
          },
          "web_app": {
            "$ref": "#/components/schemas/SessionPublicTurnItemWebApp"
          }
        },
        "required": [
          "type",
          "created_at",
          "web_app"
        ],
        "title": "TurnItemWebAppItem",
        "type": "object"
      },
      "SessionRelayError": {
        "additionalProperties": false,
        "properties": {
          "error": {
            "type": "string"
          },
          "error_code": {
            "type": "string"
          },
          "error_description": {
            "type": "string"
          }
        },
        "required": [
          "error",
          "error_description",
          "error_code"
        ],
        "type": "object"
      }
    },
    "securitySchemes": {
      "OpenPlatformBearer": {
        "description": "Authorization: Bearer <access_token>; JSON Content-Type: application/json; charset=utf-8. The current CN Review temporarily allows access only for routing debugging.",
        "scheme": "bearer",
        "type": "http"
      }
    }
  },
  "openapi": "3.1.0",
  "paths": {
    "/v1/session/sessions/{session_id}/turns/{turn_id}": {
      "get": {
        "description": "Omitting session_type selects a cloud session. Every remote-control request must use session_type=remote and provide a nonempty device_id. Providing device_id for a cloud session, an empty or unknown type, or duplicate target parameters returns 422 VALIDATION_ERROR. Cross-device aggregated lists and automatic fallback to cloud are not provided. Both types use the same authentication chain; the open platform validates the corresponding Scope declared by each endpoint.\n\nCloud sessions:\nReturns a single turn, including fields omitted from list rows:\n\n- `final_message` is the full text, without truncation.\n- `items` lists what the agent presented during this turn, discriminated by `type`:\n  - `file`—a file the agent explicitly **presented** to the user as part of its response, not every file it wrote. `alt` is the agent's own description, usable directly as a caption. `path` is a storage path, not a URL; exchange it for a download link when you need the bytes.\n  - `web_app`—a Web application started by the agent.\n  - `document_review`—a reviewed document, including `verdict` and `findings`.\n\nFiles the agent merely wrote are not items; they appear in `GET /sessions/{session_id}/output`.\n\nFor `web_app`, `published_url` is a persistent address. `live_preview: true` means a live view may exist while the runtime is alive. Its address is returned in the `live` section of `GET /sessions/{session_id}/output`, not embedded here.\n\nRemote-control sessions: This operation returns 422 OPERATION_NOT_SUPPORTED without contacting the target device.\nCall through the open platform, retaining the existing oauth_app Token, identity resolution, application IP restrictions, and resource ownership checks. Cloud and remote-control parameters retain their actual contract semantics.",
        "operationId": "publishedGet-turn",
        "parameters": [
          {
            "description": "Session identifier: a UUID for cloud sessions; an opaque identifier on the selected device for remote-control sessions.",
            "in": "path",
            "name": "session_id",
            "required": true,
            "schema": {
              "maxLength": 256,
              "minLength": 1,
              "type": "string"
            }
          },
          {
            "description": "Turn id, for example one obtained from GET /sessions/{session_id}/turns.",
            "in": "path",
            "name": "turn_id",
            "required": true,
            "schema": {
              "description": "Turn id, for example one obtained from GET /sessions/{session_id}/turns.",
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "Omitting session_type selects a cloud session. Every remote-control request must use session_type=remote and provide a nonempty device_id. Providing device_id for a cloud session, an empty or unknown type, or duplicate target parameters returns 422 VALIDATION_ERROR. Cross-device aggregated lists and automatic fallback to cloud are not provided. Both types use the same authentication chain; The upstream does not validate OAuth session scope; the open platform validates the corresponding Scope according to the manifest.",
            "in": "query",
            "name": "session_type",
            "schema": {
              "default": "cloud",
              "enum": [
                "cloud",
                "remote"
              ],
              "type": "string"
            }
          },
          {
            "description": "Required only for remote control. An opaque target device identifier from device discovery; it must be URL-encoded. The target connection must be signed in to the currently authenticated account.",
            "in": "query",
            "name": "device_id",
            "schema": {
              "maxLength": 256,
              "minLength": 1,
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SessionPublicTurnDetail"
                }
              }
            },
            "description": "Success",
            "headers": {
              "X-Request-ID": {
                "description": "Request ID generated by the open platform for each HTTP request, for log correlation and troubleshooting. Retries generate new IDs; this is not an idempotency key or distributed Trace ID.",
                "schema": {
                  "pattern": "^[0-9a-f]{32}$",
                  "type": "string"
                }
              },
              "X-Trace-ID": {
                "description": "OpenTelemetry TraceID for the current open-platform request, correlated with X-Request-ID through request logs. A complete trace may be unavailable if the sample was not retained.",
                "schema": {
                  "pattern": "^[0-9a-f]{32}$",
                  "type": "string"
                }
              }
            }
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/SessionPublicErrorBody"
                    },
                    {
                      "$ref": "#/components/schemas/SessionRelayError"
                    }
                  ]
                }
              }
            },
            "description": "Error. Branch on `code`, not just the HTTP status code—multiple conditions can share the same status code.",
            "headers": {
              "X-Request-ID": {
                "description": "Request ID generated by the open platform for each HTTP request, for log correlation and troubleshooting. Retries generate new IDs; this is not an idempotency key or distributed Trace ID.",
                "schema": {
                  "pattern": "^[0-9a-f]{32}$",
                  "type": "string"
                }
              },
              "X-Trace-ID": {
                "description": "OpenTelemetry TraceID for the current open-platform request, correlated with X-Request-ID through request logs. A complete trace may be unavailable if the sample was not retained.",
                "schema": {
                  "pattern": "^[0-9a-f]{32}$",
                  "type": "string"
                }
              }
            }
          }
        },
        "security": [
          {
            "OpenPlatformBearer": []
          }
        ],
        "summary": "Cloud only: Get a single turn",
        "tags": [
          "会话轮次"
        ],
        "x-session-variants": {
          "cloud": {
            "summary": "Get a single turn",
            "description": "Returns a single turn, including fields omitted from list rows:\n\n- `final_message` is the full text, without truncation.\n- `items` lists what the agent presented during this turn, discriminated by `type`:\n  - `file`—a file the agent explicitly **presented** to the user as part of its response, not every file it wrote. `alt` is the agent's own description, usable directly as a caption. `path` is a storage path, not a URL; exchange it for a download link when you need the bytes.\n  - `web_app`—a Web application started by the agent.\n  - `document_review`—a reviewed document, including `verdict` and `findings`.\n\nFiles the agent merely wrote are not items; they appear in `GET /sessions/{session_id}/output`.\n\nFor `web_app`, `published_url` is a persistent address. `live_preview: true` means a live view may exist while the runtime is alive. Its address is returned in the `live` section of `GET /sessions/{session_id}/output`, not embedded here.",
            "parameters": [
              {
                "description": "Session ID.",
                "in": "path",
                "name": "session_id",
                "required": true,
                "schema": {
                  "description": "Session ID.",
                  "format": "uuid",
                  "type": "string"
                }
              },
              {
                "description": "Turn id, for example one obtained from GET /sessions/{session_id}/turns.",
                "in": "path",
                "name": "turn_id",
                "required": true,
                "schema": {
                  "description": "Turn id, for example one obtained from GET /sessions/{session_id}/turns.",
                  "format": "uuid",
                  "type": "string"
                }
              }
            ],
            "requestBody": null,
            "responses": {
              "200": {
                "content": {
                  "application/json": {
                    "schema": {
                      "$ref": "#/components/schemas/SessionPublicTurnDetail"
                    }
                  }
                },
                "description": "Success"
              }
            }
          }
        },
        "x-supported-session-types": [
          "cloud"
        ]
      }
    }
  },
  "info": {
    "title": "Cloud only: Get a single turn",
    "version": "2026-11-24"
  },
  "servers": [
    {
      "url": "https://openapi.qwenwork.ai"
    }
  ]
}
Back to the OpenAPI overview.