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

# Create training job



## OpenAPI

````yaml /api-reference/openapi.json post /v1/training_jobs
openapi: 3.1.0
info:
  title: Veri API
  description: >-
    REST API for the Veri RL post-training platform. All requests require a
    Bearer API key (`vk_` prefix).
  license:
    name: ''
  version: 0.1.0
servers:
  - url: https://api.veri.studio
    description: Production
security: []
tags:
  - name: Training jobs
    description: Create, monitor, and manage training jobs.
  - name: Datasets
    description: Upload and connect training datasets.
  - name: Reward functions
    description: Upload and manage reward functions.
  - name: Deployments
    description: Serve trained models and run inference.
  - name: Evaluations
    description: Score models against datasets and benchmarks.
  - name: Volumes
    description: Persistent file storage mounted into jobs.
  - name: Models
    description: Custom model registry deployments serve from.
  - name: Regions
    description: Discover available launch regions.
  - name: GPU
    description: Live GPU availability by provider and region.
  - name: Code artifacts
    description: Upload custom training script bundles.
  - name: Billing
    description: Credit balance and transaction history.
  - name: API keys
    description: Create and revoke API keys.
  - name: Account
    description: The authenticated caller's identity.
  - name: SSH keys
    description: Manage SSH key pairs for compute access.
  - name: Settings
    description: Account-level integrations (Weights & Biases).
paths:
  /v1/training_jobs:
    post:
      tags:
        - Training jobs
      summary: Create training job
      operationId: submit
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TrainingJobCreate'
        required: true
      responses:
        '200':
          description: The created training job
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TrainingJobResponse'
        '402':
          description: Insufficient credit balance
        '422':
          description: Request body failed validation
      security:
        - bearerAuth: []
