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

# Upload model to project

> Uploads model weights to a project. Can optionally attach to a dataset version for lineage.



## OpenAPI

````yaml /api-spec.json post /ml/projects/{id}/models/upload
openapi: 3.0.0
info:
  contact:
    name: Acusight API Support
  description: >-
    Acusight platform API - custom endpoints + Portainer proxy routes for edge
    AI deployments
  title: Acusight API
  version: 1.0.0
servers:
  - url: https://acusight.io/api
    description: AcuSight Cloud (hosted)
security: []
tags:
  - name: Devices & provisioning
    description: Register, provision, and manage edge devices and their agents.
  - name: Virtual devices
    description: Create and drive simulated devices for testing and demos.
  - name: Alerts & telemetry
    description: Model alerts, alert rules, and product telemetry.
  - name: Organization
    description: Organization-level settings.
  - name: Datasets & data
    description: Projects, batches, datasets, images, annotations, and drift.
  - name: Models & training
    description: Model registry, training jobs, exports, and inference.
  - name: Pipeline data
    description: Detection time-series and aggregated pipeline analytics.
paths:
  /ml/projects/{id}/models/upload:
    post:
      tags:
        - Models & training
      summary: Upload model to project
      description: >-
        Uploads model weights to a project. Can optionally attach to a dataset
        version for lineage.
      parameters:
        - description: Project ID
          in: path
          name: id
          required: true
          schema:
            type: integer
      requestBody:
        content:
          multipart/form-data:
            schema:
              type: object
              properties:
                name:
                  description: Model display name
                  type: string
                version_id:
                  description: Dataset version ID to attach to (optional)
                  type: integer
                model_file:
                  description: Model artifact (.pt, .onnx, .tflite, .synap)
                  type: string
                  format: binary
              required:
                - name
                - model_file
        required: true
      responses:
        '201':
          description: Model uploaded
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/types.APIResponse'
                  - properties:
                      data:
                        $ref: '#/components/schemas/models.ModelVersion'
                    type: object
        '400':
          description: Invalid upload payload
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/types.APIResponse'
        '500':
          description: Failed to upload model
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/types.APIResponse'
      security:
        - BearerAuth: []
components:
  schemas:
    types.APIResponse:
      properties:
        data: {}
        error:
          $ref: '#/components/schemas/types.APIError'
        meta:
          $ref: '#/components/schemas/types.APIMeta'
        success:
          type: boolean
      type: object
    models.ModelVersion:
      properties:
        artifact_uri:
          description: >-
            Artifact Storage - Full S3 URI to the model file (e.g.,
            s3://model-artifacts/.../best.pt)
          type: string
        created_at:
          description: Timestamps
          type: string
        format:
          description: 'Format of the model artifact: pt, onnx, tflite, synap'
          type: string
        id:
          type: integer
        is_reference:
          description: >-
            Reference Flag: If true, this is a link to a global model
            (ProjectID=0) used in this project
          type: boolean
        project_id:
          description: Foreign keys
          type: integer
        source_model_version_id:
          description: |-
            For exports: points to the source model this was exported from
            null for trained/uploaded models
          type: integer
        updated_at:
          type: string
        version_id:
          description: |-
            VersionID: One model per dataset version (enforced by unique index)
            version_id=0 is reserved for versionless uploaded models and exports
          type: integer
      type: object
    types.APIError:
      properties:
        code:
          type: string
        details:
          type: string
        message:
          type: string
      type: object
    types.APIMeta:
      properties:
        count:
          type: integer
        limit:
          type: integer
        offset:
          type: integer
        total:
          type: integer
      type: object
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >-
        JWT access token. Paste the token only; the Bearer prefix is added
        automatically.

````