Call requirements, permissions, request fields, response fields, and error handling.
Request and permissions
GET https://openapi.qwenwork.ai/v1/session/session-modes
Authentication: Authorization: Bearer <access_token>; use an access token obtained through user OAuth authorization.
Required business Scope: session.mode.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
Returns mode values the caller can pass to POST /sessions. The mode used when mode is omitted is marked default: true.
The set is resolved per request and varies by account and deployment, so obtain it from this endpoint rather than hard-coding it. This is also why mode is an open enum: a closed enum would make generated clients reject tiers the account actually has.
name is the display name, localized according to Accept-Language (zh or en). So is description—a one-sentence explanation of what the tier does best. This endpoint's response alone is enough to build a selector. mode is the value to send back to this API.
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.
Header parameters
| Parameter | Type | Required | Description and constraints |
|---|---|---|---|
Accept-Language | string | No | Language for the human-readable name and description fields. Only Chinese and English are supported: values starting with zh select Chinese; every other value—including omitting this header—selects English. Language for the human-readable name and description fields. Only Chinese and English are supported: values starting with zh select Chinese; every other value—including omitting this header—selects English. |
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
| Field | Type | Required | Description and constraints |
|---|---|---|---|
$schema | string | No | URL of the JSON Schema for this object. Format: "uri" |
items | array | Yes | Modes available to this account. Resolved per request, not a global catalogue, so do not reuse across accounts. |
items[] | object | No | Additional fields: false |
items[].default | boolean | Yes | Whether this mode is selected when POST /sessions omits mode. Resolved per request; if no mode is marked as default, mode must be passed explicitly. |
items[].description | string | No | One-sentence explanation of what this mode does best, localized according to Accept-Language. Display next to name in a selector. May be absent; treat as optional rather than assuming it always has a value. |
items[].mode | string | Yes | Value to pass as mode in POST /sessions. |
items[].name | string | Yes | Display name, localized according to Accept-Language. Use this for people and mode for API requests. |
Error responses
| HTTP | Description and handling |
|---|---|
default | Error. Branch on code, not just the HTTP status code—multiple conditions can share the same status code. |
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.
Full OpenAPI JSON
Full OpenAPI JSON