components:
  schemas:
    TrainingJobCreate:
      type: object
      required:
        - output_name
        - gpu
      properties:
        job_type:
          type: string
        base_model:
          type:
            - string
            - 'null'
        dataset_id:
          type:
            - string
            - 'null'
        script:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/CustomScriptConfig'
        reward_function_id:
          type:
            - string
            - 'null'
        reward_function_ids:
          type:
            - array
            - 'null'
          items:
            type: string
        reward_weights:
          type:
            - array
            - 'null'
          items:
            type: number
            format: double
        method:
          type: string
        hyperparameters: {}
        output_name:
          type: string
        gpu:
          $ref: '#/components/schemas/GpuConfig'
        provider:
          type:
            - string
            - 'null'
        checkpoint_destination:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/CheckpointDestination'
        environments:
          type:
            - object
            - 'null'
          additionalProperties:
            $ref: '#/components/schemas/EnvironmentConfig'
          propertyNames:
            type: string
        requires_heartbeat:
          type: boolean
        volume:
          type:
            - string
            - 'null'
        region:
          type:
            - string
            - 'null'
        num_nodes:
          type: integer
          format: int32
    TrainingJobResponse:
      type: object
      required:
        - object
        - id
        - status
        - method
        - output_name
        - created_at
        - updated_at
      properties:
        object:
          type: string
        id:
          type: string
        status:
          $ref: '#/components/schemas/JobStatus'
        base_model:
          type:
            - string
            - 'null'
        dataset_id:
          type:
            - string
            - 'null'
        reward_function_id:
          type:
            - string
            - 'null'
        method:
          type: string
        hyperparameters:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/AnyHyperparameters'
        base_image:
          type:
            - string
            - 'null'
        entrypoint:
          type:
            - string
            - 'null'
        output_name:
          type: string
        gpu:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/GpuInfo'
        gpu_requested:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/GpuInfo'
        provider:
          type:
            - string
            - 'null'
        region:
          type:
            - string
            - 'null'
        num_nodes:
          type: integer
          format: int32
        error:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/JobError'
        dashboard_url:
          type:
            - string
            - 'null'
        download_url:
          type:
            - string
            - 'null'
        wandb_run_url:
          type:
            - string
            - 'null'
        current_step:
          type:
            - integer
            - 'null'
          format: int32
        total_steps:
          type:
            - integer
            - 'null'
          format: int32
        current_loss:
          type:
            - number
            - 'null'
          format: double
        cost_usd:
          type:
            - number
            - 'null'
          format: double
        duration_seconds:
          type:
            - number
            - 'null'
          format: double
        started_at:
          type:
            - string
            - 'null'
          format: date-time
        completed_at:
          type:
            - string
            - 'null'
          format: date-time
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
    CustomScriptConfig:
      type: object
      description: >-
        The BYO-script payload. Persisted verbatim as
        TrainingJob.script_config_json

        and read back by the worker launch path (forward contract).
      required:
        - base_image
        - code_artifact_id
        - entrypoint
      properties:
        base_image:
          type: string
        code_artifact_id:
          type: string
        entrypoint:
          type: string
        deps:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/DepsSpec'
        env:
          type:
            - object
            - 'null'
          additionalProperties:
            type: string
          propertyNames:
            type: string
    GpuConfig:
      type: object
      required:
        - gpu_type
        - gpu_count
      properties:
        gpu_type:
          type: string
        gpu_count:
          type: integer
          format: int32
    CheckpointDestination:
      type: object
      properties:
        type:
          $ref: '#/components/schemas/CheckpointDestinationType'
        uri:
          type:
            - string
            - 'null'
        credentials: {}
    EnvironmentConfig:
      type: object
      properties:
        splits:
          type: array
          items:
            type: string
        source:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/EnvironmentSource'
    JobStatus:
      type: string
      enum:
        - queued
        - provisioning
        - configuring
        - running
        - completed
        - failed
        - cancelled
    AnyHyperparameters:
      oneOf:
        - $ref: '#/components/schemas/AgenticGrpoHyperparameters'
        - $ref: '#/components/schemas/GrpoHyperparameters'
        - $ref: '#/components/schemas/SftVideoGenHyperparameters'
        - $ref: '#/components/schemas/SftTextHyperparameters'
        - $ref: '#/components/schemas/DpoHyperparameters'
    GpuInfo:
      type: object
      description: |-
        Pydantic `GPUInfo` (with `type` field). Rust uses `gpu_type` internally
        but serializes as "type" for JSON parity.
      required:
        - type
        - count
      properties:
        type:
          type: string
        count:
          type: integer
          format: int32
    JobError:
      type: object
      properties:
        code:
          type:
            - string
            - 'null'
        message:
          type:
            - string
            - 'null'
    DepsSpec:
      type: object
      description: >-
        Dependency layer for a custom_script job. The worker installs these
        inside the

        container before the entrypoint (uv pip). `kind` is "requirements" |
        "uv_lock"

        | "none"; `content` is the file text for the first two.
      required:
        - kind
      properties:
        kind:
          type: string
        content:
          type:
            - string
            - 'null'
    CheckpointDestinationType:
      type: string
      enum:
        - veri
        - s3
        - gs
        - az
    EnvironmentSource:
      oneOf:
        - type: object
          required:
            - id
            - type
          properties:
            id:
              type: string
            package:
              type:
                - string
                - 'null'
            args:
              type: object
              additionalProperties: {}
              propertyNames:
                type: string
            type:
              type: string
              enum:
                - verifiers_wheel
        - type: object
          required:
            - protocol
            - url
            - type
          properties:
            protocol:
              $ref: '#/components/schemas/RemoteEnvProtocol'
            url:
              type: string
            name:
              type:
                - string
                - 'null'
            headers:
              type: object
              additionalProperties:
                type: string
              propertyNames:
                type: string
            type:
              type: string
              enum:
                - remote_endpoint
    AgenticGrpoHyperparameters:
      allOf:
        - $ref: '#/components/schemas/GrpoHyperparameters'
        - type: object
          properties:
            max_turns:
              type: integer
              format: int32
            max_seq_len:
              type: integer
              format: int32
    GrpoHyperparameters:
      type: object
      properties:
        learning_rate:
          type: number
          format: double
        num_epochs:
          type: integer
          format: int32
        max_steps:
          type:
            - integer
            - 'null'
          format: int32
        rollouts_per_prompt:
          type: integer
          format: int32
        kl_coef:
          type: number
          format: double
        max_prompt_length:
          type: integer
          format: int32
        max_response_length:
          type: integer
          format: int32
        global_batch_size:
          type: integer
          format: int32
        seed:
          type: integer
          format: int32
        use_unsloth:
          type: boolean
        lora_rank:
          type:
            - integer
            - 'null'
          format: int32
        lora_alpha:
          type:
            - integer
            - 'null'
          format: int32
        load_in_4bit:
          type: boolean
    SftVideoGenHyperparameters:
      type: object
      properties:
        learning_rate:
          type: number
          format: double
        num_epochs:
          type: integer
          format: int32
        max_steps:
          type:
            - integer
            - 'null'
          format: int32
        lora_rank:
          type: integer
          format: int32
        lora_alpha:
          type: integer
          format: int32
        resolution_height:
          type: integer
          format: int32
        resolution_width:
          type: integer
          format: int32
        num_frames:
          type: integer
          format: int32
        fps:
          type: integer
          format: int32
        batch_size:
          type: integer
          format: int32
        gradient_accumulation_steps:
          type: integer
          format: int32
        seed:
          type: integer
          format: int32
    SftTextHyperparameters:
      type: object
      properties:
        learning_rate:
          type: number
          format: double
        num_epochs:
          type: integer
          format: int32
        max_steps:
          type:
            - integer
            - 'null'
          format: int32
        max_seq_length:
          type:
            - integer
            - 'null'
          format: int32
        packing:
          type: boolean
        dataset_text_field:
          type: string
        use_unsloth:
          type: boolean
        lora_rank:
          type:
            - integer
            - 'null'
          format: int32
        lora_alpha:
          type:
            - integer
            - 'null'
          format: int32
        load_in_4bit:
          type: boolean
    DpoHyperparameters:
      type: object
      properties:
        learning_rate:
          type: number
          format: double
        num_epochs:
          type: integer
          format: int32
        max_steps:
          type:
            - integer
            - 'null'
          format: int32
        beta:
          type: number
          format: double
        loss_type:
          type: string
        max_length:
          type:
            - integer
            - 'null'
          format: int32
        max_prompt_length:
          type:
            - integer
            - 'null'
          format: int32
        use_unsloth:
          type: boolean
        lora_rank:
          type:
            - integer
            - 'null'
          format: int32
        lora_alpha:
          type:
            - integer
            - 'null'
          format: int32
        load_in_4bit:
          type: boolean
    RemoteEnvProtocol:
      type: string
      enum:
        - ors
        - open_env
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API key
      description: API key with the `vk_` prefix. Create one from the dashboard.

````