Skip to main content
POST
/
v2
/
projects
/
{project_id}
/
sessions
Create Session
curl --request POST \
  --url https://api.galileo.ai/v2/projects/{project_id}/sessions \
  --header 'Content-Type: application/json' \
  --header 'Galileo-API-Key: <api-key>' \
  --data '
{
  "log_stream_id": "<string>",
  "experiment_id": "<string>",
  "metrics_testing_id": "<string>",
  "logging_method": "api_direct",
  "client_version": "<string>",
  "reliable": true,
  "name": "<string>",
  "previous_session_id": "<string>",
  "external_id": "<string>"
}
'
{
  "id": "<string>",
  "name": "<string>",
  "project_id": "<string>",
  "project_name": "<string>",
  "previous_session_id": "<string>",
  "external_id": "<string>"
}

Authorizations

Galileo-API-Key
string
header
required

Path Parameters

project_id
string<uuid4>
required

Body

application/json
log_stream_id
string<uuid4> | null

Log stream id associated with the traces.

experiment_id
string<uuid4> | null

Experiment id associated with the traces.

metrics_testing_id
string<uuid4> | null

Metrics testing id associated with the traces.

logging_method
enum<string>
default:api_direct
Available options:
playground,
python_client,
typescript_client,
api_direct
client_version
string | null
reliable
boolean
default:true

Whether or not to use reliable logging. If set to False, the method will respond immediately before verifying that the traces have been successfully ingested, and no error message will be returned if ingestion fails. If set to True, the method will wait for the traces to be successfully ingested or return an error message if there is an ingestion failure.

name
string | null

Name of the session.

previous_session_id
string<uuid4> | null

Id of the previous session.

external_id
string | null

External id of the session.

Response

Successful Response

id
string<uuid4>
required

Session id associated with the session.

name
string | null
required

Name of the session.

project_id
string<uuid4>
required

Project id associated with the session.

project_name
string
required

Project name associated with the session.

previous_session_id
string<uuid4> | null

Id of the previous session.

external_id
string | null

External id of the session.