Official JavaScript and TypeScript SDK for the Convert and Store API.
Use this package to:
- authenticate with API keys or desktop session tokens
- list and inspect tools
- run file-based conversions across the live tool catalog
- run URL-based tools such as website screenshots
- upload, replace, download, encrypt, decrypt, move, share, and batch rename files
- create and manage folders
- work with shared folders
- manage watch folders, team settings, team invitations, and team watch folders
- manage webhook endpoints
- update account vault settings
From GitHub:
npm install github:DarrylPolo/ConvertAndStore-TypeScript-JavaScript-SDKOr clone and build locally:
npm install
npm run buildimport { ConvertAndStoreClient } from "convertandstore-typescript-javascript-sdk";
const client = new ConvertAndStoreClient({
apiKey: process.env.CONVERT_AND_STORE_API_KEY
});
const me = await client.getMe();
const tools = await client.listTools();
console.log(me.plan_code);
console.log(tools.length);The SDK is designed for both:
- modern browsers with
fetch,Blob, andFormData - Node.js 18+ with the built-in
fetchstack
In Node, you can upload using:
- a filesystem path
- a
Blob - a
Uint8Array - an
ArrayBuffer
In browsers, you can upload using:
FileBlobArrayBufferUint8Array
For most backend workflows, use an API key:
const client = new ConvertAndStoreClient({
apiKey: process.env.CONVERT_AND_STORE_API_KEY
});For desktop-session style workflows, log in and persist the returned bearer token:
const client = new ConvertAndStoreClient();
const session = await client.loginWithPassword({
email: "admin@convertandstore.com",
password: "your-password",
deviceName: "Node integration"
});
console.log(session.token);const result = await client.convertTool("jpg-to-png", "./input/photo.jpg");
console.log(result.download_url);const screenshot = await client.takeWebsiteScreenshot("https://example.com", {
viewport_width: 1440,
viewport_height: 1024,
delay_ms: 1200
});
console.log(screenshot.preview_url);const archive = await client.convertToolMany("zip-create", [
"./docs/quote.pdf",
"./docs/image.png",
"./docs/data.csv"
], {
archive_name: "project-delivery"
});
console.log(archive.download_url);const uploaded = await client.uploadFile("./deliverables/final.pdf", {
folderId: 42,
title: "Final proposal",
description: "Client-ready version"
});await client.shareFolderWithMember(18, "teammate@example.com");getStatus()listTools()getTool(slug)
loginWithPassword(options)logoutDesktop()getMe()setApiKey(apiKey)setBearerToken(token)clearToken()updateVaultSettings({ vaultEnabled, autoEncryptUploads })
listFiles(filters?)getFile(fileId)uploadFile(upload, options?)replaceFile(fileId, upload, options?)encryptFile(fileId)decryptFile(fileId)shareFile(fileId, isPublic?)deleteFile(fileId)moveFile(fileId, folderId?)batchRenameFiles(fileIds, options?)downloadFile(fileId)saveFileDownload(fileId, destinationPath)
listFolders()createFolder(name)deleteFolder(folderId, options?)listSharedFolders()getSharedFolder(shareId)downloadSharedFolderFile(shareId, fileId)saveSharedFolderFileDownload(shareId, fileId, destinationPath)shareFolderWithMember(folderId, memberIdentifier)revokeFolderMemberShare(folderId, shareId)
getWatchFolders()createWatchFolder(attributes)updateWatchFolder(ruleId, attributes)deleteWatchFolder(ruleId)getSyncManifest()
getTeam()updateTeam(attributes)inviteTeamMember(email, role?)revokeTeamInvitation(invitationId)updateTeamMemberRole(membershipId, role)removeTeamMember(membershipId)createTeamWatchFolder(attributes)updateTeamWatchFolder(ruleId, attributes)deleteTeamWatchFolder(ruleId)
getWebhooks()createWebhook({ name, endpointUrl, events })deleteWebhook(endpointId)
convertTool(slug, upload, options?)convertToolMany(slug, uploads, options?)convertToolFromUrl(slug, url, options?)takeWebsiteScreenshot(url, options?)
This SDK supports the live tool library through the generic tool conversion endpoint:
- image tools
- audio tools
- video tools
- web capture tools
- PDF tools
- spreadsheet tools
- document tools
- archive tools
As long as the public API exposes the tool under /api/v1/tools/{slug}/convert, this SDK can call it.
Common option fields for tool conversions are documented in:
The SDK throws typed errors:
ValidationErrorAuthenticationErrorApiErrorNetworkError
Example:
import { AuthenticationError, ConvertAndStoreClient } from "convertandstore-typescript-javascript-sdk";
try {
const client = new ConvertAndStoreClient({ apiKey: "bad-token" });
await client.getMe();
} catch (error) {
if (error instanceof AuthenticationError) {
console.error("Token rejected:", error.message);
}
}- The SDK uses the live Convert and Store API at
https://convertandstore.comby default. - Enterprise-only features such as some webhook and team workflows still depend on the account plan behind the token you use.
- Download helpers that write directly to disk are Node-oriented.