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

# Update a model.



## OpenAPI

````yaml https://raw.githubusercontent.com/Dallas-Peters-Design-Co/photo-portfolio/main/openapi.json patch /api/models/{id}
openapi: 3.1.0
info:
  description: >-
    Generated from the handlers in `api/` and the schemas in `schemas/`. Do not
    edit by hand — run `pnpm openapi`.
  title: Photo portfolio API
  version: 1.0.0
servers:
  - description: Local
    url: http://localhost:3006
  - description: Production
    url: https://app.dallaspeters.com
security: []
paths:
  /api/models/{id}:
    patch:
      tags:
        - models
      summary: Update a model.
      operationId: patch_api_models__id_
      parameters:
        - in: path
          name: id
          required: true
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                enabled:
                  type: boolean
                id:
                  type: string
                  description: A fal.ai model id, or a namespaced "lora/..." one.
                imageParam:
                  type: string
                  enum:
                    - image_url
                    - image_urls
                input:
                  type: string
                  description: 'What the model takes: prompt, image, or both.'
                label:
                  type: string
                  description: Shown on the node; model ids do not read.
                lora:
                  anyOf:
                    - type: object
                      properties:
                        endpoint:
                          type:
                            - string
                            - 'null'
                        imageEndpoint:
                          type:
                            - string
                            - 'null'
                        path:
                          description: URL to the safetensors weights.
                          type:
                            - string
                            - 'null'
                        scale:
                          type:
                            - number
                            - 'null'
                        trigger:
                          type:
                            - string
                            - 'null'
                      required:
                        - endpoint
                        - imageEndpoint
                        - path
                        - scale
                        - trigger
                      additionalProperties: false
                    - type: 'null'
                sortOrder:
                  type: integer
                  minimum: -9007199254740991
                  maximum: 9007199254740991
                vector:
                  type: boolean
              additionalProperties: false
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AiModel'
        '401':
          description: Missing or invalid token
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        4XX:
          description: Request rejected
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        5XX:
          description: Server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - bearerAuth: []
components:
  schemas:
    AiModel:
      $ref: '#/components/schemas/AiModel'
    ErrorResponse:
      type: object
      properties:
        error:
          type: string
      required:
        - error
      additionalProperties: false
      description: Every failing endpoint answers with this shape.
  securitySchemes:
    bearerAuth:
      bearerFormat: JWT
      scheme: bearer
      type: http

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.