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

# Attach an uploaded CAD model and render its thumbnail

> Attach the uploaded model to the spec, replacing any previous one.

Renders a PNG thumbnail of the model. A model that cannot be rendered is
still attached, with ``thumbnail_url`` null and the reason in
``thumbnail_error``.



## OpenAPI

````yaml https://api.ionworks.com/openapi.json post /cell_specifications/{cell_spec_id}/cad/confirm-upload
openapi: 3.1.0
info:
  title: FastAPI
  version: 0.1.0
servers:
  - url: https://api.ionworks.com
    description: Production
security: []
paths:
  /cell_specifications/{cell_spec_id}/cad/confirm-upload:
    post:
      tags:
        - Cell Specifications
      summary: Attach an uploaded CAD model and render its thumbnail
      description: |-
        Attach the uploaded model to the spec, replacing any previous one.

        Renders a PNG thumbnail of the model. A model that cannot be rendered is
        still attached, with ``thumbnail_url`` null and the reason in
        ``thumbnail_error``.
      operationId: >-
        confirm_cell_specification_cad_upload_cell_specifications__cell_spec_id__cad_confirm_upload_post
      parameters:
        - name: cell_spec_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Cell Spec Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CadConfirmRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CellSpecificationCad'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    CadConfirmRequest:
      properties:
        file_name:
          type: string
          title: File Name
          description: >-
            Filename of the model, e.g. 'cell.step'. Its extension selects the
            format: .step, .stp, .iges, .igs, .stl, .obj, .ply, .glb, or .off.
        upload_id:
          type: string
          title: Upload Id
          description: The upload_id returned by initiate-upload.
      type: object
      required:
        - file_name
        - upload_id
      title: CadConfirmRequest
      description: Identifies the upload being confirmed.
    CellSpecificationCad:
      properties:
        file_name:
          type: string
          title: File Name
          description: Original filename of the model.
        download_url:
          type: string
          title: Download Url
          description: Signed URL to download the model.
        thumbnail_url:
          anyOf:
            - type: string
            - type: 'null'
          title: Thumbnail Url
          description: >-
            Signed URL of the rendered PNG thumbnail; None when the model could
            not be rendered.
        thumbnail_error:
          anyOf:
            - type: string
            - type: 'null'
          title: Thumbnail Error
          description: >-
            Why rendering failed, when it was just attempted and did. Only set
            on the confirm-upload response.
      type: object
      required:
        - file_name
        - download_url
      title: CellSpecificationCad
      description: A cell specification's CAD model, with short-lived URLs to fetch it.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    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

````

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