Skip to main content

Create session

POST 

/v1/sessions

Creates a conversation session for the calling end user. output_format fixes the reply form for the session's life, and capabilities or exclude_capabilities what the assistant may use in it (every capability when neither is sent). Include text (and optionally attachments, as in a later message) to start the first task right away: the response then carries its task_id, its reply streams on GET /v1/sessions/{session_id}/events — open it with Last-Event-ID set to the returned last_event_id to receive the task from its first frame — and is kept in the session's message list. Starting a task needs a spendable balance on the project's billing account; creating an empty session does not.

Request​

Responses​

Successful Response