Skip to main content
POST

Authorization

string
required
Bearer token. Format: Bearer synthra_live_abc123def456

Body Parameters

string
required
Unique identifier for the user. Format: user_<16 chars>
object
Optional metadata to attach to the session.Example: { "source": "web", "language": "en" }
object
Context window configuration.Properties:
  • maxTokens (number): Maximum context window size. Default: 4096
  • compressionEnabled (boolean): Enable automatic compression. Default: true
  • retentionPolicy (string): Strategy for message retention. Options: fifo, priority, semantic

Response

string
Unique session identifier. Format: session_<16 chars>
string
User identifier associated with this session
string
ISO 8601 timestamp of session creation
string
ISO 8601 timestamp when session will auto-expire (24 hours)
number
Current number of messages in session. Initially 0.
object
Token usage statisticsProperties:
  • total (number): Total tokens used
  • prompt (number): Tokens in prompts
  • completion (number): Tokens in completions