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

> Create a new product. Key values must give one value for each attribute of the key in force: the product key when the body sends one, else the key of the organization. A MEMBER creates a product only when one of its user groups grants all products and allows `product.create`. See [Products](https://docs.galtea.ai/concepts/product).

> [!WARNING]
>
> You are reading the docs of Galtea 5.16. [Read this page in the latest version](https://docs.galtea.ai/api-reference/products/create-product.md).


## OpenAPI

````yaml /v5.16/openapi.json post /products
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:
  /products:
    post:
      tags:
        - products
      summary: Create product
      description: >-
        Create a new product. Key values must give one value for each attribute
        of the key in force: the product key when the body sends one, else the
        key of the organization. A MEMBER creates a product only when one of its
        user groups grants all products and allows `product.create`. See
        [Products](https://docs.galtea.ai/concepts/product).
      operationId: createProduct
      parameters:
        - $ref: '#/components/parameters/Prefer'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ProductCreate'
      responses:
        '201':
          description: >-
            Product created successfully. On `Prefer: return=minimal`, or when
            the read after the write fails, the answer has no body.
          headers:
            Location:
              schema:
                type: string
                description: The path of the new resource
              required: true
              description: The path of the new resource
            Content-Location:
              schema:
                type: string
                description: >-
                  The path of the resource in the body; absent when there is no
                  body
              required: false
              description: >-
                The path of the resource in the body; absent when there is no
                body
            Preference-Applied:
              schema:
                type: string
                enum:
                  - return=minimal
                description: 'Present when the API honored `Prefer: return=minimal`'
              required: false
              description: 'Present when the API honored `Prefer: return=minimal`'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Product'
        '400':
          description: >-
            The body breaks a rule of the product: a missing name or
            description, a blank tag, an invalid auto-close setting or
            classification, invalid key or key values, or a source rule that
            breaks a rule of its own, a blank user group id, or more than 100
            user group ids. Also answered when the organization reached the
            product limit of its plan, or already holds a product with the same
            name
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: >-
            The caller may not create a product in this organization, or may not
            update a listed user group. A MEMBER needs a user group that grants
            all products and allows `product.create`
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: >-
            The organization does not exist, or a listed user group does not
            exist in the organization of the product
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '409':
          description: >-
            Another live product of the organization already claims the same key
            values
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - bearerAuth: []
components:
  parameters:
    Prefer:
      schema:
        $ref: '#/components/schemas/Prefer'
      required: false
      description: >-
        Send `return=minimal` to get no body back from a write and skip reading
        the resource: a create answers `201` with only `Location`, and an update
        answers `204`.
      name: Prefer
      in: header
  schemas:
    ProductCreate:
      type: object
      properties:
        name:
          type: string
          example: Sample Product
        description:
          type: string
          example: Sample product description
        organizationId:
          type: string
          nullable: true
          example: org_123
          description: >-
            The organization the product belongs to. Omit it or send null for
            the organization of the caller.
        userGroupIds:
          type: array
          items:
            type: string
            minLength: 1
          maxItems: 100
          example:
            - ug_123
          description: >-
            User groups of the product organization that the new product is
            linked to, which grants it to their members. The caller must be
            allowed to update each group.
        riskLevel:
          type: string
          nullable: true
          enum:
            - PROHIBITED
            - GPAI
            - GPAI_SYSTEMIC
            - HIGH
            - SPECIAL_SYSTEM
            - null
          description: >-
            EU AI Act risk classification. PROHIBITED: banned AI use cases.
            GPAI: general-purpose AI. GPAI_SYSTEMIC: GPAI with systemic risk.
            HIGH: high-risk AI system. SPECIAL_SYSTEM: special-category system.
          example: HIGH
        operatorType:
          type: string
          nullable: true
          enum:
            - AUTHORISED_REPRESENTATIVE
            - DEPLOYER
            - DISTRIBUTER
            - IMPORTER
            - PRODUCT_MANUFACTURER
            - PROVIDER
            - null
          description: EU AI Act operator role classification.
          example: PROVIDER
        interactionMode:
          type: string
          nullable: true
          enum:
            - CONVERSATIONAL
            - HUMAN_DIRECT
            - PROGRAMMATIC
            - null
          description: >-
            Who consumes the product's output. CONVERSATIONAL: a person
            exchanges several turns with it. HUMAN_DIRECT: a person reads the
            output directly, with no dialogue. PROGRAMMATIC: another system
            consumes it and no person reads it directly. The onboarding AI
            suggests a value; the owner can change or clear it. Null means
            unclassified.
          example: CONVERSATIONAL
        primaryTask:
          type: string
          nullable: true
          enum:
            - CONVERSATIONAL_ASSISTANCE
            - QUESTION_ANSWERING_RAG
            - DOCUMENT_EXTRACTION
            - DOCUMENT_GENERATION
            - SUMMARIZATION
            - CLASSIFICATION
            - TRANSLATION
            - CORRECTION
            - AGENTIC_WORKFLOW
            - OTHER
            - null
          description: >-
            The one dominant task the product performs on its input. The
            onboarding AI suggests a value; the owner can change or clear it.
            Null means unclassified.
          example: QUESTION_ANSWERING_RAG
        capabilities:
          type: string
          nullable: true
          example: Can process and analyze data
        inabilities:
          type: string
          nullable: true
          example: Cannot process sensitive financial data
        policies:
          type: string
          nullable: true
          example: Must comply with data protection regulations
        otelInputSourceRule:
          type: object
          nullable: true
          properties:
            spanName:
              type: string
              description: Exact OTLP span name to match.
              example: ExecuteActivity:add_user_message
            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 input
                text. Must start with the $ root.
              example: $[0].message.content
            predicate:
              type: object
              nullable: true
              properties:
                path:
                  type: string
                  example: $[0].message.role
                equals:
                  type: string
                  example: user
              required:
                - path
                - equals
              description: >-
                Optional gate: apply the rule only when the node at
                predicate.path equals predicate.equals.
          required:
            - spanName
            - attribute
            - path
          description: >-
            Recover a turn's user-visible input for products whose user message
            lives on a non-LLM span. Set per organization, product or version.
            The version rule wins, then the product rule. Per span it applies
            only when no LLM input is present. Per turn the value it extracts IS
            the turn input, ahead of every fallback, and the turn input is EMPTY
            when the rule extracts nothing from any span of the turn. The two
            directions resolve independently. Null uses the rule of the
            organization.
          example:
            spanName: ExecuteActivity:add_user_message
            attribute: app.arguments
            path: $[0].message.content
            predicate:
              path: $[0].message.role
              equals: user
        otelOutputSourceRule:
          type: object
          nullable: true
          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. Must start with the $ root.
              example: $[0].message.content
            predicate:
              type: object
              nullable: true
              properties:
                path:
                  type: string
                  example: $[0].message.role
                equals:
                  type: string
                  example: assistant
              required:
                - path
                - equals
              description: >-
                Optional gate: apply the rule only when the node at
                predicate.path equals predicate.equals.
          required:
            - spanName
            - attribute
            - path
          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
            organization, product or version. The version rule wins, then the
            product rule. Per span it applies only when no LLM output is
            present. Per turn the value it extracts IS the turn output, ahead of
            every fallback, and the turn output is EMPTY when the rule extracts
            nothing from any span of the turn. The two directions resolve
            independently. Null uses the rule of the organization.
          example:
            spanName: ExecuteActivity:save_reply
            attribute: app.arguments
            path: $[0].message.content
            predicate:
              path: $[0].message.role
              equals: assistant
        autoCloseScope:
          type: string
          enum:
            - NONE
            - DEVELOPMENT
            - PRODUCTION
            - ALL
          default: ALL
          description: >-
            Which sessions the product-level auto-close sweep considers. ALL
            (default) closes both production and development sessions;
            PRODUCTION only production sessions; DEVELOPMENT only development
            (test) sessions; NONE disables auto-close.
          example: ALL
        autoCloseInactivityMinutes:
          type: integer
          minimum: 1
          default: 30
          description: >-
            Minutes of inactivity after which an eligible session is
            auto-closed.
          example: 30
        closedSessionInferenceCreationPolicy:
          type: string
          enum:
            - REJECT
            - IGNORE
            - REOPEN_AND_REEVALUATE
          default: REOPEN_AND_REEVALUATE
          description: >-
            What happens when a new trace is created for an already-closed
            session. REOPEN_AND_REEVALUATE (the default) stores the trace,
            returns the session to PENDING and marks its existing monitor
            evaluations OUTDATED so a monitor scores the session again once it
            closes for good. A development session reopens the same way, without
            monitor evaluations to outdate. IGNORE drops the trace silently.
            REJECT returns an error.
          example: REOPEN_AND_REEVALUATE
        tags:
          type: array
          items:
            type: string
          example:
            - internal
            - beta
          description: >-
            Free-form labels for organizing products. Normalized to lowercase
            and trimmed on save.
        otelProductKey:
          type: array
          nullable: true
          items:
            type: string
          description: >-
            This product's own key, 1 to 10 resource attribute names. Null makes
            the product follow the key of its organization, including every
            later change of it.
          example:
            - service.namespace
            - service.name
        otelProductKeyValues:
          type: object
          nullable: true
          additionalProperties:
            type: string
          description: >-
            One value for each attribute of the key in force, as a map of
            attribute name to text. A trace resource with no galtea.version.id
            and no galtea.product.id that carries these values on its resource
            attributes is routed to this product. Its facts come from its
            galtea.version.fact.* attributes, else from the version attributes
            in force. A resource must carry every attribute of the key to match.
            The values must be unique among the live products of the
            organization, or the request answers 409. Null clears them.
          example:
            service.namespace: robot2
            service.name: plan-de-cuenta
        otelVersionAttributes:
          type: array
          nullable: true
          items:
            type: string
          description: >-
            This product's own list of the resource attributes whose values make
            up a version, 1 to 32 names. Each fact keeps the attribute name as
            its key. A name cannot start with "galtea." or be "customer.id".
            Null makes the product follow the list of its organization,
            including every later change of it. An empty list is refused.
          example:
            - service.version
            - app.prompt.version
      required:
        - name
        - description
    Product:
      type: object
      properties:
        id:
          type: string
          example: prod_123
        organizationId:
          type: string
          example: org_123
        userId:
          type: string
          nullable: true
          example: user_123
        name:
          type: string
          example: Sample Product
        description:
          type: string
          example: Sample product description
        riskLevel:
          type: string
          nullable: true
          enum:
            - PROHIBITED
            - GPAI
            - GPAI_SYSTEMIC
            - HIGH
            - SPECIAL_SYSTEM
            - null
          description: >-
            EU AI Act risk classification. PROHIBITED: banned AI use cases.
            GPAI: general-purpose AI. GPAI_SYSTEMIC: GPAI with systemic risk.
            HIGH: high-risk AI system. SPECIAL_SYSTEM: special-category system.
          example: HIGH
        operatorType:
          type: string
          nullable: true
          enum:
            - AUTHORISED_REPRESENTATIVE
            - DEPLOYER
            - DISTRIBUTER
            - IMPORTER
            - PRODUCT_MANUFACTURER
            - PROVIDER
            - null
          description: EU AI Act operator role classification.
          example: PROVIDER
        interactionMode:
          type: string
          nullable: true
          enum:
            - CONVERSATIONAL
            - HUMAN_DIRECT
            - PROGRAMMATIC
            - null
          description: >-
            Who consumes the product's output. CONVERSATIONAL: a person
            exchanges several turns with it. HUMAN_DIRECT: a person reads the
            output directly, with no dialogue. PROGRAMMATIC: another system
            consumes it and no person reads it directly. The onboarding AI
            suggests a value; the owner can change or clear it. Null means
            unclassified.
          example: CONVERSATIONAL
        primaryTask:
          type: string
          nullable: true
          enum:
            - CONVERSATIONAL_ASSISTANCE
            - QUESTION_ANSWERING_RAG
            - DOCUMENT_EXTRACTION
            - DOCUMENT_GENERATION
            - SUMMARIZATION
            - CLASSIFICATION
            - TRANSLATION
            - CORRECTION
            - AGENTIC_WORKFLOW
            - OTHER
            - null
          description: >-
            The one dominant task the product performs on its input. The
            onboarding AI suggests a value; the owner can change or clear it.
            Null means unclassified.
          example: QUESTION_ANSWERING_RAG
        capabilities:
          type: string
          nullable: true
          example: Can process and analyze data
        inabilities:
          type: string
          nullable: true
          example: Cannot process sensitive financial data
        policies:
          type: string
          nullable: true
          example: Must comply with data protection regulations
        otelInputSourceRule:
          type: object
          nullable: true
          properties:
            spanName:
              type: string
              description: Exact OTLP span name to match.
              example: ExecuteActivity:add_user_message
            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 input
                text. Must start with the $ root.
              example: $[0].message.content
            predicate:
              type: object
              nullable: true
              properties:
                path:
                  type: string
                  example: $[0].message.role
                equals:
                  type: string
                  example: user
              required:
                - path
                - equals
              description: >-
                Optional gate: apply the rule only when the node at
                predicate.path equals predicate.equals.
          required:
            - spanName
            - attribute
            - path
          description: >-
            Recover a turn's user-visible input for products whose user message
            lives on a non-LLM span. Set per organization, product or version.
            The version rule wins, then the product rule. Per span it applies
            only when no LLM input is present. Per turn the value it extracts IS
            the turn input, ahead of every fallback, and the turn input is EMPTY
            when the rule extracts nothing from any span of the turn. The two
            directions resolve independently. Null uses the rule of the
            organization.
          example:
            spanName: ExecuteActivity:add_user_message
            attribute: app.arguments
            path: $[0].message.content
            predicate:
              path: $[0].message.role
              equals: user
        otelOutputSourceRule:
          type: object
          nullable: true
          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. Must start with the $ root.
              example: $[0].message.content
            predicate:
              type: object
              nullable: true
              properties:
                path:
                  type: string
                  example: $[0].message.role
                equals:
                  type: string
                  example: assistant
              required:
                - path
                - equals
              description: >-
                Optional gate: apply the rule only when the node at
                predicate.path equals predicate.equals.
          required:
            - spanName
            - attribute
            - path
          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
            organization, product or version. The version rule wins, then the
            product rule. Per span it applies only when no LLM output is
            present. Per turn the value it extracts IS the turn output, ahead of
            every fallback, and the turn output is EMPTY when the rule extracts
            nothing from any span of the turn. The two directions resolve
            independently. Null uses the rule of the organization.
          example:
            spanName: ExecuteActivity:save_reply
            attribute: app.arguments
            path: $[0].message.content
            predicate:
              path: $[0].message.role
              equals: assistant
        autoCloseScope:
          type: string
          enum:
            - NONE
            - DEVELOPMENT
            - PRODUCTION
            - ALL
          default: ALL
          description: >-
            Which sessions the product-level auto-close sweep considers. ALL
            (default) closes both production and development sessions;
            PRODUCTION only production sessions; DEVELOPMENT only development
            (test) sessions; NONE disables auto-close.
          example: ALL
        autoCloseInactivityMinutes:
          type: integer
          minimum: 1
          default: 30
          description: >-
            Minutes of inactivity after which an eligible session is
            auto-closed.
          example: 30
        closedSessionInferenceCreationPolicy:
          type: string
          enum:
            - REJECT
            - IGNORE
            - REOPEN_AND_REEVALUATE
          default: REOPEN_AND_REEVALUATE
          description: >-
            What happens when a new trace is created for an already-closed
            session. REOPEN_AND_REEVALUATE (the default) stores the trace,
            returns the session to PENDING and marks its existing monitor
            evaluations OUTDATED so a monitor scores the session again once it
            closes for good. A development session reopens the same way, without
            monitor evaluations to outdate. IGNORE drops the trace silently.
            REJECT returns an error.
          example: REOPEN_AND_REEVALUATE
        tags:
          type: array
          items:
            type: string
          example:
            - internal
            - beta
          description: >-
            Free-form labels for organizing products. Normalized to lowercase
            and trimmed on save.
        otelProductKey:
          type: array
          nullable: true
          items:
            type: string
          description: >-
            This product's own key, 1 to 10 resource attribute names. Null makes
            the product follow the key of its organization, including every
            later change of it.
          example:
            - service.namespace
            - service.name
        otelProductKeyValues:
          type: object
          nullable: true
          additionalProperties:
            type: string
          description: >-
            One value for each attribute of the key in force, as a map of
            attribute name to text. A trace resource with no galtea.version.id
            and no galtea.product.id that carries these values on its resource
            attributes is routed to this product. Its facts come from its
            galtea.version.fact.* attributes, else from the version attributes
            in force. A resource must carry every attribute of the key to match.
            The values must be unique among the live products of the
            organization, or the request answers 409. Null clears them.
          example:
            service.namespace: robot2
            service.name: plan-de-cuenta
        otelVersionAttributes:
          type: array
          nullable: true
          items:
            type: string
          description: >-
            This product's own list of the resource attributes whose values make
            up a version, 1 to 32 names. Each fact keeps the attribute name as
            its key. A name cannot start with "galtea." or be "customer.id".
            Null makes the product follow the list of its organization,
            including every later change of it. An empty list is refused.
          example:
            - service.version
            - app.prompt.version
        source:
          type: string
          nullable: true
          readOnly: true
          description: >-
            Demo key the product was cloned from (e.g. "banking"); null for
            user-created products. Server-stamped on demo-clone; not
            client-writable.
          example: banking
        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
    Prefer:
      type: string
      description: >-
        Send `return=minimal` to get no body back from a write and skip reading
        the resource: a create answers `201` with only `Location`, and an update
        answers `204`.
      example: return=minimal
  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-...`.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.