会话

创建新的对话会话。 kind 为空时为普通会话,assistant 为助手会话。

post/sessions

Request

  • Base URL
    /api/v1 (relative, and the document was published on a file host, not at the API’s origin)
  • URL
    /api/v1/sessions
  • Auth
    • API key in header Authorization
    • or API key in header X-API-Key

Request body

descriptionstring

Description for the session (optional)

kind'' | 'assistant'
project_dirstring

ProjectDir is an optional Lite host-sandbox binding. When set it must be an absolute path already present in the user-approved ProjectDirs list. Empty means the session gets an auto-allocated workspace.

titlestring

Title for the session (optional)

Response

创建的会话

object required

Changes