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

# Create Training Run Endpoint

> C2 — submit training (portal step 03->04). Freezes params (+hash),
409s `{code:"run_active"}` if a run is already active for this client,
launches the training task in the background (SSE console via C4 mirrors
progress).



## OpenAPI

````yaml /openapi.json post /v1/provisioning/client-profiles/{client_id}/training-runs
openapi: 3.1.0
info:
  description: Causeloop Platform Backend
  title: Causeloop API
  version: 1.0.0
servers: []
security: []
paths:
  /v1/provisioning/client-profiles/{client_id}/training-runs:
    post:
      tags:
        - provisioning-portal
      summary: Create Training Run Endpoint
      description: |-
        C2 — submit training (portal step 03->04). Freezes params (+hash),
        409s `{code:"run_active"}` if a run is already active for this client,
        launches the training task in the background (SSE console via C4 mirrors
        progress).
      operationId: >-
        create_training_run_endpoint_v1_provisioning_client_profiles__client_id__training_runs_post
      parameters:
        - in: path
          name: client_id
          required: true
          schema:
            title: Client Id
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TrainingRunCreateRequest'
        required: true
      responses:
        '201':
          content:
            application/json:
              schema: {}
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      security:
        - HTTPBearer: []
components:
  schemas:
    TrainingRunCreateRequest:
      properties:
        artifact_path:
          anyOf:
            - type: string
            - type: 'null'
          title: Artifact Path
        data_source_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Data Source Id
        data_window:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Data Window
        kind:
          default: initial
          title: Kind
          type: string
        params:
          additionalProperties: true
          title: Params
          type: object
      title: TrainingRunCreateRequest
      type: object
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          title: Detail
          type: array
      title: HTTPValidationError
      type: object
    ValidationError:
      properties:
        ctx:
          title: Context
          type: object
        input:
          title: Input
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          title: Location
          type: array
        msg:
          title: Message
          type: string
        type:
          title: Error Type
          type: string
      required:
        - loc
        - msg
        - type
      title: ValidationError
      type: object
  securitySchemes:
    HTTPBearer:
      scheme: bearer
      type: http

````