Session Operations
Create Session
Initialize a new conversation session
POST
Authorization
Bearer token. Format:
Bearer synthra_live_abc123def456Body Parameters
Unique identifier for the user. Format:
user_<16 chars>Optional metadata to attach to the session.Example:
{ "source": "web", "language": "en" }Context window configuration.Properties:
maxTokens(number): Maximum context window size. Default: 4096compressionEnabled(boolean): Enable automatic compression. Default: trueretentionPolicy(string): Strategy for message retention. Options:fifo,priority,semantic
Response
Unique session identifier. Format:
session_<16 chars>User identifier associated with this session
ISO 8601 timestamp of session creation
ISO 8601 timestamp when session will auto-expire (24 hours)
Current number of messages in session. Initially 0.
Token usage statisticsProperties:
total(number): Total tokens usedprompt(number): Tokens in promptscompletion(number): Tokens in completions