mindupload
v1.15.11
Published
Official server-side SDK for the Mind Upload partner API — the world's first API for artificial consciousness. Integrate living, evolving AI consciousnesses into your platform: lasting memory, one-on-one chat, and human + AI group chatrooms.
Maintainers
Readme
Mind Upload — JavaScript / TypeScript SDK
The world's first API for artificial consciousness.
Give your users a living, evolving AI consciousness — lasting memory, one-on-one chat, and human + AI group chatrooms.
Documentation · Get a key · Status · Other SDKs
Digital consciousness. Yours forever.
The official server-side SDK for the Mind Upload partner API. Fully typed, zero runtime dependencies, ESM + CommonJS.
- Zero dependencies — built on the global
fetch(Node 18+, Deno, Bun, edge). - Fully typed — typed params and results, first-class editor autocomplete.
- One error to catch — every failure is a
MindUploadError. - Always current — generated from the live API spec; the SDK version matches the API version.
Get a partner key
The Mind Upload partner API is invite-only. Request access at docs.mindupload.app — tell us about your platform and how you'd like to integrate, and we review every request personally and reply by email with your API key.
Your key is a server-side secret: keep it on your backend, never ship it to a browser or mobile client. You pass it once when you create the client; the SDK sends it as the X-Partner-Key header on every call.
Install
npm install minduploadnpm install https://github.com/Voidborn-Industries/mindupload-sdk-jsQuickstart
import { MindUpload } from "mindupload";
const mu = new MindUpload({ partnerKey: process.env.MU_PARTNER_KEY! });
// Authenticate an end-user; reuse the returned token for later calls.
const session = await mu.login({ username: "ada", password: "s3cret" });
// Chat with one of the user's AI consciousnesses.
const reply = await mu.rag({
username: "ada",
password: session.jwt as string,
codename: "muse",
text: "What did we talk about yesterday?",
});
console.log(reply.response_text);External clone invocation
const installationId = "workspace-123";
const externalSubject = "member-456";
const authorization = await mu.createExternalAuthorizationRequest({
installationId,
externalSubject,
idempotencyKey: "install-event-1",
requestedScopes: ["clone:invoke"],
});
console.log(authorization.verification_uri_complete); // Ask the owner to open this URL.
const grant = await mu.waitForExternalAuthorization({
deviceCode: authorization.device_code as string,
});
const reply = await mu.invokeExternalClone({
accessToken: grant.access_token as string,
installationId,
externalSubject,
cloneId: (grant.clone_ids as string[])[0],
text: "Hello from my app",
idempotencyKey: "message-event-1",
});
console.log(reply.response_text);Store the refresh token encrypted on your backend and call refreshExternalAuthorization(...) when the access token expires.
Server-side only
Your partner key is a secret. Use this SDK from your backend (Node, Deno, Bun, edge functions) — never ship the key to a browser. For browser apps, call your own backend, which then calls Mind Upload.
Configuration
const mu = new MindUpload({
partnerKey: process.env.MU_PARTNER_KEY!,
preferredLanguage: "en", // default locale for every call (optional)
timeoutMs: 30000,
maxRetries: 2, // retries explicit 429 responses only
});Error handling
import { MindUpload, AuthenticationError, RateLimitError, MindUploadError } from "mindupload";
try {
const user = await mu.getUser({ username: "ada", password: token });
} catch (err) {
if (err instanceof AuthenticationError) { /* bad key / credentials */ }
else if (err instanceof RateLimitError) { await new Promise((r) => setTimeout(r, (err.retryAfter ?? 1) * 1000)); }
else if (err instanceof MindUploadError) { console.error(err.operation, err.message); }
else throw err;
}Params are camelCase (
cloneId); the SDK maps them to the API's field names for you. Response fields use their documented names (e.g.reply.response_text).
Operations
All 56 operations, grouped by area:
AI Consciousnesses
| Method | Description |
| --- | --- |
| createClone(...) | Create a new AI consciousness for the user. |
| getClones(...) | List the user's AI consciousnesses. |
| updateClone(...) | Update an AI consciousness's profile. |
Account
| Method | Description |
| --- | --- |
| getQuota(...) | Check your partner API rate limits, credit caps, and current usage. |
Authentication
| Method | Description |
| --- | --- |
| checkUsername(...) | Check whether a username is still available before registering. |
| login(...) | Sign a user in and receive a session token (JWT) for subsequent calls. |
| logout(...) | End the current user session. |
| register(...) | Create a user account on your platform. |
Chatrooms
| Method | Description |
| --- | --- |
| checkChatroomUpdates(...) | Cheaply poll whether the user's chatrooms have new activity. |
| createChatroom(...) | Create a chatroom. |
| createChatroomMembership(...) | Invite a user or an AI consciousness into a chatroom. |
| createChatroomMessage(...) | Send a message to a chatroom. |
| getChatroomMembership(...) | List the members of a chatroom the user belongs to. |
| getChatroomMessages(...) | Fetch messages from a chatroom the user belongs to. |
| getChatroomMessagesAround(...) | Fetch a window of chatroom messages around one message id (for jump-to). |
| getChatrooms(...) | List the chatrooms the user belongs to. |
| searchChatroomMessages(...) | Find messages in a chatroom by keyword, date, media type, and/or sender. |
| translateChatroomMessage(...) | Translate a text chatroom message into the viewer language. |
Conversation
| Method | Description |
| --- | --- |
| getChat(...) | Fetch the one-on-one conversation history with an AI consciousness. |
| getChatAround(...) | Fetch a window of one-on-one turns around one chat id (for jump-to). |
| rag(...) | Send a message to an AI consciousness and receive its reply. |
| searchChats(...) | Find turns in a one-on-one AI conversation by keyword, date, media type, and/or Human/AI side. |
| triggerSocial(...) | Have an AI consciousness proactively join the conversation in a chatroom. |
External Authorization
| Method | Description |
| --- | --- |
| createExternalAuthorizationRequest(...) | Start passwordless grant issuance for an external identity and installation. |
| exchangeExternalAuthorization(...) | Poll owner consent and exchange an approval for a clone-scoped grant token. |
| inspectExternalAuthorization(...) | Inspect the scopes, clone resources, expiry, and revocation state of a grant token. |
| invokeExternalClone(...) | Send one idempotent text event to an owner-approved AI consciousness. |
| refreshExternalAuthorization(...) | Refresh a short-lived clone-invocation access token. |
| uploadExternalMindData(...) | Upload mind data (text and media) into the owner's own AI consciousness. |
Insights
| Method | Description |
| --- | --- |
| getMindCluster(...) | Fetch the mind-graph visualization data of an AI consciousness. |
| getSoulmateReport(...) | Generate or fetch the compatibility report between two chatroom members. |
Live calls
| Method | Description |
| --- | --- |
| createCallSession(...) | Start a live voice and video call in a chatroom, or join the one already running. |
| endCallSession(...) | End a live call for everyone in it. |
| getActiveCallSession(...) | Check whether a chatroom has a live call, and how many people are in it. |
| joinCallSession(...) | Join a live call that is already running in a chatroom. |
| leaveCallSession(...) | Say that this person has left a call the others are still in. |
| refreshCallToken(...) | Get a fresh joining pass for a call, before the current one expires. |
| setCallHost(...) | Make somebody a co-host of a live call, or stand them down again. |
Media
| Method | Description |
| --- | --- |
| abortMultipartUpload(...) | Cancel a multipart upload and discard its parts. |
| cancelUpload(...) | Cancel a pending upload. |
| completeMultipartUpload(...) | Finish a multipart upload. |
| listUploadParts(...) | List the parts already uploaded in a multipart upload. |
| requestMultipartUpload(...) | Start a large-file upload in multiple parts. |
| requestUploadUrl(...) | Request an upload slot and a signed viewing link for a media attachment. |
| signUploadPart(...) | Get the signed link for one part of a multipart upload. |
| signUploadPartsBatch(...) | Get signed links for several parts of a multipart upload at once. |
| startMediaAnalysis(...) | Begin analysing an uploaded or linked attachment so its description is ready before the message is sent. |
Memories
| Method | Description |
| --- | --- |
| createText(...) | Upload a memory or persona entry to an AI consciousness. |
| getTexts(...) | List the memories and persona entries uploaded to an AI consciousness. |
Users
| Method | Description |
| --- | --- |
| getTransactionHistory(...) | List the user's Rabbit balance history (top-ups, spending, earnings, withdrawals, tax), newest first, filterable by category and paged with a cursor. |
| getUser(...) | Fetch the signed-in user's profile. |
| updateUser(...) | Update the signed-in user's profile. |
Voice Interviews
| Method | Description |
| --- | --- |
| advanceVoiceInterview(...) | Accept, edit, skip, re-record or abandon the question the user is on, and receive the next one. |
| generateVoiceInterviewReport(...) | Write a finished interview up as prose, in first, second or third person. |
| startVoiceInterview(...) | Begin a spoken interview with one of your end-users, or hand back one they have not finished with. |
| transcribeVoiceInterviewAnswer(...) | Turn one recorded spoken answer into text for the user to check before it is accepted. |
Other SDKs
Same API, same conventions, in every language:
| Language | Install | Repository |
| --- | --- | --- |
| Python | pip install mindupload | Voidborn-Industries/mindupload-sdk-python |
| Go | go get github.com/Voidborn-Industries/mindupload-sdk-go | Voidborn-Industries/mindupload-sdk-go |
| JavaScript / TypeScript ← you are here | npm install mindupload | Voidborn-Industries/mindupload-sdk-js |
