Returns
Returns a Session object.Example
Parameters
string
The ID of the version to associate with this session.
Provide
version_id or product_id (at least one). If both are given, version_id wins and product_id is ignored. Prefer version_id when you already have a specific version to attach to.string
The ID of the product to associate with this session, as an alternative to
version_id. The API resolves the product’s latest version, or creates a default one if the product has none yet.Provide
version_id or product_id (at least one). If both are given, version_id wins and product_id is ignored.string
The ID of a test case. Forbidden when
is_production=True. Sessions backed by a test case derive their context from the test case rather than the request.string
A client-provided custom ID for the session.
This is useful to associate sessions in the Galtea platform with those in your application.
string
The context provided to the AI product during the session. Forbidden when
test_case_id is set (it would be derived from the test case).boolean
A flag to indicate if the session represents real production traffic. When omitted, the API derives it from
test_case_id presence: no test case means production. A non-production session no longer requires a test_case_id — externally ingested sessions (e.g. imported traces) may be classified as development data without being linked to a test case.object
Arbitrary key/value metadata to attach to the session at creation time. Omit it to send no
metadata. This is the same metadata you can later set with Update Session.