> ## Documentation Index
> Fetch the complete documentation index at: https://docs.galtea.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Session Service

> Session Service API methods in the Galtea SDK

The Session Service in the Galtea SDK allows you to manage [sessions](/concepts/product/version/session) for evaluating your products.
This Service is exposed by the `galtea.sessions` object.

<Info>
  Remember that we will be using the `galtea` object. More information [here](/sdk/api/galtea).
</Info>

## Quick Example

First, initialize the Galtea SDK:

```python theme={"system"}
galtea = Galtea(api_key="YOUR_API_KEY")
```

Create a session:

```python theme={"system"}
session = galtea.sessions.create(version_id=version_id, test_case_id=test_case_id, is_production=False)
```

Get or create a session with a custom ID:

```python theme={"system"}
session = galtea.sessions.get_or_create(
    custom_id=custom_session_id,
    version_id=version_id,
    test_case_id=test_case_id,
    metadata={"authenticated_user_id": "user-123"},
)
```

List sessions for a version:

```python theme={"system"}
sessions = galtea.sessions.list(version_id=version_id, limit=10)
```

## Service Methods

* [Create Session](/sdk/api/session/create)
* [Get Or Create Session](/sdk/api/session/get-or-create)
* [Update Session](/sdk/api/session/update)
* [List Sessions](/sdk/api/session/list)
* [Get Session](/sdk/api/session/get)
* [Get Session By Custom ID](/sdk/api/session/get-by-custom-id)
* [Delete Session](/sdk/api/session/delete)

## Related

<Card title="Session" icon="clock-rotate-left" iconType="solid" href="/concepts/product/version/session">
  A full conversation between a user and an AI system.
</Card>
