'1.0', 'info' => ['style' => 'ROA', 'product' => 'PAICopilot', 'version' => '2025-07-31'], 'directories' => ['SearchInfo', 'CreateChat', 'CreateSession', 'DeleteChat', 'DeleteSession', 'GetChat', 'GetSession', 'ListChats', 'ListSessions'], 'components' => [ 'schemas' => [ 'Chat' => [ 'description' => 'The conversation details.', 'type' => 'object', 'properties' => [ 'ChatId' => ['description' => 'Chat ID. ', 'type' => 'string', 'example' => 'chat-jkd******', 'title' => ''], 'GmtCreateTime' => ['description' => 'Creation UTC time, in ISO8601 date format. ', 'type' => 'string', 'format' => 'iso8601_normal', 'example' => '2021-01-21T17:12:35Z', 'title' => ''], 'GmtModified' => ['description' => 'Modification UTC time, in ISO8601 date format. ', 'type' => 'string', 'format' => 'iso8601_normal', 'example' => '2026-01-20T09:41:23Z', 'title' => ''], 'Question' => ['description' => 'Customer question. ', '$ref' => '#/components/schemas/ChatDetail', 'title' => '', 'example' => ''], 'Answer' => ['description' => 'Customer reply. ', '$ref' => '#/components/schemas/ChatDetail', 'title' => '', 'example' => ''], 'OwnerId' => ['description' => 'Parent Creator. ', 'type' => 'string', 'example' => '1500******860', 'title' => ''], 'UserId' => ['description' => 'Creator. ', 'type' => 'string', 'example' => '2100******360', 'title' => ''], 'Title' => ['description' => 'Question title. ', 'type' => 'string', 'example' => 'how to ******', 'title' => ''], 'SessionId' => ['description' => 'Session ID. ', 'type' => 'string', 'example' => 'se-dss******', 'title' => ''], 'Status' => ['description' => 'Status. The following values are supported: '."\n" .'- Canceled: abort '."\n" .'- Running: running '."\n" .'- Completed: Normal End '."\n" .'- Error: fault '."\n" .'- Canceling: aborting '."\n" .'- Interrupted: pause ', 'type' => 'string', 'example' => 'Running', 'title' => ''], 'ExtraData' => ['description' => 'Extra Data. Currently used in Update to store the Result of the User\'s operation to change specifications. ', 'type' => 'string', 'example' => '{"solutionDetail":{"formValues":{"params":{"InstanceId":"dsw-g54******qg9"},"content":{"EcsSpec":"ecs.gn6i-c8g1.2xlarge"}},"success":true}}', 'title' => ''], 'Message' => ['description' => 'This field is deprecated. ', 'type' => 'string', 'example' => 'how to ******', 'title' => ''], ], 'title' => '', 'example' => '', ], 'ChatDetail' => [ 'description' => 'The Q&A details.', 'type' => 'object', 'properties' => [ 'UserInfo' => [ 'description' => 'The user information.', 'type' => 'object', 'properties' => [ 'Role' => ['description' => 'The role. Valid values:'."\n" .'- assistant: intelligent assistant'."\n" .'- customer: customer.', 'type' => 'string', 'title' => '', 'example' => 'assistant'], 'Name' => ['description' => 'The username.', 'type' => 'string', 'title' => '', 'example' => 'to******'], ], 'title' => '', 'example' => '', ], 'Content' => ['description' => 'The Q&A content.', 'type' => 'string', 'title' => '', 'example' => '你好******'], 'GmtCreateTime' => ['description' => 'The creation time in UTC. The time is in the ISO 8601 format.', 'type' => 'string', 'title' => '', 'example' => '2021-01-21T17:12:35Z', 'format' => 'iso8601_normal'], ], 'title' => '', 'example' => '', ], 'Feedback' => [ 'type' => 'object', 'properties' => [ 'FeedbackId' => ['type' => 'string'], 'GmtCreateTime' => ['type' => 'string', 'format' => 'iso8601_normal'], 'GmtModified' => ['type' => 'string', 'format' => 'iso8601_normal'], 'FeedbackAction' => ['type' => 'string'], 'FeedbackMessage' => ['type' => 'string'], 'OwnerId' => ['type' => 'string'], 'UserId' => ['type' => 'string'], 'SessionId' => ['type' => 'string'], 'ChatId' => ['type' => 'string'], ], ], 'Label' => [ 'description' => 'The label.', 'type' => 'object', 'properties' => [ 'Key' => ['description' => 'Tag key. The following keys are supported: '."\n" ."\n" .'- system.resource.id: instance ID '."\n" .'- system.resource.type: instance type within a product (a product may have multiple instance types) '."\n" .' DSW includes Instance, IdleCuller, etc.; '."\n" .' DLC includes Job, Tensorboard, etc.; '."\n" .' EAS includes Service, ResourceGroup, etc.; '."\n" .' TrainingService includes TrainingJob; '."\n" .'- system.product.type: product type, supporting DLC, DSW, EAS, Designer, Paiflow, LangStudio, Image, CodeSource, Dataset, and TrainingService '."\n" .'- system.source.type: source type, supporting ModelGallery ', 'type' => 'string', 'title' => '', 'example' => ''], 'Value' => ['description' => 'Tag value. ', 'type' => 'string', 'title' => '', 'example' => ''], ], 'title' => '', 'example' => '', ], 'Session' => [ 'type' => 'object', 'properties' => [ 'SessionId' => ['type' => 'string'], 'GmtCreateTime' => ['type' => 'string', 'format' => 'iso8601_normal'], 'GmtModified' => ['type' => 'string', 'format' => 'iso8601_normal'], 'OwnerId' => ['type' => 'string'], 'UserId' => ['type' => 'string'], 'SessionTitle' => ['type' => 'string'], ], ], ], ], 'apis' => [ 'CreateChat' => [ 'path' => '/api/v1/sessions/{SessionId}/chats', 'methods' => ['post'], 'schemes' => ['https', 'sse'], 'security' => [ [ 'AK' => [], ], ], 'consumes' => ['application/json'], 'produces' => [], 'operationType' => 'write', 'deprecated' => false, 'systemTags' => [ 'operationType' => 'create', 'riskType' => 'none', 'chargeType' => 'free', 'abilityTreeNodes' => ['FEATURElearnOTS2AE'], 'autoTest' => true, 'tenantRelevance' => 'tenant', ], 'parameters' => [ [ 'name' => 'SessionId', 'in' => 'path', 'schema' => ['description' => 'The ID of the session to which the conversation belongs.', 'type' => 'string', 'required' => true, 'example' => 'se-982******q0j9f', 'title' => ''], ], [ 'name' => 'body', 'in' => 'body', 'style' => 'json', 'schema' => [ 'description' => 'The Chat request body.', 'type' => 'object', 'properties' => [ 'Title' => ['description' => 'The title. If this parameter is left empty, the first 32 characters of the user Question are used.', 'type' => 'string', 'required' => false, 'example' => '如何******', 'title' => ''], 'ExtraData' => ['description' => 'The extra data. Currently used in Update to store the result of a user specification change operation.', 'type' => 'string', 'required' => false, 'example' => '{"solutionDetail":{"formValues":{"params":{"InstanceId":"dsw-g54******qg9"},"content":{"EcsSpec":"ecs.gn6i-c8g1.2xlarge"}},"success":true}}', 'title' => ''], 'Question' => ['description' => 'The conversation content.', '$ref' => '#/components/schemas/ChatDetail', 'required' => false, 'title' => '', 'example' => ''], 'Payload' => ['description' => 'The environment context. The format is as follows:'."\n" .'{'."\n" .' "context": {'."\n" .' "path": "The path of the current page",'."\n" .' "title": "The title of the current page",'."\n" .' "currentTime": "The current time"'."\n" .' },'."\n" .' "resourceInfo": {'."\n" .' "product": "The product"'."\n" .' }'."\n" .' }.', 'type' => 'object', 'required' => false, 'example' => '{'."\n" .' "context": {'."\n" .' "path": "/workspace/overview",'."\n" .' "title": "人工智能平台PAI",'."\n" .' "currentTime": "2026-04-13T01:42:31.289Z"'."\n" .' },'."\n" .' "resourceInfo": {'."\n" .' "product": "dsw"'."\n" .' }'."\n" .' }', 'title' => ''], ], 'required' => false, 'title' => '', 'example' => '', ], ], ], 'responses' => [ 200 => [ 'schema' => [ 'title' => '', 'description' => 'The response body.', 'type' => 'object', 'properties' => [ 'RequestId' => ['title' => '', 'description' => 'The request ID.', 'type' => 'string', 'example' => '44553E9A-******-37ADC33FE2'], 'ChatId' => ['description' => 'The ID of the chat.', 'type' => 'string', 'example' => 'chat-jkd******', 'title' => ''], 'ErrorCode' => ['description' => 'The error code.', 'type' => 'string', 'example' => '2187322', 'title' => ''], 'ErrorMessage' => ['description' => 'The error message.', 'type' => 'string', 'example' => 'Stream error', 'title' => ''], 'Answer' => ['description' => 'The streaming reply.', '$ref' => '#/components/schemas/ChatDetail', 'title' => '', 'example' => ''], 'GmtCreateTime' => ['description' => 'The creation time in UTC. The date format follows ISO 8601.', 'type' => 'string', 'format' => 'iso8601_normal', 'example' => '2021-01-21T17:12:35Z', 'title' => ''], 'Status' => ['description' => 'The status. Valid values:'."\n" .'- Canceled: canceled.'."\n" .'- Running: running.'."\n" .'- Completed: completed.'."\n" .'- Error: an error occurred.'."\n" .'- Canceling: being canceled.'."\n" .'- Interrupted: paused.', 'type' => 'string', 'example' => 'Running', 'title' => ''], 'SessionId' => ['description' => 'The ID of the session.', 'type' => 'string', 'example' => 'se-dss******', 'title' => ''], ], 'example' => '', ], ], ], 'errorCodes' => [ 400 => [ ['errorCode' => 'IdempotentParameterMismatch', 'errorMessage' => 'The request uses the same client token as a previous, but non-identical request. Do not reuse a client token with different requests, unless the requests are identical.', 'description' => ''], ], ], 'staticInfo' => ['returnType' => 'synchronous'], 'title' => 'Create a conversation using the SSE protocol', 'summary' => 'Creates a conversation using the SSE protocol. The conversation results are pushed by the server.', 'changeSet' => [], 'flowControl' => [ 'flowControlList' => [], ], 'translator' => 'machine', 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"RequestId\\": \\"44553E9A-******-37ADC33FE2\\",\\n \\"ChatId\\": \\"chat-jkd******\\",\\n \\"ErrorCode\\": \\"2187322\\",\\n \\"ErrorMessage\\": \\"Stream error\\",\\n \\"Answer\\": {\\n \\"UserInfo\\": {\\n \\"Role\\": \\"assistant\\",\\n \\"Name\\": \\"to******\\"\\n },\\n \\"Content\\": \\"你好******\\",\\n \\"GmtCreateTime\\": \\"2021-01-21T17:12:35Z\\"\\n },\\n \\"GmtCreateTime\\": \\"2021-01-21T17:12:35Z\\",\\n \\"Status\\": \\"Running\\",\\n \\"SessionId\\": \\"se-dss******\\"\\n}","type":"json"}]', ], 'CreateSession' => [ 'path' => '/api/v1/sessions', 'methods' => ['post'], 'schemes' => ['https'], 'security' => [ [ 'AK' => [], ], ], 'consumes' => ['application/json'], 'produces' => ['application/json'], 'operationType' => 'write', 'deprecated' => false, 'systemTags' => [ 'operationType' => 'create', 'riskType' => 'none', 'chargeType' => 'free', 'abilityTreeNodes' => ['FEATURElearnOTS2AE'], 'autoTest' => true, 'tenantRelevance' => 'tenant', ], 'parameters' => [ [ 'name' => 'body', 'in' => 'body', 'style' => 'json', 'schema' => [ 'description' => 'The session request body.', 'type' => 'object', 'properties' => [ 'Title' => ['description' => 'The title of the session. If left empty, a title is automatically generated based on the chat content. Maximum length: 32 characters.', 'type' => 'string', 'required' => false, 'example' => '如何*******', 'title' => ''], 'Labels' => [ 'description' => 'The list of labels.', 'type' => 'array', 'items' => ['description' => 'The label.', '$ref' => '#/components/schemas/Label', 'required' => false, 'title' => '', 'example' => ''], 'required' => false, 'title' => '', 'example' => '', ], ], 'required' => false, 'title' => '', 'example' => '', ], ], ], 'responses' => [ 200 => [ 'schema' => [ 'title' => '', 'description' => 'Schema of Response', 'type' => 'object', 'properties' => [ 'RequestId' => ['title' => '', 'description' => 'The request ID.', 'type' => 'string', 'example' => '44553E9A-******-37ADC33FE2'], 'SessionId' => ['description' => 'The session ID.', 'type' => 'string', 'example' => 'se-weg******iqwcw', 'title' => ''], ], 'example' => '', ], ], ], 'errorCodes' => [ 400 => [ ['errorCode' => 'IdempotentParameterMismatch', 'errorMessage' => 'The request uses the same client token as a previous, but non-identical request. Do not reuse a client token with different requests, unless the requests are identical.', 'description' => ''], ], ], 'staticInfo' => ['returnType' => 'synchronous'], 'title' => 'Create a session', 'summary' => 'Creates a session. Each time a chat is created, previous chats within the same session are included as historical messages.', 'changeSet' => [], 'flowControl' => [ 'flowControlList' => [], ], 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"RequestId\\": \\"44553E9A-******-37ADC33FE2\\",\\n \\"SessionId\\": \\"se-weg******iqwcw\\"\\n}","type":"json"}]', 'translator' => 'machine', ], 'DeleteChat' => [ 'summary' => 'Deletes a Chat.', 'path' => '/api/v1/sessions/{SessionId}/chats/{ChatId}', 'methods' => ['delete'], 'schemes' => ['https'], 'security' => [ [ 'AK' => [], ], ], 'consumes' => ['application/json'], 'produces' => ['application/json'], 'operationType' => 'write', 'deprecated' => false, 'systemTags' => [ 'operationType' => 'delete', 'riskType' => 'none', 'chargeType' => 'free', 'abilityTreeNodes' => ['FEATURElearnOTS2AE'], 'autoTest' => true, 'tenantRelevance' => 'tenant', ], 'parameters' => [ [ 'name' => 'SessionId', 'in' => 'path', 'schema' => ['description' => 'The ID of the session.', 'type' => 'string', 'required' => true, 'example' => 'se-dss******', 'title' => ''], ], [ 'name' => 'ChatId', 'in' => 'path', 'schema' => ['description' => 'The ID of the Chat.', 'type' => 'string', 'required' => false, 'example' => 'chat-jkd******', 'title' => ''], ], ], 'responses' => [ 200 => [ 'schema' => [ 'title' => '', 'description' => 'The response body.', 'type' => 'object', 'properties' => [ 'RequestId' => ['title' => '', 'description' => 'The request ID.', 'type' => 'string', 'example' => '44553E9A-******-37ADC33FE2'], ], 'example' => '', ], ], ], 'errorCodes' => [ 400 => [ ['errorCode' => 'IdempotentParameterMismatch', 'errorMessage' => 'The request uses the same client token as a previous, but non-identical request. Do not reuse a client token with different requests, unless the requests are identical.', 'description' => ''], ], ], 'staticInfo' => ['returnType' => 'synchronous'], 'title' => 'Delete a chat', 'changeSet' => [], 'flowControl' => [ 'flowControlList' => [], ], 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"RequestId\\": \\"44553E9A-******-37ADC33FE2\\"\\n}","type":"json"}]', 'translator' => 'machine', ], 'DeleteSession' => [ 'path' => '/api/v1/sessions/{SessionId}', 'methods' => ['delete'], 'schemes' => ['https'], 'security' => [ [ 'AK' => [], ], ], 'consumes' => ['application/json'], 'produces' => ['application/json'], 'operationType' => 'write', 'deprecated' => false, 'systemTags' => [ 'operationType' => 'delete', 'riskType' => 'none', 'chargeType' => 'free', 'abilityTreeNodes' => ['FEATURElearnOTS2AE'], 'autoTest' => true, 'tenantRelevance' => 'tenant', ], 'parameters' => [ [ 'name' => 'SessionId', 'in' => 'path', 'allowEmptyValue' => false, 'schema' => ['title' => '', 'description' => 'The ID of the session.', 'type' => 'string', 'required' => false, 'example' => 'se-gac******idtv'], ], ], 'responses' => [ 200 => [ 'schema' => [ 'title' => '', 'description' => 'The response body.', 'type' => 'object', 'properties' => [ 'RequestId' => ['title' => '', 'description' => 'The request ID.', 'type' => 'string', 'example' => '44553E9A-******-37ADC33FE2'], 'SessionId' => ['description' => 'The ID of the session.', 'type' => 'string', 'example' => 'se-p4k******vx2y', 'title' => ''], ], 'example' => '', ], ], ], 'errorCodes' => [ 400 => [ ['errorCode' => 'IdempotentParameterMismatch', 'errorMessage' => 'The request uses the same client token as a previous, but non-identical request. Do not reuse a client token with different requests, unless the requests are identical.', 'description' => ''], ], ], 'staticInfo' => ['returnType' => 'synchronous'], 'title' => 'Delete a session', 'summary' => 'Deletes a session and all associated chats.', 'changeSet' => [], 'flowControl' => [ 'flowControlList' => [], ], 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"RequestId\\": \\"44553E9A-******-37ADC33FE2\\",\\n \\"SessionId\\": \\"se-p4k******vx2y\\"\\n}","type":"json"}]', 'translator' => 'machine', ], 'GetChat' => [ 'path' => '/api/v1/sessions/{SessionId}/chats/{ChatId}', 'methods' => ['get'], 'schemes' => ['https'], 'security' => [ [ 'AK' => [], ], ], 'consumes' => ['application/json'], 'produces' => ['application/json'], 'operationType' => 'read', 'deprecated' => false, 'systemTags' => [ 'operationType' => 'get', 'riskType' => 'none', 'chargeType' => 'free', 'abilityTreeNodes' => ['FEATURElearnOTS2AE'], 'autoTest' => true, 'tenantRelevance' => 'tenant', ], 'parameters' => [ [ 'name' => 'ChatId', 'in' => 'path', 'schema' => ['description' => 'The ID of the conversation.', 'type' => 'string', 'required' => true, 'example' => 'chat-jkd******', 'title' => ''], ], [ 'name' => 'Verbose', 'in' => 'query', 'schema' => ['description' => 'Specifies whether to display certain fields. Currently supported values:'."\n" .'- QuestionAndAnswer (not displayed by default, represents questions and answers).', 'type' => 'string', 'required' => false, 'example' => 'QuestionAndAnswer', 'title' => ''], ], [ 'name' => 'SessionId', 'in' => 'path', 'schema' => ['description' => 'The ID of the session.', 'type' => 'string', 'required' => true, 'example' => 'se-dss******', 'title' => ''], ], ], 'responses' => [ 200 => [ 'schema' => [ 'title' => '', 'description' => 'The response body.', 'type' => 'object', 'properties' => [ 'RequestId' => ['title' => '', 'description' => 'The request ID.', 'type' => 'string', 'example' => '44553E9A-******-37ADC33FE2'], 'ChatId' => ['description' => 'The ID of the chat.', 'type' => 'string', 'example' => 'chat-jkd******', 'title' => ''], 'GmtCreateTime' => ['description' => 'The creation time in UTC. The time is in the ISO 8601 format.', 'type' => 'string', 'format' => 'iso8601_normal', 'example' => '2021-01-21T17:12:35Z', 'title' => ''], 'GmtModified' => ['description' => 'The modification time in UTC. The time is in the ISO 8601 format.', 'type' => 'string', 'format' => 'iso8601_normal', 'example' => '2025-12-01T17:52:05+08:00', 'title' => ''], 'Question' => ['description' => 'The customer question.', '$ref' => '#/components/schemas/ChatDetail', 'title' => '', 'example' => ''], 'Answer' => ['description' => 'The customer reply.', '$ref' => '#/components/schemas/ChatDetail', 'title' => '', 'example' => ''], 'OwnerId' => ['description' => 'The parent creator.', 'type' => 'string', 'example' => '1500******860', 'title' => ''], 'UserId' => ['description' => 'The creator.', 'type' => 'string', 'example' => '2100******360', 'title' => ''], 'Title' => ['description' => 'The question title.', 'type' => 'string', 'example' => 'how to ******', 'title' => ''], 'SessionId' => ['description' => 'The ID of the session.', 'type' => 'string', 'example' => 'se-dss******', 'title' => ''], 'Status' => ['description' => 'The status. Valid values:'."\n" .'- Canceled: Canceled.'."\n" .'- Running: Running.'."\n" .'- Completed: Completed.'."\n" .'- Error: Error.'."\n" .'- Canceling: Canceling.'."\n" .'- Interrupted: Paused.', 'type' => 'string', 'example' => 'Running', 'title' => ''], 'ExtraData' => ['description' => 'The extra data. Currently used to store the result of a specification change operation in an update.', 'type' => 'string', 'example' => '{"solutionDetail":{"formValues":{"params":{"InstanceId":"dsw-g54******qg9"},"content":{"EcsSpec":"ecs.gn6i-c8g1.2xlarge"}},"success":true}}', 'title' => ''], 'Message' => ['description' => 'This field is deprecated.', 'type' => 'string', 'example' => 'how to ******', 'title' => ''], ], 'example' => '', ], ], ], 'errorCodes' => [ 400 => [ ['errorCode' => 'IdempotentParameterMismatch', 'errorMessage' => 'The request uses the same client token as a previous, but non-identical request. Do not reuse a client token with different requests, unless the requests are identical.', 'description' => ''], ], ], 'staticInfo' => ['returnType' => 'synchronous'], 'title' => 'Retrieve conversation details', 'summary' => 'Retrieves the details of a conversation.', 'changeSet' => [], 'flowControl' => [ 'flowControlList' => [], ], 'translator' => 'machine', 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"RequestId\\": \\"44553E9A-******-37ADC33FE2\\",\\n \\"ChatId\\": \\"chat-jkd******\\",\\n \\"GmtCreateTime\\": \\"2021-01-21T17:12:35Z\\",\\n \\"GmtModified\\": \\"2025-12-01T17:52:05+08:00\\",\\n \\"Question\\": {\\n \\"UserInfo\\": {\\n \\"Role\\": \\"assistant\\",\\n \\"Name\\": \\"to******\\"\\n },\\n \\"Content\\": \\"你好******\\",\\n \\"GmtCreateTime\\": \\"2021-01-21T17:12:35Z\\"\\n },\\n \\"Answer\\": {\\n \\"UserInfo\\": {\\n \\"Role\\": \\"assistant\\",\\n \\"Name\\": \\"to******\\"\\n },\\n \\"Content\\": \\"你好******\\",\\n \\"GmtCreateTime\\": \\"2021-01-21T17:12:35Z\\"\\n },\\n \\"OwnerId\\": \\"1500******860\\",\\n \\"UserId\\": \\"2100******360\\",\\n \\"Title\\": \\"how to ******\\",\\n \\"SessionId\\": \\"se-dss******\\",\\n \\"Status\\": \\"Running\\",\\n \\"ExtraData\\": \\"{\\\\\\"solutionDetail\\\\\\":{\\\\\\"formValues\\\\\\":{\\\\\\"params\\\\\\":{\\\\\\"InstanceId\\\\\\":\\\\\\"dsw-g54******qg9\\\\\\"},\\\\\\"content\\\\\\":{\\\\\\"EcsSpec\\\\\\":\\\\\\"ecs.gn6i-c8g1.2xlarge\\\\\\"}},\\\\\\"success\\\\\\":true}}\\",\\n \\"Message\\": \\"how to ******\\"\\n}","type":"json"}]', ], 'GetSession' => [ 'path' => '/api/v1/sessions/{SessionId}', 'methods' => ['get'], 'schemes' => ['https'], 'security' => [ [ 'AK' => [], ], ], 'consumes' => ['application/json'], 'produces' => ['application/json'], 'operationType' => 'write', 'deprecated' => false, 'systemTags' => [ 'operationType' => 'get', 'riskType' => 'none', 'chargeType' => 'free', 'abilityTreeNodes' => ['FEATURElearnOTS2AE'], 'autoTest' => true, 'tenantRelevance' => 'tenant', ], 'parameters' => [ [ 'name' => 'SessionId', 'in' => 'path', 'schema' => ['description' => 'The ID of the session.', 'type' => 'string', 'required' => true, 'example' => 'se-weg******wcw', 'title' => ''], ], ], 'responses' => [ 200 => [ 'schema' => [ 'title' => '', 'description' => 'The response body.', 'type' => 'object', 'properties' => [ 'RequestId' => ['title' => '', 'description' => 'The request ID.', 'type' => 'string', 'example' => 'ECB1F5******C1BF5223'], 'SessionId' => ['description' => 'The ID of the session.', 'type' => 'string', 'example' => 'se-j6p******dram6', 'title' => ''], 'GmtCreateTime' => ['description' => 'The creation time in UTC. The time is in the ISO 8601 format.', 'type' => 'string', 'format' => 'iso8601_normal', 'example' => '2021-01-21T17:12:35.232Z', 'title' => ''], 'GmtModified' => ['description' => 'The modification time in UTC. The time is in the ISO 8601 format.', 'type' => 'string', 'format' => 'iso8601_normal', 'example' => '2021-01-21T17:12:35.232Z', 'title' => ''], 'OwnerId' => ['description' => 'The ID of the parent creator.', 'type' => 'string', 'example' => '1557******4904', 'title' => ''], 'UserId' => ['description' => 'The ID of the creator.', 'type' => 'string', 'example' => '27******94904', 'title' => ''], 'Title' => ['description' => 'The title.', 'type' => 'string', 'example' => '如何******', 'title' => ''], ], 'example' => '', ], ], ], 'errorCodes' => [ 400 => [ ['errorCode' => 'IdempotentParameterMismatch', 'errorMessage' => 'The request uses the same client token as a previous, but non-identical request. Do not reuse a client token with different requests, unless the requests are identical.', 'description' => ''], ], ], 'staticInfo' => ['returnType' => 'synchronous'], 'title' => 'Get session details', 'summary' => 'Retrieves the details of a session.', 'changeSet' => [], 'flowControl' => [ 'flowControlList' => [], ], 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"RequestId\\": \\"ECB1F5******C1BF5223\\",\\n \\"SessionId\\": \\"se-j6p******dram6\\",\\n \\"GmtCreateTime\\": \\"2021-01-21T17:12:35.232Z\\",\\n \\"GmtModified\\": \\"2021-01-21T17:12:35.232Z\\",\\n \\"OwnerId\\": \\"1557******4904\\",\\n \\"UserId\\": \\"27******94904\\",\\n \\"Title\\": \\"如何******\\"\\n}","type":"json"}]', 'translator' => 'machine', ], 'ListChats' => [ 'path' => '/api/v1/sessions/{SessionId}/chats', 'methods' => ['get'], 'schemes' => ['https'], 'security' => [ [ 'AK' => [], ], ], 'consumes' => ['application/json'], 'produces' => ['application/json'], 'operationType' => 'read', 'deprecated' => false, 'systemTags' => [ 'operationType' => 'list', 'riskType' => 'none', 'chargeType' => 'free', 'abilityTreeNodes' => ['FEATURElearnOTS2AE'], 'autoTest' => true, 'tenantRelevance' => 'tenant', ], 'parameters' => [ [ 'name' => 'PageNumber', 'in' => 'query', 'schema' => ['description' => 'The page number. Pages start from 1. Default value: 1.', 'type' => 'integer', 'format' => 'int64', 'required' => false, 'example' => '1', 'title' => ''], ], [ 'name' => 'SortBy', 'in' => 'query', 'schema' => ['description' => 'The field used for sorting. Valid values:'."\n" .'- GmtCreateTime (default)'."\n" .'- GmtModifiedTime.', 'type' => 'string', 'required' => false, 'example' => 'GmtCreateTime', 'title' => ''], ], [ 'name' => 'SessionId', 'in' => 'path', 'schema' => ['description' => 'The ID of the session.', 'type' => 'string', 'required' => true, 'example' => 'se-dss******', 'title' => ''], ], [ 'name' => 'Order', 'in' => 'query', 'schema' => ['description' => 'The sort order. Valid values:'."\n" .'- ASC: ascending order'."\n" .'- DESC: descending order (default).', 'type' => 'string', 'required' => false, 'example' => 'DESC', 'title' => ''], ], [ 'name' => 'Verbose', 'in' => 'query', 'schema' => ['description' => 'Specifies whether to display certain fields. Separate multiple fields with commas. Currently supported value:'."\n" .'- QuestionAndAnswer.', 'type' => 'string', 'required' => false, 'example' => 'QuestionAndAnswer', 'title' => ''], ], [ 'name' => 'PageSize', 'in' => 'query', 'schema' => ['description' => 'The number of entries per page. Default value: 20. Maximum value: 100.', 'type' => 'integer', 'format' => 'int64', 'required' => false, 'example' => '60', 'title' => ''], ], ], 'responses' => [ 200 => [ 'schema' => [ 'title' => '', 'description' => 'The response body.', 'type' => 'object', 'properties' => [ 'RequestId' => ['title' => '', 'description' => 'The request ID.', 'type' => 'string', 'example' => '44553E9A-******-37ADC33FE2'], 'TotalCount' => ['description' => 'The total number of chats.', 'type' => 'integer', 'format' => 'int64', 'example' => '2', 'title' => ''], 'Chats' => [ 'description' => 'The list of chats.', 'type' => 'array', 'items' => ['description' => 'The chat details.', '$ref' => '#/components/schemas/Chat', 'title' => '', 'example' => ''], 'title' => '', 'example' => '', ], ], 'example' => '', ], ], ], 'errorCodes' => [ 400 => [ ['errorCode' => 'IdempotentParameterMismatch', 'errorMessage' => 'The request uses the same client token as a previous, but non-identical request. Do not reuse a client token with different requests, unless the requests are identical.', 'description' => ''], ], ], 'staticInfo' => ['returnType' => 'synchronous'], 'title' => 'Retrieve chat list', 'summary' => 'Retrieves a list of Chats.', 'changeSet' => [], 'flowControl' => [ 'flowControlList' => [], ], 'translator' => 'machine', 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"RequestId\\": \\"44553E9A-******-37ADC33FE2\\",\\n \\"TotalCount\\": 2,\\n \\"Chats\\": [\\n {\\n \\"ChatId\\": \\"chat-jkd******\\",\\n \\"GmtCreateTime\\": \\"2021-01-21T17:12:35Z\\",\\n \\"GmtModified\\": \\"2026-01-20T09:41:23Z\\",\\n \\"Question\\": {\\n \\"UserInfo\\": {\\n \\"Role\\": \\"assistant\\",\\n \\"Name\\": \\"to******\\"\\n },\\n \\"Content\\": \\"你好******\\",\\n \\"GmtCreateTime\\": \\"2021-01-21T17:12:35Z\\"\\n },\\n \\"Answer\\": {\\n \\"UserInfo\\": {\\n \\"Role\\": \\"assistant\\",\\n \\"Name\\": \\"to******\\"\\n },\\n \\"Content\\": \\"你好******\\",\\n \\"GmtCreateTime\\": \\"2021-01-21T17:12:35Z\\"\\n },\\n \\"OwnerId\\": \\"1500******860\\",\\n \\"UserId\\": \\"2100******360\\",\\n \\"Title\\": \\"how to ******\\",\\n \\"SessionId\\": \\"se-dss******\\",\\n \\"Status\\": \\"Running\\",\\n \\"ExtraData\\": \\"{\\\\\\"solutionDetail\\\\\\":{\\\\\\"formValues\\\\\\":{\\\\\\"params\\\\\\":{\\\\\\"InstanceId\\\\\\":\\\\\\"dsw-g54******qg9\\\\\\"},\\\\\\"content\\\\\\":{\\\\\\"EcsSpec\\\\\\":\\\\\\"ecs.gn6i-c8g1.2xlarge\\\\\\"}},\\\\\\"success\\\\\\":true}}\\",\\n \\"Message\\": \\"how to ******\\"\\n }\\n ]\\n}","type":"json"}]', ], 'ListSessions' => [ 'summary' => 'Lists a collection of sessions.', 'path' => '/api/v1/sessions', 'methods' => ['get'], 'schemes' => ['https'], 'security' => [ [ 'AK' => [], ], ], 'consumes' => ['application/json'], 'produces' => ['application/json'], 'operationType' => 'read', 'deprecated' => false, 'systemTags' => [ 'operationType' => 'list', 'riskType' => 'none', 'chargeType' => 'free', 'abilityTreeNodes' => ['FEATURElearnOTS2AE'], 'autoTest' => true, 'tenantRelevance' => 'tenant', ], 'parameters' => [ [ 'name' => 'PageNumber', 'in' => 'query', 'schema' => ['description' => 'The page number. Pages start from 1. Default value: 1.', 'type' => 'integer', 'format' => 'int64', 'required' => false, 'example' => '1', 'title' => ''], ], [ 'name' => 'SortBy', 'in' => 'query', 'schema' => ['description' => 'The field by which to sort the results. Valid values:'."\n" ."\n" .'- GmtCreateTime'."\n" .'- GmtModified.', 'type' => 'string', 'required' => false, 'example' => 'GmtModified', 'title' => ''], ], [ 'name' => 'Order', 'in' => 'query', 'schema' => ['description' => 'The sort order. Valid values:'."\n" ."\n" .'- ASC: ascending order'."\n" .'- DESC: descending order.', 'type' => 'string', 'required' => false, 'example' => 'ASC', 'title' => ''], ], [ 'name' => 'PageSize', 'in' => 'query', 'schema' => ['description' => 'The number of entries per page. Default value: 20. Maximum value: 100.', 'type' => 'integer', 'format' => 'int64', 'required' => false, 'example' => '20', 'title' => ''], ], [ 'name' => 'Labels', 'in' => 'query', 'schema' => ['description' => 'The labels used to filter results. Separate multiple labels with commas. All specified labels must be matched.', 'type' => 'string', 'required' => false, 'example' => 'system.product.type=DLC', 'title' => ''], ], ], 'responses' => [ 200 => [ 'schema' => [ 'title' => '', 'description' => 'The response body.', 'type' => 'object', 'properties' => [ 'RequestId' => ['title' => '', 'description' => 'The request ID.', 'type' => 'string', 'example' => '44553E9A-******-37ADC33FE2'], 'Sessions' => [ 'description' => 'The list of sessions.', 'type' => 'array', 'items' => ['description' => 'The session details.', '$ref' => '#/components/schemas/Session', 'title' => '', 'example' => ''], 'title' => '', 'example' => '', ], 'TotalCount' => ['description' => 'The total number of entries.', 'type' => 'integer', 'format' => 'int64', 'example' => '2', 'title' => ''], ], 'example' => '', ], ], ], 'errorCodes' => [ 400 => [ ['errorCode' => 'IdempotentParameterMismatch', 'errorMessage' => 'The request uses the same client token as a previous, but non-identical request. Do not reuse a client token with different requests, unless the requests are identical.', 'description' => ''], ], ], 'staticInfo' => ['returnType' => 'synchronous'], 'title' => 'List sessions', 'changeSet' => [], 'flowControl' => [ 'flowControlList' => [], ], 'translator' => 'machine', 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"RequestId\\": \\"44553E9A-******-37ADC33FE2\\",\\n \\"Sessions\\": [\\n {\\n \\"SessionId\\": \\"\\",\\n \\"GmtCreateTime\\": \\"\\",\\n \\"GmtModified\\": \\"\\",\\n \\"OwnerId\\": \\"\\",\\n \\"UserId\\": \\"\\",\\n \\"SessionTitle\\": \\"\\"\\n }\\n ],\\n \\"TotalCount\\": 2\\n}","type":"json"}]', ], 'SearchInfo' => [ 'summary' => 'Performs web search and knowledge base search.', 'path' => '/api/v1/searches', 'methods' => ['post'], 'schemes' => ['https'], 'security' => [ [ 'AK' => [], ], ], 'consumes' => ['application/json'], 'produces' => ['application/json'], 'operationType' => 'write', 'deprecated' => false, 'systemTags' => [ 'operationType' => 'create', 'riskType' => 'none', 'chargeType' => 'free', 'abilityTreeNodes' => ['FEATURElearnOTS2AE'], 'autoTest' => true, 'tenantRelevance' => 'tenant', ], 'parameters' => [ [ 'name' => 'body', 'in' => 'body', 'style' => 'json', 'schema' => [ 'description' => 'The search request body.', 'type' => 'object', 'properties' => [ 'KnowledgeBaseFilters' => [ 'description' => 'The collection of knowledge base search conditions.', 'type' => 'array', 'items' => [ 'description' => 'The knowledge base search condition.', 'type' => 'object', 'properties' => [ 'CollectionName' => ['description' => 'The name of the document collection.', 'type' => 'string', 'required' => true, 'example' => 'pai_qa', 'title' => ''], 'ResultLimit' => ['description' => 'The maximum number of search results to return. Default value: 3.', 'type' => 'integer', 'format' => 'int32', 'required' => false, 'example' => '5', 'title' => ''], 'ScoreThreshold' => ['description' => 'The minimum score (inclusive) that a search result must meet. The score indicates how well the search result matches the search condition. The maximum score is 1.', 'type' => 'number', 'format' => 'double', 'required' => false, 'example' => '0.7827883223', 'title' => ''], 'Query' => ['description' => 'The search keyword.', 'type' => 'string', 'required' => true, 'example' => 'what is pai', 'title' => ''], ], 'required' => false, 'title' => '', 'example' => '', ], 'required' => false, 'title' => '', 'example' => '', ], 'WebFilters' => [ 'description' => 'The collection of web search conditions.', 'type' => 'array', 'items' => [ 'description' => 'The web search condition.', 'type' => 'object', 'properties' => [ 'ResultLimit' => ['description' => 'The maximum number of search results to return. Default value: 3.', 'type' => 'integer', 'format' => 'int32', 'required' => false, 'example' => '5', 'title' => ''], 'IncludeSites' => [ 'description' => 'The collection of search sites.', 'type' => 'array', 'items' => ['description' => 'The search site.', 'type' => 'string', 'required' => false, 'example' => 'help.aliyun.com', 'title' => ''], 'required' => false, 'title' => '', 'example' => '', ], 'ScoreThreshold' => ['description' => 'The minimum score (inclusive) that a search result must meet. The score indicates how well the search result matches the search condition. The maximum score is 1.', 'type' => 'number', 'format' => 'double', 'required' => false, 'example' => '0.832883223', 'title' => ''], 'Query' => ['description' => 'The search keyword.', 'type' => 'string', 'required' => true, 'example' => 'what is dsw', 'title' => ''], 'Category' => ['type' => 'string', 'description' => '', 'required' => false, 'title' => '', 'example' => ''], ], 'required' => false, 'title' => '', 'example' => '', ], 'required' => false, 'title' => '', 'example' => '', ], ], 'required' => false, 'title' => '', 'example' => '', ], ], ], 'responses' => [ 200 => [ 'schema' => [ 'title' => '', 'description' => 'The search results.', 'type' => 'object', 'properties' => [ 'RequestId' => ['title' => '', 'description' => 'The request ID.', 'type' => 'string', 'example' => '44553E9A-******-37ADC33FE2'], 'KnowledgeBaseSearchResults' => [ 'description' => 'The collection of knowledge base search results.', 'type' => 'array', 'items' => [ 'description' => 'The knowledge base search result.', 'type' => 'object', 'properties' => [ 'ResultContent' => ['description' => 'The content of the search result.', 'type' => 'string', 'example' => 'DSW is ****** in pai.', 'title' => ''], 'Score' => ['description' => 'The score that indicates how well the search result matches the search condition. The maximum score is 1.', 'type' => 'number', 'format' => 'double', 'example' => '0.6215165367', 'title' => ''], 'Index' => ['description' => 'The index of the knowledge base query to which this result corresponds. The index starts from 0.', 'type' => 'string', 'example' => '0', 'title' => ''], ], 'title' => '', 'example' => '', ], 'title' => '', 'example' => '', ], 'WebSearchResults' => [ 'description' => 'The collection of web search results.', 'type' => 'array', 'items' => [ 'description' => 'The web search result.', 'type' => 'object', 'properties' => [ 'SourceLink' => ['description' => 'The source URL.', 'type' => 'string', 'example' => 'https://help.aliyun.com/zh/pai/use-cases/dsw-use-qwen3-coder-to-assist-in-code-development', 'title' => ''], 'ResultContent' => ['description' => 'The content of the search result.', 'type' => 'string', 'example' => 'Qwen3-Coder*****is good', 'title' => ''], 'Score' => ['description' => 'The score that indicates how well the search result matches the search condition. The maximum score is 1.', 'type' => 'number', 'format' => 'double', 'example' => '0.5215170567', 'title' => ''], 'Index' => ['description' => 'The index of the web query to which this result corresponds. The index starts from 0.', 'type' => 'string', 'example' => '2', 'title' => ''], ], 'title' => '', 'example' => '', ], 'title' => '', 'example' => '', ], ], 'example' => '', ], ], ], 'errorCodes' => [ 400 => [ ['errorCode' => 'IdempotentParameterMismatch', 'errorMessage' => 'The request uses the same client token as a previous, but non-identical request. Do not reuse a client token with different requests, unless the requests are identical.', 'description' => ''], ], ], 'staticInfo' => ['returnType' => 'synchronous'], 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"RequestId\\": \\"44553E9A-******-37ADC33FE2\\",\\n \\"KnowledgeBaseSearchResults\\": [\\n {\\n \\"ResultContent\\": \\"DSW is ****** in pai.\\",\\n \\"Score\\": 0.6215165367,\\n \\"Index\\": \\"0\\"\\n }\\n ],\\n \\"WebSearchResults\\": [\\n {\\n \\"SourceLink\\": \\"https://help.aliyun.com/zh/pai/use-cases/dsw-use-qwen3-coder-to-assist-in-code-development\\",\\n \\"ResultContent\\": \\"Qwen3-Coder*****is good\\",\\n \\"Score\\": 0.5215170567,\\n \\"Index\\": \\"2\\"\\n }\\n ]\\n}","type":"json"}]', 'title' => 'Web search and knowledge base search', 'changeSet' => [ ['createdAt' => '2025-12-26T04:38:05.000Z', 'description' => 'Request parameters changed'], ], 'flowControl' => [ 'flowControlList' => [], ], 'translator' => 'machine', ], ], 'endpoints' => [ ['regionId' => 'ap-southeast-1', 'regionName' => 'Singapore', 'areaId' => 'asiaPacific', 'areaName' => 'Asia Pacific', 'public' => 'paicopilot.ap-southeast-1.aliyuncs.com', 'endpoint' => 'paicopilot.ap-southeast-1.aliyuncs.com', 'vpc' => 'paicopilot-vpc.ap-southeast-1.aliyuncs.com'], ['regionId' => 'cn-beijing', 'regionName' => 'China (Beijing)', 'areaId' => 'asiaPacific', 'areaName' => 'Asia Pacific', 'public' => 'paicopilot.cn-beijing.aliyuncs.com', 'endpoint' => 'paicopilot.cn-beijing.aliyuncs.com', 'vpc' => 'paicopilot-vpc.cn-beijing.aliyuncs.com'], ['regionId' => 'cn-hangzhou', 'regionName' => 'China (Hangzhou)', 'areaId' => 'asiaPacific', 'areaName' => 'Asia Pacific', 'public' => 'paicopilot.cn-hangzhou.aliyuncs.com', 'endpoint' => 'paicopilot.cn-hangzhou.aliyuncs.com', 'vpc' => 'paicopilot-vpc.cn-hangzhou.aliyuncs.com'], ['regionId' => 'cn-shanghai', 'regionName' => 'China (Shanghai)', 'areaId' => 'asiaPacific', 'areaName' => 'Asia Pacific', 'public' => 'paicopilot.cn-shanghai.aliyuncs.com', 'endpoint' => 'paicopilot.cn-shanghai.aliyuncs.com', 'vpc' => 'paicopilot-vpc.cn-shanghai.aliyuncs.com'], ['regionId' => 'cn-shenzhen', 'regionName' => 'China (Shenzhen)', 'areaId' => 'asiaPacific', 'areaName' => 'Asia Pacific', 'public' => 'paicopilot.cn-shenzhen.aliyuncs.com', 'endpoint' => 'paicopilot.cn-shenzhen.aliyuncs.com', 'vpc' => 'paicopilot-vpc.cn-shenzhen.aliyuncs.com'], ['regionId' => 'cn-wulanchabu', 'regionName' => 'China (Ulanqab)', 'areaId' => 'asiaPacific', 'areaName' => 'Asia Pacific', 'public' => 'paicopilot.cn-wulanchabu.aliyuncs.com', 'endpoint' => 'paicopilot.cn-wulanchabu.aliyuncs.com', 'vpc' => 'paicopilot-vpc.cn-wulanchabu.aliyuncs.com'], ], 'errorCodes' => [], 'changeSet' => [ [ 'apis' => [ ['description' => 'Request parameters changed', 'api' => 'SearchInfo'], ], 'createdAt' => '2025-12-26T04:38:11.000Z', 'description' => '', ], ], 'flowControl' => [ 'flowControlList' => [ ['threshold' => '-1', 'countWindow' => 1, 'regionId' => '*'], ], ], ];