> ## Documentation Index
> Fetch the complete documentation index at: https://wb-21fd5541-docs-3071-org-scoped-api-keys.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Créer une tâche d'entraînement SFT

> Créez une nouvelle tâche d'entraînement SFT (Fine-Tuning supervisé).



## OpenAPI

````yaml fr/serverless-training/api-reference/openapi.json POST /v1/preview/sft-training-jobs
openapi: 3.1.0
info:
  title: Serverless Training
  version: 1.0.0
servers:
  - url: https://api.training.wandb.ai
security: []
paths:
  /v1/preview/sft-training-jobs:
    post:
      tags:
        - training-jobs
      summary: Créer une tâche d'entraînement SFT
      description: Créez une nouvelle tâche d'entraînement SFT (Fine-Tuning supervisé).
      operationId: Create_SFT_Training_Job_v1_preview_sft_training_jobs_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateSFTTrainingJob'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TrainingJobResponse'
          description: Réponse réussie
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Erreur de validation
      security:
        - HTTPBearer: []
components:
  schemas:
    CreateSFTTrainingJob:
      description: >-
        Schéma pour créer un nouveau TrainingJob SFT (Supervised Fine-Tuning).


        Le client doit téléverser les données d’entraînement (trajectories.jsonl
        et metadata.json) vers W&B Artifacts et fournir l’URL de l’artifact.
      properties:
        config:
          anyOf:
            - $ref: '#/components/schemas/SFTTrainingConfig'
            - type: 'null'
        experimental_config:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Experimental Config
        model_id:
          format: uuid
          title: Model Id
          type: string
        training_data_url:
          description: >-
            Chemin d’artifact W&B pour les données d’entraînement (par exemple,
            'wandb-artifact:///entity/project/artifact-name:version')
          title: Training Data Url
          type: string
      required:
        - model_id
        - training_data_url
      title: CreateSFTTrainingJob
      type: object
    TrainingJobResponse:
      description: Schéma de la réponse de TrainingJob.
      properties:
        created_at:
          format: date-time
          title: Created At
          type: string
        error_message:
          anyOf:
            - type: string
            - type: 'null'
          title: Error Message
        id:
          format: uuid
          title: Id
          type: string
        model_id:
          format: uuid
          title: Model Id
          type: string
        progress:
          anyOf:
            - type: number
            - type: 'null'
          title: Progress
        status:
          $ref: '#/components/schemas/TrainingJobStatus'
        training_end:
          anyOf:
            - format: date-time
              type: string
            - type: 'null'
          title: Training End
        training_start:
          anyOf:
            - format: date-time
              type: string
            - type: 'null'
          title: Training Start
        updated_at:
          format: date-time
          title: Updated At
          type: string
      required:
        - id
        - model_id
        - status
        - progress
        - error_message
        - training_start
        - training_end
        - created_at
        - updated_at
      title: TrainingJobResponse
      type: object
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          title: Detail
          type: array
      title: HTTPValidationError
      type: object
    SFTTrainingConfig:
      description: Schéma de la configuration d’entraînement SFT.
      properties:
        assistant_turns:
          default: all
          enum:
            - all
            - last
          title: Assistant Turns
          type: string
        batch_size:
          anyOf:
            - type: integer
            - const: auto
              type: string
            - type: 'null'
          title: Batch Size
        learning_rate:
          anyOf:
            - type: number
            - items:
                type: number
              type: array
            - type: 'null'
          title: Learning Rate
        metric_logging:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Metric Logging
      title: SFTTrainingConfig
      type: object
    TrainingJobStatus:
      description: Énumération des statuts des tâches d'entraînement.
      enum:
        - PENDING
        - RUNNING
        - COMPLETED
        - FAILED
        - CANCELLED
      title: TrainingJobStatus
      type: string
    ValidationError:
      properties:
        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

````