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

# Serve Model

> Reference for merged 0.6.0 source. The latest verified binary release is 0.5.5; use your Engine’s /api/openapi.json for its installed contract.



## OpenAPI

````yaml /engine/openapi.json post /api/models
openapi: 3.1.0
info:
  title: nerditd
  version: 0.6.0
  description: >-
    Current source interface (0.6.0); verify your installed Engine version. This
    is not a claim that 0.6.0 is released.
servers:
  - url: http://127.0.0.1:9321
    description: Default local Engine; use your configured endpoint.
security: []
paths:
  /api/models:
    post:
      tags:
        - Models
      summary: Serve Model
      description: >-
        Reference for merged 0.6.0 source. The latest verified binary release is
        0.5.5; use your Engine’s /api/openapi.json for its installed contract.
      operationId: serve_model
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ModelServeRequest'
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ModelResponse'
          description: HTTP 201 response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: HTTP 422 response
components:
  schemas:
    ModelServeRequest:
      properties:
        model:
          type: string
          minLength: 1
          pattern: ^[\w.\-/]+(:[\w.\-]+)?$
          title: Model
        gpus:
          type: integer
          minimum: 0
          title: Gpus
          default: 0
        name:
          anyOf:
            - type: string
              pattern: ^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$
            - type: 'null'
          title: Name
        backend:
          anyOf:
            - type: string
            - type: 'null'
          title: Backend
        max_model_len:
          anyOf:
            - type: integer
              maximum: 262144
              minimum: 256
            - type: 'null'
          title: Max Model Len
        gpu_memory_utilization:
          anyOf:
            - type: number
              maximum: 0.95
              minimum: 0.1
            - type: 'null'
          title: Gpu Memory Utilization
      additionalProperties: false
      type: object
      required:
        - model
      title: ModelServeRequest
    ModelResponse:
      properties:
        id:
          type: string
          title: Id
        name:
          type: string
          title: Name
        model:
          anyOf:
            - type: string
            - type: 'null'
          title: Model
        backend:
          anyOf:
            - type: string
            - type: 'null'
          title: Backend
        status:
          $ref: '#/components/schemas/JobStatus'
        desired_state:
          anyOf:
            - type: string
            - type: 'null'
          title: Desired State
        model_pulled:
          type: boolean
          title: Model Pulled
          default: false
        gpu_count:
          type: integer
          title: Gpu Count
          default: 0
        gpu_ids:
          items:
            type: string
          type: array
          title: Gpu Ids
        gpu_utilization:
          additionalProperties:
            anyOf:
              - type: integer
              - type: 'null'
          type: object
          title: Gpu Utilization
        endpoint:
          anyOf:
            - type: string
            - type: 'null'
          title: Endpoint
        max_model_len:
          anyOf:
            - type: integer
            - type: 'null'
          title: Max Model Len
        gpu_memory_utilization:
          anyOf:
            - type: number
            - type: 'null'
          title: Gpu Memory Utilization
        created_at:
          type: string
          format: date-time
          title: Created At
      type: object
      required:
        - id
        - name
        - status
        - created_at
      title: ModelResponse
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    JobStatus:
      type: string
      enum:
        - pending
        - scheduled
        - running
        - paused
        - completed
        - failed
        - cancelled
        - retrying
        - building
        - degraded
        - restarting
        - stopped
      title: JobStatus
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError

````