> ## 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.

# Create version

> Create a new version. See [Versions](https://docs.galtea.ai/concepts/product/version).



## OpenAPI

````yaml https://api.galtea.ai/openapi.json post /versions
openapi: 3.0.0
info:
  version: 1.0.0
  title: Product Management Service API
  description: API documentation for Product Management Service
  contact:
    name: Galtea AI
servers:
  - url: https://api.galtea.ai
security:
  - bearerAuth: []
tags: []
externalDocs:
  description: Galtea Platform Documentation
  url: https://docs.galtea.ai
paths:
  /versions:
    post:
      tags:
        - versions
      summary: Create version
      description: >-
        Create a new version. See
        [Versions](https://docs.galtea.ai/concepts/product/version).
      operationId: createVersion
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Version'
      responses:
        '201':
          description: Version created successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Version'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - bearerAuth: []
components:
  schemas:
    Version:
      type: object
      properties:
        id:
          type: string
          example: ver_123
        productId:
          type: string
          example: prod_123
        userId:
          type: string
          nullable: true
          example: user_123
        name:
          type: string
          example: 1.0.0
        description:
          type: string
          nullable: true
          example: Version description
        modelId:
          type: string
          nullable: true
          example: model_123
        systemPrompt:
          type: string
          nullable: true
          example: You are a helpful assistant
        datasetUri:
          type: string
          nullable: true
          example: https://example.com/dataset.csv
        datasetDescription:
          type: string
          nullable: true
          example: Training dataset
        guardrails:
          type: string
          nullable: true
          example: Safety guidelines
        otelOutputSourceRule:
          type: object
          nullable: true
          description: >-
            Recover a turn's user-visible output for templated or non-LLM
            replies whose final answer lives on a non-LLM span. Set per product
            or version (version wins). Applied only when no LLM output is
            present.
          properties:
            spanName:
              type: string
              description: Exact OTLP span name to match.
              example: ExecuteActivity:save_reply
            attribute:
              type: string
              description: >-
                Span attribute key holding the JSON blob (string or object) to
                read.
              example: app.arguments
            path:
              type: string
              description: >-
                JSONPath into the parsed attribute value, resolving to the
                output text.
              example: $[0].message.content
            predicate:
              type: object
              nullable: true
              description: >-
                Optional gate: apply the rule only when the node at
                predicate.path equals predicate.equals.
              properties:
                path:
                  type: string
                  example: $[0].message.role
                equals:
                  type: string
                  example: assistant
              required:
                - path
                - equals
          required:
            - spanName
            - attribute
            - path
          example:
            spanName: ExecuteActivity:save_reply
            attribute: app.arguments
            path: $[0].message.content
            predicate:
              path: $[0].message.role
              equals: assistant
        initializationEndpointConnectionId:
          type: string
          nullable: true
          example: ec_123
        conversationEndpointConnectionId:
          type: string
          nullable: true
          example: ec_123
        finalizationEndpointConnectionId:
          type: string
          nullable: true
          example: ec_123
        phoneConnectionId:
          type: string
          nullable: true
          description: >-
            The version's phone connection (telephony conversation target). At
            most one conversation target may be set across
            conversationEndpointConnectionId, phoneConnectionId, and
            webRtcConnectionId.
          example: phoneConnection_123
        webRtcConnectionId:
          type: string
          nullable: true
          description: >-
            The version's WebRTC connection (live two-way audio conversation
            target). At most one conversation target may be set across
            conversationEndpointConnectionId, phoneConnectionId, and
            webRtcConnectionId.
          example: webRtcConnection_123
        parentVersionId:
          type: string
          nullable: true
          example: ver_122
          description: >-
            Id of the version this one was revised from (its direct parent in
            the revision lineage). On create, providing this value records the
            parent edge; the parent must belong to the same product. Omit or
            null to create a root version with no parent. On responses, this is
            the recorded parent edge (null for roots).
        createdAt:
          type: string
          format: date-time
        deletedAt:
          type: string
          format: date-time
          nullable: true
    Error:
      type: object
      properties:
        error:
          type: string
          example: Error type
        message:
          type: string
          example: Error message description
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        API key authorization. Pass your API key in the Authorization header as
        a Bearer token. Both new (`gsk_*`) and legacy (`gsk-`) API keys are
        accepted, e.g. `Authorization: Bearer gsk_...` or `Authorization: Bearer
        gsk-...`.

````