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

# Update a listing version

> Updates a library listing version. Setting is_live to true will demote the current live version. When a benchmark is provided, it replaces the stored benchmark.



## OpenAPI

````yaml patch /v1/library_listings/{user_defined_listing_id}/versions/{version_tag}
openapi: 3.1.0
info:
  description: REST API for management of Baseten resources
  title: Baseten management API
  version: 1.0.0
servers:
  - url: https://api.baseten.co
security:
  - BearerAuth: []
paths:
  /v1/library_listings/{user_defined_listing_id}/versions/{version_tag}:
    parameters:
      - $ref: '#/components/parameters/user_defined_listing_id'
      - $ref: '#/components/parameters/version_tag'
    patch:
      summary: Updates a library listing version
      description: >-
        Updates a library listing version. Setting is_live to true will demote
        the current live version. When a benchmark is provided, it replaces the
        stored benchmark.
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateLibraryListingVersionRequestV1'
        required: true
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LibraryListingVersionV1'
      x-codeSamples:
        - lang: bash
          source: >-
            curl --request PATCH \

            --url
            https://api.baseten.co/v1/library_listings/{user_defined_listing_id}/versions/{version_tag}
            \

            --header "Authorization: Bearer $BASETEN_API_KEY" \

            --header "Content-Type: application/json" \

            --data '{
              "is_live": true
            }'
        - lang: python
          source: >-
            import requests

            import os

            API_KEY = os.environ.get("BASETEN_API_KEY", "<YOUR_API_KEY>")

            url =
            "https://api.baseten.co/v1/library_listings/{user_defined_listing_id}/versions/{version_tag}"


            headers = {"Authorization": f"Bearer {API_KEY}", "Content-Type":
            "application/json"}


            response = requests.request(
                "PATCH",
                url,
                headers=headers,
                json={'is_live': True}
            )


            print(response.text)
components:
  parameters:
    user_defined_listing_id:
      schema:
        type: string
      name: user_defined_listing_id
      in: path
      required: true
    version_tag:
      schema:
        type: string
      name: version_tag
      in: path
      required: true
  schemas:
    UpdateLibraryListingVersionRequestV1:
      description: Request to update a library listing version.
      properties:
        is_live:
          anyOf:
            - type: boolean
            - type: 'null'
          default: null
          description: >-
            Whether this version should be the live version. Setting to true
            demotes the current live version.
          title: Is Live
        allow_truss_download:
          anyOf:
            - type: boolean
            - type: 'null'
          default: null
          description: Whether users deploying this model can download the Truss
          title: Allow Truss Download
        benchmark:
          anyOf:
            - $ref: '#/components/schemas/BenchmarkSnapshotV1'
            - type: 'null'
          default: null
          description: >-
            Benchmark snapshot for this version. When provided, replaces the
            stored benchmark.
      title: UpdateLibraryListingVersionRequestV1
      type: object
    LibraryListingVersionV1:
      description: A library listing version.
      properties:
        version_tag:
          description: Human-readable tag for this version
          title: Version Tag
          type: string
        is_live:
          description: Whether this version is the live version
          title: Is Live
          type: boolean
        allow_truss_download:
          description: Whether users deploying this model can download the Truss
          title: Allow Truss Download
          type: boolean
        oracle_version_id:
          description: Id of the source model version
          title: Oracle Version Id
          type: string
        created_at:
          description: Time the version was created in ISO 8601 format
          format: date-time
          title: Created At
          type: string
        modified_at:
          description: Time the version was last modified
          format: date-time
          title: Modified At
          type: string
        benchmark:
          anyOf:
            - $ref: '#/components/schemas/BenchmarkSnapshotV1'
            - type: 'null'
          default: null
          description: Benchmark snapshot for this version, if one has been uploaded.
      required:
        - version_tag
        - is_live
        - allow_truss_download
        - oracle_version_id
        - created_at
        - modified_at
      title: LibraryListingVersionV1
      type: object
    BenchmarkSnapshotV1:
      properties:
        run_id:
          title: Run Id
          type: string
        hardware:
          title: Hardware
          type: string
        measured_at:
          format: date
          title: Measured At
          type: string
        ttft_ms_p50:
          anyOf:
            - type: number
            - type: 'null'
          default: null
          title: Ttft Ms P50
        output_tokens_per_sec_per_user_p50:
          anyOf:
            - type: number
            - type: 'null'
          default: null
          title: Output Tokens Per Sec Per User P50
        max_concurrent_users_at_50ms_tpot:
          anyOf:
            - type: integer
            - type: 'null'
          default: null
          title: Max Concurrent Users At 50Ms Tpot
        requests_per_sec_p50:
          anyOf:
            - type: number
            - type: 'null'
          default: null
          title: Requests Per Sec P50
        cost_per_1m_tokens_usd:
          anyOf:
            - type: number
            - type: 'null'
          default: null
          title: Cost Per 1M Tokens Usd
        replicas:
          anyOf:
            - type: integer
            - type: 'null'
          default: 2
          title: Replicas
        profile:
          anyOf:
            - type: string
            - type: 'null'
          default: 512x256
          title: Profile
      required:
        - run_id
        - hardware
        - measured_at
      title: BenchmarkSnapshotV1
      type: object
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      description: >-
        Send `Authorization: Bearer <api_key>`. The legacy `Authorization:
        Api-Key <api_key>` scheme is also accepted.

````