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



## OpenAPI

````yaml /api-reference/openapi.json post /v1/deployments
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/deployments:
    post:
      tags:
        - Deployments
      summary: Create deployment
      operationId: create
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DeploymentCreate'
        required: true
      responses:
        '200':
          description: The created deployment
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DeploymentResponse'
        '422':
          description: Request body failed validation
      security:
        - bearerAuth: []
components:
  schemas:
    DeploymentCreate:
      type: object
      required:
        - model
        - name
        - gpu
      properties:
        model:
          type: string
        source:
          type: string
        name:
          type: string
        gpu:
          $ref: '#/components/schemas/GpuConfig'
        provider:
          type:
            - string
            - 'null'
        engine:
          type:
            - string
            - 'null'
          description: >-
            Inference engine: "vllm" (default) or "max" (Modular MAX). Omitted
            => vllm.
        num_replicas:
          type:
            - integer
            - 'null'
          format: int32
          description: >-
            VS-341: number of GPU-box replicas to launch. Omitted => 1, which is

            byte-for-byte today's single-box behavior. Validated 1..=8 at
            create.

            Sugar for min_replicas == max_replicas == N (the CLI --replicas
            flag).
        min_replicas:
          type:
            - integer
            - 'null'
          format: int32
          description: >-
            Scaling foundation (§10): replica-count bounds. min == max => fixed
            N

            (autoscaling off — there is no boolean flag). Omitted => both
            default to

            num_replicas (fixed N). min = 0 arms scale-to-zero (VS-313): the
            fleet

            parks after the idle window and wakes on the next request.
        max_replicas:
          type:
            - integer
            - 'null'
          format: int32
        concurrency_target:
          type:
            - number
            - 'null'
          format: double
          description: >-
            Per-replica concurrency setpoint the (VS-342) autoscaler targets:

            desired = ceil(total_ongoing / concurrency_target), clamped to

            [min_replicas, max_replicas]. Stored as target_ongoing_requests.

            Omitted => 8 (throughput-biased; lower it for latency-sensitive
            chat).
        scale_to_zero_window_seconds:
          type:
            - integer
            - 'null'
          format: int32
          description: >-
            VS-313: idle seconds before a min_replicas=0 deployment parks

            (scaled_to_zero). Omitted => 3600. Floor 300 (Fireworks'
            convention).
        idle_delete_after_days:
          type:
            - integer
            - 'null'
          format: int32
          description: >-
            VS-313: optional GC — a deployment parked at zero with no traffic
            for

            this many days goes terminal (stopped). Omitted => kept forever.
    DeploymentResponse:
      type: object
      required:
        - object
        - id
        - status
        - name
        - model
        - source
        - created_at
        - updated_at
      properties:
        object:
          type: string
        id:
          type: string
        status:
          $ref: '#/components/schemas/DeploymentStatus'
        name:
          type: string
        model:
          type: string
        source:
          type: string
        source_model_id:
          type:
            - string
            - 'null'
          description: |-
            For a custom_model deployment, the saved model this was created from
            (provenance). Null for other sources.
        endpoint_url:
          type:
            - string
            - 'null'
        gpu:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/GpuInfo'
        provider:
          type:
            - string
            - 'null'
        engine:
          type:
            - string
            - 'null'
        num_replicas:
          type: integer
          format: int32
          description: >-
            VS-341: DESIRED replica count (GPU boxes) behind this deployment.
            The

            observed count is ready_replicas — the K8s spec/status split; the
            CLI

            renders "ready/desired" (e.g. 2/3).
        ready_replicas:
          type: integer
          format: int32
          description: 'Observed: replicas currently serving with a routable endpoint.'
        min_replicas:
          type: integer
          format: int32
          description: Replica-count bounds. min == max => fixed N (autoscaling off).
        max_replicas:
          type: integer
          format: int32
        concurrency_target:
          type:
            - number
            - 'null'
          format: double
          description: >-
            Per-replica concurrency setpoint (stored as
            target_ongoing_requests).
        scale_to_zero_window_seconds:
          type:
            - integer
            - 'null'
          format: int32
          description: 'VS-313: idle window before a min=0 deployment parks (None = 3600s).'
        idle_delete_after_days:
          type:
            - integer
            - 'null'
          format: int32
          description: 'VS-313: parked-deployment GC in days (None = kept forever).'
        cost_per_hour_usd:
          type:
            - number
            - 'null'
          format: double
        total_cost_usd:
          type:
            - number
            - 'null'
          format: double
        total_requests:
          type: integer
          format: int32
        error:
          type:
            - string
            - 'null'
        started_at:
          type:
            - string
            - 'null'
          format: date-time
        stopped_at:
          type:
            - string
            - 'null'
          format: date-time
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
    GpuConfig:
      type: object
      required:
        - gpu_type
        - gpu_count
      properties:
        gpu_type:
          type: string
        gpu_count:
          type: integer
          format: int32
    DeploymentStatus:
      type: string
      enum:
        - queued
        - provisioning
        - serving
        - unhealthy
        - stopped
        - failed
        - scaled_to_zero
        - waking
    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
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API key
      description: API key with the `vk_` prefix. Create one from the dashboard.

````