{"command":{"effect":"write","timeoutSeconds":120,"inputSchema":{"type":"object","description":"Create a ChatKit session.","properties":{"body":{"$ref":"#/definitions/CreateChatSessionBody"}},"required":[],"additionalProperties":false,"definitions":{"CreateChatSessionBody":{"properties":{"workflow":{"$ref":"#/definitions/WorkflowParam"},"user":{"type":"string","minLength":1,"description":"A free-form string that identifies your end user; ensures this Session can access other objects that have the same `user` scope."},"expires_after":{"$ref":"#/definitions/ExpiresAfterParam"},"rate_limits":{"$ref":"#/definitions/RateLimitsParam"},"chatkit_configuration":{"$ref":"#/definitions/ChatkitConfigurationParam"}},"type":"object","required":["workflow","user"],"title":"Create chat session request","description":"Parameters for provisioning a new ChatKit session."},"WorkflowParam":{"properties":{"id":{"type":"string","description":"Identifier for the workflow invoked by the session."},"version":{"type":"string","description":"Specific workflow version to run. Defaults to the latest deployed version."},"state_variables":{"additionalProperties":{"oneOf":[{"type":"string","maxLength":10485760},{"type":"integer"},{"type":"boolean"},{"type":"number"}]},"type":"object","maxProperties":64,"description":"State variables forwarded to the workflow. Keys may be up to 64 characters, values must be primitive types, and the map defaults to an empty object."},"tracing":{"$ref":"#/definitions/WorkflowTracingParam"}},"type":"object","required":["id"],"title":"Workflow settings","description":"Workflow reference and overrides applied to the chat session."},"ExpiresAfterParam":{"properties":{"anchor":{"type":"string","enum":["created_at"],"description":"Base timestamp used to calculate expiration. Currently fixed to `created_at`.","default":"created_at"},"seconds":{"type":"integer","maximum":600,"minimum":1,"description":"Number of seconds after the anchor when the session expires."}},"type":"object","required":["anchor","seconds"],"title":"Expiration overrides","description":"Controls when the session expires relative to an anchor timestamp."},"RateLimitsParam":{"properties":{"max_requests_per_1_minute":{"type":"integer","minimum":1,"description":"Maximum number of requests allowed per minute for the session. Defaults to 10."}},"type":"object","required":[],"title":"Rate limit overrides","description":"Controls request rate limits for the session."},"ChatkitConfigurationParam":{"properties":{"automatic_thread_titling":{"$ref":"#/definitions/AutomaticThreadTitlingParam"},"file_upload":{"$ref":"#/definitions/FileUploadParam"},"history":{"$ref":"#/definitions/HistoryParam"}},"type":"object","required":[],"title":"ChatKit configuration overrides","description":"Optional per-session configuration settings for ChatKit behavior."},"WorkflowTracingParam":{"properties":{"enabled":{"type":"boolean","description":"Whether tracing is enabled during the session. Defaults to true."}},"type":"object","required":[],"title":"Tracing Configuration","description":"Controls diagnostic tracing during the session."},"AutomaticThreadTitlingParam":{"properties":{"enabled":{"type":"boolean","description":"Enable automatic thread title generation. Defaults to true."}},"type":"object","required":[],"title":"Automatic thread titling configuration","description":"Controls whether ChatKit automatically generates thread titles."},"FileUploadParam":{"properties":{"enabled":{"type":"boolean","description":"Enable uploads for this session. Defaults to false."},"max_file_size":{"type":"integer","maximum":512,"minimum":1,"description":"Maximum size in megabytes for each uploaded file. Defaults to 512 MB, which is the maximum allowable size."},"max_files":{"type":"integer","minimum":1,"description":"Maximum number of files that can be uploaded to the session. Defaults to 10."}},"type":"object","required":[],"title":"File upload configuration","description":"Controls whether users can upload files."},"HistoryParam":{"properties":{"enabled":{"type":"boolean","description":"Enables chat users to access previous ChatKit threads. Defaults to true."},"recent_threads":{"type":"integer","minimum":1,"description":"Number of recent ChatKit threads users have access to. Defaults to unlimited when unset."}},"type":"object","required":[],"title":"Chat history configuration","description":"Controls how much historical context is retained for the session."}}},"name":"Create a ChatKit session","id":"openai.createchatsessionmethod","example":{},"maxRequests":1,"summary":false}}