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

# Create Training Job



## OpenAPI

````yaml https://api.landing.ai/openapi.json post /v1/projects/{project_id}/train
openapi: 3.1.0
info:
  title: LandingLens API
  description: >

    **LandingLens API** is a RESTful API that allows you to use
    [LandingLens](https://app.landing.ai) programmatically.

    Our API has predictable resource-oriented URLs, returns JSON-encoded
    responses, and uses standard HTTP response codes, authentication, and verbs.


    You can use the LandingLens API to programmatically perform many tasks in
    LandingLens, including:

    * Create projects

    * Upload images to projects

    * Create classes

    * Train models

    * Deploy models to cloud-endpoints hosted by LandingAI (cloud deployment)


    ## Tutorial

    Check out this
    [tutorial](https://landing-ai.github.io/public-rest-api/tutorial/) to learn
    the basic workflow for using the LandingLens APIs.
  version: 0.1.0
servers:
  - url: https://api.landing.ai
    description: Production environment
security: []
paths:
  /v1/projects/{project_id}/train:
    post:
      tags:
        - Training
      summary: Create Training Job
      operationId: create_training_job_v1_projects__project_id__train_post
      parameters:
        - name: project_id
          in: path
          required: true
          schema:
            type: integer
            title: Project Id
        - name: timeout
          in: query
          required: false
          schema:
            anyOf:
              - type: integer
              - type: 'null'
            default: 60
            title: Timeout
        - name: apikey
          in: header
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Apikey
      requestBody:
        content:
          application/json:
            schema:
              anyOf:
                - $ref: '#/components/schemas/TrainItem'
                - type: 'null'
              title: Training Config Request
            examples:
              classification:
                summary: train classification model
                value:
                  model:
                    architecture: ConvNext-[16M]
                    hyperParams:
                      epochs: 20
                  transforms:
                    preprocessing:
                      - rescaleWithPadding:
                          height: 896
                          width: 1280
                          paddingValue: 0
                    augmentations:
                      - horizontalFlip:
                          p: 0.5
                      - randAugment:
                          numberTransforms: 2
                          magnitude: 4
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BaseResponse_TrainingResponseData_'
              example:
                data: edcfea45-33b5-4a52-8625-94d156e63fb3
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    TrainItem:
      properties:
        name:
          anyOf:
            - type: string
            - type: 'null'
          title: Name
        model:
          $ref: '#/components/schemas/TrainItemModel'
        transforms:
          $ref: '#/components/schemas/TrainItemTransforms'
      type: object
      required:
        - model
        - transforms
      title: TrainItem
    BaseResponse_TrainingResponseData_:
      properties:
        data:
          anyOf:
            - $ref: '#/components/schemas/TrainingResponseData'
            - type: 'null'
      type: object
      required:
        - data
      title: BaseResponse[TrainingResponseData]
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    TrainItemModel:
      properties:
        architecture:
          type: string
          title: Architecture
        hyperParams:
          type: object
          title: Hyperparams
      type: object
      required:
        - architecture
        - hyperParams
      title: TrainItemModel
    TrainItemTransforms:
      properties:
        preprocessing:
          items:
            additionalProperties:
              type: object
            type: object
          type: array
          title: Preprocessing
        augmentations:
          anyOf:
            - items:
                additionalProperties:
                  type: object
                type: object
              type: array
            - type: 'null'
          title: Augmentations
      type: object
      required:
        - preprocessing
      title: TrainItemTransforms
    TrainingResponseData:
      properties:
        trainingId:
          type: string
          title: Trainingid
      type: object
      required:
        - trainingId
      title: TrainingResponseData
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError

````