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

# Get model (published version)

> Published model version (full detail) for a model asset

Returns the **published** version for this model with the same JSON shape as `GET .../model/versions/{versionId}` (including **nodes**, **edges**, and **metadata**), or `null` if nothing is published yet.


## OpenAPI

````yaml api-reference/openapi.json GET /api/public/v1/assets/{assetId}/model
openapi: 3.0.0
info:
  title: Less Public API
  version: 1.0.0
  description: >-
    Integrator-facing JSON API. All paths are under `/api/public/v1` and match
    the route handlers in the Less webapp (`apps/webapp/src/app/api/public/v1`).
    Authenticate with `Authorization: Bearer <api-token>`.
servers:
  - url: https://{BaseURL}
    variables:
      BaseURL:
        default: app.less.tech
        description: >-
          Your workspace host (hostname only, no scheme or path). Defaults to
          app.less.tech; replace with your workspace host if different.
security:
  - bearerAuth: []
paths:
  /api/public/v1/assets/{assetId}/model:
    get:
      tags:
        - Assets
        - Models
      summary: Get model published version
      description: >-
        Returns the published model version with the same fields as `GET
        .../model/versions/{versionId}` (including **nodes**, **edges**,
        **metadata**), or `version: null` when nothing is published.
      parameters:
        - name: assetId
          in: path
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      version:
                        $ref: '#/components/schemas/PublicModelVersionDetail'
                        nullable: true
                    required:
                      - version
                required:
                  - data
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicApiErrorBody'
        '404':
          description: Not a model or no access
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicApiErrorBody'
components:
  schemas:
    PublicModelVersionDetail:
      allOf:
        - $ref: '#/components/schemas/PublicModelVersionSummary'
        - type: object
          properties:
            nodes:
              description: Canvas nodes (typically an XYFlow node array).
              type: array
              items:
                type: object
                additionalProperties: true
            edges:
              description: Canvas edges (typically an XYFlow edge array).
              type: array
              items:
                type: object
                additionalProperties: true
            metadata:
              description: Per-node execution metadata map.
              type: object
              additionalProperties: true
          required:
            - nodes
            - edges
            - metadata
    PublicApiErrorBody:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
            message:
              type: string
          required:
            - code
            - message
      required:
        - error
    PublicModelVersionSummary:
      type: object
      properties:
        id:
          type: string
          format: uuid
        versionNumber:
          type: integer
          nullable: true
        recordType:
          type: string
          description: draft, version, or autosave (autosaves excluded from list).
        published:
          type: boolean
        comment:
          type: string
          nullable: true
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          nullable: true
      required:
        - id
        - versionNumber
        - recordType
        - published
        - comment
        - createdAt
        - updatedAt
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````