> ## 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.

# Save a model and register a version

> Save a completed training job as a library model (same as POST /v1/models with a training_job source). With `model` set, the saved model is also registered as the next version of that lineage (created on first use; its first version becomes `production`). Promote it with POST /v1/models/{name}/aliases/{alias}.



## OpenAPI

````yaml /api-reference/openapi.json post /v1/models/register
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: Deployments
    description: Serve trained models and run inference.
  - 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: Compatibility
    description: Advisory model and runtime compatibility guidance.
  - 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).
  - name: Metrics
    description: Prometheus metrics export for your own observability stack.
paths:
  /v1/models/register:
    post:
      tags:
        - Models
      summary: Save a model and register a version
      description: >-
        Save a completed training job as a library model (same as POST
        /v1/models with a training_job source). With `model` set, the saved
        model is also registered as the next version of that lineage (created on
        first use; its first version becomes `production`). Promote it with POST
        /v1/models/{name}/aliases/{alias}.
      operationId: register
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RegisterRequest'
        required: true
      responses:
        '200':
          description: The existing model (idempotent repeat save)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ModelResponse'
        '201':
          description: The saved model (plus `version` when `model` was given)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ModelResponse'
        '400':
          description: >-
            Invalid name/lineage, non-completed job, or the lineage is built on
            a different base model
        '404':
          description: Training job not found or not owned by the caller
      security:
        - bearerAuth: []
components:
  schemas:
    RegisterRequest:
      type: object
      description: |-
        Body for POST /v1/models/register: save a completed job as a library
        model and (model versions Task 1) optionally register it into a lineage.
      required:
        - training_job_id
        - name
      properties:
        training_job_id:
          type: string
        name:
          type: string
          description: Library display name (slug).
        model:
          type:
            - string
            - 'null'
          description: >-
            Lineage name to register the saved model into (created on first
            use).

            The saved model becomes the lineage's next version; the response

            carries it under `version`.
        artifact:
          type:
            - string
            - 'null'
          description: '"full" (default) or "adapter" (LoRA jobs; required for fleet flips).'
        dataset_snapshot_id:
          type:
            - string
            - 'null'
          description: >-
            Dataset snapshot (Task 2) or plain dataset id recorded on the
            version.
        tags:
          type: array
          items:
            type: string
          description: Free-form tags recorded on the version.
    ModelResponse:
      type: object
      required:
        - object
        - id
        - name
        - base_model
        - artifact_type
        - source
        - status
        - created_at
        - updated_at
      properties:
        object:
          type: string
        id:
          type: string
        name:
          type: string
        base_model:
          type: string
          description: |-
            The base checkpoint this model derives from. For artifact_type
            'adapter' this names the model the adapter must be served on top of.
        artifact_type:
          type: string
          description: |-
            'full' (standalone checkpoint) | 'adapter' (LoRA adapter; only
            attachable to a multi_adapter deployment).
        source:
          type: string
        status:
          type: string
        training_job_id:
          type:
            - string
            - 'null'
        huggingface_id:
          type:
            - string
            - 'null'
        size_bytes:
          type:
            - integer
            - 'null'
          format: int64
        error:
          type:
            - string
            - 'null'
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
        version:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/ModelVersionResponse'
              description: >-
                Present when the save also registered the model into a version

                lineage (`POST /v1/models/register` with `model`): the version
                it

                became (e.g. acme-bot@v6).
    ModelVersionResponse:
      type: object
      description: One version of a lineage (`{name}@v{version}`).
      required:
        - object
        - id
        - model_id
        - model
        - version
        - name
        - artifact_type
        - tags
        - pinned
        - status
        - aliases
        - created_at
      properties:
        object:
          type: string
          description: Always "model_version".
        id:
          type: string
          description: Version id (mv...).
        model_id:
          type: string
          description: Lineage id.
        model:
          type: string
          description: Lineage name.
        version:
          type: integer
          format: int32
          description: Dense, monotonic version number within the lineage.
        name:
          type: string
          description: 'Human handle: "{model}@v{version}".'
        custom_model_id:
          type:
            - string
            - 'null'
          description: |-
            The library model (custom_models row) whose weights this version is;
            deploy or attach by this id.
        artifact_type:
          type: string
          description: '''full'' | ''adapter''.'
        dataset_snapshot_id:
          type:
            - string
            - 'null'
          description: >-
            Dataset snapshot (Task 2) or plain dataset id the version was
            trained on.
        training_job_id:
          type:
            - string
            - 'null'
        parent_version_id:
          type:
            - string
            - 'null'
          description: The version `production` pointed at when this one was registered.
        tags:
          type: array
          items:
            type: string
        pinned:
          type: boolean
          description: Pinned versions are protected from retention.
        pinned_at:
          type:
            - string
            - 'null'
          format: date-time
        status:
          type: string
          description: >-
            'ready' | 'purged' (Task 6, VS-84). A purged version still lists —

            number, tags, audit and scorecards stay — but its weights are
            deleted

            and it can no longer be deployed, attached or promoted.
        purged_at:
          type:
            - string
            - 'null'
          format: date-time
        aliases:
          type: array
          items:
            type: string
          description: Aliases currently pointing at this version.
        created_by:
          type:
            - string
            - 'null'
        created_at:
          type: string
          format: date-time
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API key
      description: API key with the `vk_` prefix. Create one from the dashboard.

````