CoreViz
SDK

Library SDK Overview

Programmatically manage your CoreViz visual library — browse, search, organize, tag, and upload media

Library SDK

The @coreviz/sdk package provides two complementary APIs:

  • Vision SDK — AI endpoints for describing, tagging, embedding, editing, and generating images
  • Library SDK (this section) — Management APIs for browsing, searching, organizing, tagging, and uploading media in your CoreViz library

Both live in the same package and the same CoreViz class.

Installation

npm install @coreviz/sdk

React Native / Expo

npx expo install expo-image-manipulator expo-file-system

Authentication

The Library SDK requires a user token (from coreviz login) or an API key:

import { CoreViz } from '@coreviz/sdk';

// Using a session token (from coreviz login)
const sdk = new CoreViz({ token: 'your_session_token' });

// Using an API key
const sdk = new CoreViz({ apiKey: process.env.COREVIZ_API_KEY });

// Local development
const sdk = new CoreViz({ token, baseUrl: 'http://localhost:3000' });

Namespaced API

All library management methods are grouped into namespaces on the CoreViz instance:

sdk.collections   // List and create collections
sdk.media         // Browse, search, get, rename, move, tag, upload
sdk.folders       // Create folders
sdk.tags          // List tag groups and values

Quick Example

import { CoreViz } from '@coreviz/sdk';

const sdk = new CoreViz({ token: process.env.COREVIZ_TOKEN });

// List collections
const collections = await sdk.collections.list();

// Browse a collection
const { media } = await sdk.media.browse(collections[0].id, { limit: 20 });

// Search across all media
const results = await sdk.media.search('product launch event', { limit: 10 });
for (const r of results) {
  console.log(r.mediaName, r.blobUrl, r.rank);
}

// Upload a file
const upload = await sdk.media.upload('/path/to/photo.jpg', {
  collectionId: collections[0].id,
  name: 'hero-shot.jpg',
});
console.log('Uploaded:', upload.mediaId);

Available APIs

Collections

Create and list collections — the top-level containers for your media.

Learn More

Media

Browse, search, get, rename, move, find similar, upload, and tag media items.

Learn More

Folders & Tags

Create folders to organize media within collections and manage tag groups.

Learn More

Next Steps

  • Collections: List and create collections
  • Media: Browse, search, upload, and manage media items
  • Folders & Tags: Organize media with folders and tags
  • MCP Server: Use these same capabilities from Claude Code