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

# Create Session



## OpenAPI

````yaml https://api.galileo.ai/public/v2/openapi.json post /v2/projects/{project_id}/sessions
openapi: 3.1.0
info:
  title: FastAPI
  version: 0.1.0
servers:
  - url: https://api.galileo.ai
    description: Galileo Public APIs - galileo-v2
security: []
paths:
  /v2/projects/{project_id}/sessions:
    post:
      tags:
        - trace
      summary: Create Session
      operationId: create_session_v2_projects__project_id__sessions_post
      parameters:
        - name: project_id
          in: path
          required: true
          schema:
            type: string
            format: uuid4
            title: Project Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SessionCreateRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SessionCreateResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - APIKeyHeader: []
        - OAuth2PasswordBearer: []
        - HTTPBasic: []
components:
  schemas:
    SessionCreateRequest:
      properties:
        log_stream_id:
          anyOf:
            - type: string
              format: uuid4
            - type: 'null'
          title: Log Stream Id
          description: Log stream id associated with the traces.
        experiment_id:
          anyOf:
            - type: string
              format: uuid4
            - type: 'null'
          title: Experiment Id
          description: Experiment id associated with the traces.
        metrics_testing_id:
          anyOf:
            - type: string
              format: uuid4
            - type: 'null'
          title: Metrics Testing Id
          description: Metrics testing id associated with the traces.
        logging_method:
          $ref: '#/components/schemas/LoggingMethod'
          default: api_direct
        client_version:
          anyOf:
            - type: string
            - type: 'null'
          title: Client Version
        reliable:
          type: boolean
          title: Reliable
          description: >-
            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.
          default: true
        name:
          anyOf:
            - type: string
            - type: 'null'
          title: Name
          description: Name of the session.
        previous_session_id:
          anyOf:
            - type: string
              format: uuid4
            - type: 'null'
          title: Previous Session Id
          description: Id of the previous session.
        external_id:
          anyOf:
            - type: string
            - type: 'null'
          title: External Id
          description: External id of the session.
        user_metadata:
          anyOf:
            - additionalProperties:
                type: string
              type: object
            - type: 'null'
          title: User Metadata
          description: User metadata for the session.
      type: object
      title: SessionCreateRequest
    SessionCreateResponse:
      properties:
        id:
          type: string
          format: uuid4
          title: Id
          description: Session id associated with the session.
        name:
          anyOf:
            - type: string
            - type: 'null'
          title: Name
          description: Name of the session.
        project_id:
          type: string
          format: uuid4
          title: Project Id
          description: Project id associated with the session.
        project_name:
          type: string
          title: Project Name
          description: Project name associated with the session.
        previous_session_id:
          anyOf:
            - type: string
              format: uuid4
            - type: 'null'
          title: Previous Session Id
          description: Id of the previous session.
        external_id:
          anyOf:
            - type: string
            - type: 'null'
          title: External Id
          description: External id of the session.
      type: object
      required:
        - id
        - name
        - project_id
        - project_name
      title: SessionCreateResponse
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    LoggingMethod:
      type: string
      enum:
        - playground
        - python_client
        - typescript_client
        - api_direct
      title: LoggingMethod
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    APIKeyHeader:
      type: apiKey
      in: header
      name: Galileo-API-Key
    OAuth2PasswordBearer:
      type: oauth2
      flows:
        password:
          scopes: {}
          tokenUrl: https://api.galileo.ai/login
    HTTPBasic:
      type: http
      scheme: basic

````