Snapshots Resource

Snapshots

A Snapshot is a trained AI model state derived from a file (PDF, Transcript, Word Doc).

This method requests a signed URL, uploads the file content to storage, and registers the snapshot.

1import fs from "node:fs";
2
3const buffer = fs.readFileSync("./transcript.vtt");
4
5const response = await mindsim.snapshots.create("mind-id-uuid", {
6 file: buffer,
7 fileName: "meeting_transcript.vtt",
8 mindsetDate: "2023-11-01"
9});

Parameters

ParameterTypeRequiredDescription
mindIdstringYesThe ID of the mind to attach the snapshot to.
params.fileBufferYesThe file content (Node.js Buffer or Blob).
params.fileNamestringYesThe full name of the file (e.g., chat.pdf).
params.contentTypestringNoMIME type. If omitted, inferred from fileName.
params.mindsetDatestringNoISO Date string (YYYY-MM-DD) representing when the conversation/document occurred.

Response

1{
2 "message": "Snapshot created successfully.",
3 "mindAssessmentId": "a0eebc99-9c0b-4ef8-bb6d-6bb9bd380a11",
4 "artifactId": "f47ac10b-58cc-4372-a567-0e02b2c3d479"
5}

Check Status

Snapshot processing is asynchronous. Use this method to check progress.

1const status = await mindsim.snapshots.getStatus("mind-id-uuid", "snapshot-id");

Parameters

ParameterTypeRequiredDescription
mindIdstringYesThe ID of the mind.
snapshotIdstringYesThe mindAssessmentId returned during creation.

Response

1{
2 "id": "a0eebc99-9c0b-4ef8-bb6d-6bb9bd380a11",
3 "mindId": "9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d",
4 "status": "completed", // "processing", "completed", or "failed"
5 "startedAt": "2023-11-15T14:30:00Z",
6 "completedAt": "2023-11-15T14:30:45Z"
7}

List Snapshots

View the history of training data uploaded to a specific mind.

1const history = await mindsim.snapshots.list("mind-id-uuid");

Parameters

ParameterTypeRequiredDescription
mindIdstringYesThe ID of the mind.

Response

1{
2 "count": 2,
3 "snapshots": [
4 {
5 "id": "a0eebc99...",
6 "mindId": "9b1deb4d...",
7 "status": "completed",
8 "createdAt": "2023-11-15T14:30:00Z",
9 // ... additional stats
10 }
11 ]
12}