Skip to main content

AI Model Management

Overview​

This tutorial walks through the 7-AI-Model-Mgmt collection — creating an AI model, registering an edition and uploading its binary via the resumable TUS protocol, deploying the verified edition to a WEDA Node device, and tearing it down. For the concepts behind the upload/deploy pipeline (TUS, hash verification, the apply-pipeline hooks), see AI Model Management — Upload and Deploy.

Prerequisites​

  • Completed Get Access Token — accessToken is set
  • Completed Manage Organizations — org_id is set
  • A WEDA Node device registered and Activated — deviceId is set (for the deploy steps)
  • The model binary file, plus its fileName, fileSize (bytes), and fileHash (64-char lowercase SHA-256)

Auto-captured Variables​

VariableSet byUsed by
modelIdCreate Model / List Models for an OrganizationEdition, upload, deploy, teardown
uploadIdRegister New Edition of an Existing Model, re-confirmed by Create a resumable uploadCreate a resumable upload, Upload a file chunk, Check Upload Status
uploadIdB64Register New Edition of an Existing Model / Create a resumable uploadCreate a resumable upload (Upload-Metadata)
createdDeploymentIdCreate Model DeploymentDeployment tracking

Variables You Set​

VariableDescription
modelNameName of the model to create (unique within the Org)
modelEditionEdition string, e.g. 1-0-3. Dots are not allowed
fileName / fileSize / fileHashThe binary's name, size in bytes, and SHA-256 hash
deviceIdTarget device for deployment

In Create Model Deployment, edit the request body's targets[].deviceIdList and the applyCmd container name to match your device and running container.

note

The tus Location header ends with the same uploadId that Register Edition returned. The collection parses it out and asserts the two match, so there is only one upload identifier to track. If you script your own client, you can rely on that equality rather than storing two values.


Upload the Model​

1. Create Model​

Creates a new model record under the Org.

  • API: Create Model
  • Script: saves modelId as a collection variable
  • Result: 201 Created (or 409 Conflict if the name already exists — use List Models for an Organization to reuse the modelId)

2. List Models for an Organization​

Lists all models in the Org.

  • API: List Models
  • Script: modelId updated from the response
  • Result: 200 OK

3. Register New Edition of an Existing Model​

Registers an edition and its file metadata, returning the uploadId used to start the upload.

  • API: Register Edition
  • Script: saves uploadId, tusEndpoint, and uploadIdB64
  • Result: 201 Created

4. Create a resumable upload​

Starts a resumable TUS upload session. Sends Upload-Length and the base64-encoded uploadId in Upload-Metadata.

  • API: Create Upload Session (TUS)
  • Script: parses the uploadId from the Location header and asserts it matches the uploadId from step 3
  • Result: 201 Created

5. Upload a file chunk​

Uploads the binary bytes to the TUS session via PATCH. Attach your model file as the request body.

6. Check Upload Status​

Polls the upload status until server-side hash verification completes.

Check until ready

Send this request again every few seconds until the status reaches Uploaded. Server-side hash verification of a large file can take a while.

  • API: Check Upload Status
  • Result: 200 OK — status walks Pending → Uploading → Verifying → Uploaded

Deploy to Devices​

7. Create Model Deployment​

Deploys the verified edition to the target device(s). Edit the request body's deviceIdList and the apply-pipeline applyCmd container name before sending.

  • API: Deploy
  • Script: saves createdDeploymentId as a collection variable
  • Result: 202 Accepted

8. List All AI Models for a Specific Device​

Lists the models deployed on the target device.

9. List Devices for a Specific Model Edition​

Lists the per-device deployment state for a given model edition.


Teardown​

10. Delete Model File from a Specific Device​

Removes the deployed edition from a specific device.

11. Delete a Model and All Its Editions​

Deletes the model and all its editions from WEDA Core. Remove the edition from its devices first.



Last updated on Aug-2, 2026 | Version 1.1.1