> ## Documentation Index
> Fetch the complete documentation index at: https://docs.wandb.ai/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: []
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:
        id:
          format: uuid
          title: Id
          type: string
      required:
        - id
      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:
        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
    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

````